5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4LogicalVolume.hh>
7 #include <Geant4/G4VisAttributes.hh>
25 if (!detailed) std::cout <<
"PHG4LFHcalDisplayAction::disabled detailed view of towers" << std::endl;
42 G4LogicalVolume *logvol =
it.first;
43 if (logvol->GetVisAttributes())
48 G4VisAttributes *visatt =
new G4VisAttributes();
49 visatt->SetForceSolid(
true);
51 if (
it.second ==
"Invisible")
53 visatt->SetVisibility(
false);
55 else if (
it.second ==
"Wireframe")
57 visatt->SetColour(G4Colour::Red());
58 visatt->SetForceWireframe(
true);
59 visatt->SetVisibility(
true);
61 else if (
it.second ==
"Absorber_W")
65 visatt->SetColour(G4Colour::Black());
66 visatt->SetVisibility(
true);
71 visatt->SetVisibility(
false);
73 else if (
it.second ==
"Absorber")
77 visatt->SetColour(4 * 21. / 255, 4 * 27. / 255, 4 * 31. / 255);
78 visatt->SetVisibility(
true);
83 visatt->SetVisibility(
false);
85 else if (
it.second ==
"Spacer")
89 visatt->SetColour(220. / 255, 220. / 255, 220. / 255);
90 visatt->SetVisibility(
true);
95 visatt->SetVisibility(
false);
97 else if (
it.second ==
"LFHcalEnvelope")
99 visatt->SetColour(G4Colour::Magenta());
100 visatt->SetForceSolid(
false);
101 visatt->SetVisibility(
false);
103 else if (
it.second ==
"Scintillator")
108 visatt->SetColour(127. / 255, 255. / 255, 212. / 255, 0.5);
109 visatt->SetVisibility(
true);
114 visatt->SetVisibility(
false);
116 else if (
it.second ==
"WLSfiber")
121 visatt->SetColour(20. / 255, 10. / 255, 200. / 255, 1.0);
124 visatt->SetVisibility(
true);
128 visatt->SetVisibility(
false);
130 else if (
it.second ==
"Frame")
134 visatt->SetColour(G4Colour::Yellow());
137 visatt->SetVisibility(
true);
138 visatt->SetForceWireframe(
true);
142 visatt->SetVisibility(
false);
144 else if (
it.second ==
"SingleTower_W")
147 visatt->SetVisibility(
false);
150 visatt->SetColour(G4Colour::Black());
151 visatt->SetVisibility(
true);
155 else if (
it.second ==
"SingleTower")
158 visatt->SetVisibility(
false);
161 visatt->SetColour(G4Colour::Blue());
162 visatt->SetVisibility(
true);
168 cout <<
"unknown logical volume " <<
it.second << endl;
172 logvol->SetVisAttributes(visatt);