5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4LogicalVolume.hh>
7 #include <Geant4/G4VisAttributes.hh>
33 G4LogicalVolume *logvol =
it.first;
34 if (logvol->GetVisAttributes())
38 G4VisAttributes *visatt =
new G4VisAttributes();
39 visatt->SetVisibility(
true);
40 visatt->SetForceSolid(
true);
42 if (
it.second ==
"Absorber")
44 visatt->SetColour(G4Colour::Blue());
46 else if (
it.second ==
"Envelope" ||
it.second ==
"fiber_plate_air")
48 visatt->SetVisibility(
false);
49 visatt->SetForceSolid(
false);
51 else if (
it.second ==
"Fiber")
53 visatt->SetColour(G4Colour::Cyan());
55 else if (
it.second ==
"FrontBackPlate")
57 visatt->SetColour(G4Colour::Red());
59 else if (
it.second ==
"Window")
61 visatt->SetColour(G4Colour::Blue());
63 else if (
it.second ==
"SMD")
65 visatt->SetColour(G4Colour::Yellow());
67 else if (
it.second ==
"FiberPlate")
69 visatt->SetColour(G4Colour::Cyan());
71 else if (
it.second ==
"Scint_solid")
73 visatt->SetColour(G4Colour::Cyan());
77 std::cout <<
GetName() <<
" unknown logical volume " <<
it.second << std::endl;
80 logvol->SetVisAttributes(visatt);