7 #include <Geant4/G4Colour.hh>
8 #include <Geant4/G4LogicalVolume.hh>
9 #include <Geant4/G4VisAttributes.hh>
37 G4LogicalVolume *logvol =
it.first;
38 if (logvol->GetVisAttributes())
42 G4VisAttributes *visatt =
new G4VisAttributes();
43 visatt->SetVisibility(
true);
44 visatt->SetForceSolid(
true);
45 m_VisAttVec.push_back(visatt);
46 if (
it.second ==
"DIPOLE")
48 visatt->SetColour(G4Color(0.2, 0.8, 0.2, 1.));
50 else if (
it.second ==
"FIELDVOLUME")
52 visatt->SetColour(G4Colour::Gray());
53 visatt->SetForceSolid(
false);
55 else if (
it.second ==
"QUADRUPOLE")
57 visatt->SetColour(G4Color(0.8, 0.3, 0.1, 0.9));
59 else if (
it.second ==
"SOLENOID")
61 visatt->SetColour(G4Color(1., 0.5, 0.7, 1.));
65 cout <<
PHWHERE <<
"unknown logical volume " <<
it.second << endl;
68 logvol->SetVisAttributes(visatt);