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 ==
"BCalCylinder")
44 visatt->SetColour(G4Colour::White());
45 visatt->SetForceWireframe(
true);
46 visatt->SetVisibility(
false);
48 else if (
it.second ==
"Block1")
50 visatt->SetColour(G4Colour(1., 0.5, 0.));
52 else if (
it.second ==
"Block2")
54 visatt->SetColour(G4Colour::Blue());
56 else if (
it.second ==
"Glass")
58 visatt->SetColour(G4Colour::White());
61 else if (
it.second ==
"Si")
63 visatt->SetColour(G4Colour::Green());
65 else if (
it.second ==
"Kapton")
67 visatt->SetColour(G4Colour::Brown());
69 else if (
it.second ==
"SIO2")
71 visatt->SetColour(G4Colour::Gray());
73 else if (
it.second ==
"Carbon")
75 visatt->SetColour(G4Colour::Black());
79 std::cout <<
"unknown logical volume " <<
it.second << std::endl;
82 logvol->SetVisAttributes(visatt);