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 ==
"CarbonShell")
46 visatt->SetColour(G4Colour::Black());
48 else if (
it.second ==
"Crystal")
50 visatt->SetColour(G4Colour::Cyan());
52 else if (
it.second ==
"Envelope")
54 visatt->SetVisibility(
false);
56 else if (
it.second ==
"Invisible")
58 visatt->SetVisibility(
false);
60 else if (
it.second ==
"TwoByTwo")
62 visatt->SetColour(G4Colour::Gray());
66 cout <<
"unknown logical volume " <<
it.second << endl;
69 logvol->SetVisAttributes(visatt);