10 #include <Geant4/G4LogicalVolume.hh>
11 #include <Geant4/G4String.hh>
12 #include <Geant4/G4VisAttributes.hh>
39 G4LogicalVolume *logvol =
it.first;
40 if (logvol->GetVisAttributes())
44 G4VisAttributes *visatt =
new G4VisAttributes();
45 visatt->SetVisibility(
true);
46 visatt->SetForceSolid(
true);
47 visatt->SetForceWireframe(
false);
50 if (
it.second ==
"AzimuthSegment")
52 visatt->SetColor(.1, .1, .1, .5);
54 visatt->SetForceSolid(
false);
56 else if (
it.second ==
"Block")
58 visatt->SetColor(.3, .3, .3, .3);
62 else if (
it.second ==
"Divider")
64 visatt->SetColor(.8, 1, .8, .3);
67 else if (
it.second ==
"Fiber")
73 else if (
it.second ==
"FiberCore")
76 visatt->SetVisibility(
false);
77 visatt->SetForceSolid(
false);
79 else if (
it.second ==
"LightGuide")
82 visatt->SetColor(.8, 1, .8, .3);
86 else if (
it.second ==
"Sector")
88 visatt->SetColor(.5, .9, .5, .5);
90 visatt->SetForceSolid(
false);
91 visatt->SetForceWireframe(
true);
93 else if (
it.second ==
"SpacalCylinder")
98 else if (
it.second ==
"Wall")
100 visatt->SetColor(.5, .9, .5, .1);
103 else if (
it.second ==
"WallProj")
105 visatt->SetColor(.5, .9, .5, .2);
110 cout <<
"did not assing color to " <<
it.first->GetName()
111 <<
" under " <<
it.second << endl;
114 logvol->SetVisAttributes(visatt);