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 ==
"Absorber")
46 visatt->SetColour(G4Colour::Blue());
48 else if (
it.second ==
"Envelope" ||
it.second ==
"fiber_plate_air")
50 visatt->SetVisibility(
false);
51 visatt->SetForceSolid(
false);
53 else if (
it.second ==
"Fiber")
55 visatt->SetColour(G4Colour::Cyan());
57 else if (
it.second ==
"FrontBackPlate")
59 visatt->SetColour(G4Colour::Red());
61 else if (
it.second ==
"Window")
63 visatt->SetColour(G4Colour::Blue());
65 else if (
it.second ==
"SMD")
67 visatt->SetColour(G4Colour::Yellow());
69 else if (
it.second ==
"FiberPlate")
71 visatt->SetColour(G4Colour::Cyan());
73 else if (
it.second ==
"Scint_solid")
75 visatt->SetColour(G4Colour::Cyan());
79 cout <<
GetName() <<
" unknown logical volume " <<
it.second << endl;
82 logvol->SetVisAttributes(visatt);