5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4LogicalVolume.hh>
7 #include <Geant4/G4VisAttributes.hh>
23 if (!detailed) std::cout <<
"PHG4ForwardEcalDisplayAction::disabled detailed view of towers" << std::endl;
40 G4LogicalVolume *logvol =
it.first;
41 if (logvol->GetVisAttributes())
45 G4VisAttributes *visatt =
new G4VisAttributes();
46 visatt->SetVisibility(
true);
47 visatt->SetForceSolid(
true);
49 if (
it.second ==
"Absorber")
51 visatt->SetColour(G4Colour::Gray());
53 visatt->SetVisibility(
true);
55 visatt->SetVisibility(
false);
57 else if (
it.second ==
"Coating")
59 visatt->SetColour(G4Colour::Black());
61 visatt->SetVisibility(
true);
63 visatt->SetVisibility(
false);
65 else if (
it.second ==
"Clamp")
67 visatt->SetColour(4 * 21. / 255, 4 * 27. / 255, 4 * 31. / 255);
70 visatt->SetVisibility(
true);
72 visatt->SetVisibility(
false);
74 else if (
it.second ==
"Envelope")
76 visatt->SetColour(G4Colour::Magenta());
77 visatt->SetVisibility(
false);
78 visatt->SetForceWireframe(
true);
80 else if (
it.second ==
"Fiber")
83 visatt->SetColour(152. / 255, 251. / 255, 152. / 255, 0.4);
85 visatt->SetVisibility(
true);
87 visatt->SetVisibility(
false);
89 else if (
it.second ==
"Scintillator")
93 visatt->SetColour(127. / 255, 255. / 255, 212. / 255, 0.2);
95 visatt->SetVisibility(
true);
97 visatt->SetVisibility(
false);
99 else if (
it.second ==
"SingleTower")
102 visatt->SetColour(4 * 21. / 255, 4 * 27. / 255, 4 * 31. / 255);
105 visatt->SetVisibility(
false);
107 visatt->SetVisibility(
true);
109 else if (
it.second ==
"miniblock")
111 visatt->SetVisibility(
false);
112 visatt->SetColour(G4Colour::Red());
113 visatt->SetForceSolid(
false);
117 std::cout <<
"unknown logical volume " <<
it.second << std::endl;
120 logvol->SetVisAttributes(visatt);