7 #include <Geant4/G4Colour.hh>
8 #include <Geant4/G4LogicalVolume.hh>
9 #include <Geant4/G4VisAttributes.hh>
35 G4LogicalVolume *logvol =
it.first;
36 if (logvol->GetVisAttributes())
40 G4VisAttributes *visatt =
new G4VisAttributes();
41 visatt->SetVisibility(
true);
42 visatt->SetForceSolid(
true);
44 if (
it.second ==
"DIPOLE")
46 visatt->SetColour(G4Color(0.2, 0.8, 0.2, 0.8));
48 else if (
it.second ==
"FIELDVOLUME" ||
it.second ==
"OFF")
50 visatt->SetVisibility(
false);
51 visatt->SetForceSolid(
false);
53 else if (
it.second ==
"QUADRUPOLE")
55 visatt->SetColour(G4Color(0., 0.3, 0.7, 0.8));
57 else if (
it.second ==
"SEXTUPOLE")
59 visatt->SetColour(G4Color(1., 0.5, 0.7, 0.8));
63 std::cout <<
PHWHERE <<
"unknown logical volume " <<
it.second << std::endl;
66 logvol->SetVisAttributes(visatt);