5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4LogicalVolume.hh>
7 #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 ==
"CarbonShell")
47 visatt->SetColour(G4Colour(2 * 21. / 255, 2 * 27. / 255, 2 * 31. / 255));
51 else if (
it.second ==
"Crystal")
53 visatt->SetColour(G4Colour::Cyan());
54 visatt->SetColour(127. / 255, 255. / 255, 212. / 255, 0.2);
55 visatt->SetForceSolid(
true);
59 else if (
it.second ==
"Sensor")
61 visatt->SetColour(255. / 255, 165. / 255, 0. / 255, 0.2);
62 visatt->SetForceSolid(
true);
66 else if (
it.second ==
"Envelope")
68 visatt->SetVisibility(
false);
70 else if (
it.second ==
"VM2000")
72 visatt->SetColour(G4Colour::Gray());
73 visatt->SetForceSolid(
true);
77 else if (
it.second ==
"Tedlar")
79 visatt->SetColour(G4Colour::White());
80 visatt->SetForceSolid(
true);
84 else if (
it.second ==
"Invisible")
86 visatt->SetVisibility(
false);
88 else if (
it.second ==
"WIP")
90 visatt->SetColour(G4Colour::Green());
91 visatt->SetForceWireframe(
true);
93 visatt->SetVisibility(
false);
95 else if (
it.second ==
"TwoByTwo")
97 visatt->SetColour(G4Colour::Gray());
101 cout <<
"unknown logical volume " <<
it.second << endl;
104 logvol->SetVisAttributes(visatt);