10 #include <Geant4/G4LogicalVolume.hh>
11 #include <Geant4/G4String.hh>
12 #include <Geant4/G4VisAttributes.hh>
36 G4LogicalVolume *logvol =
it.first;
37 if (logvol->GetVisAttributes())
41 G4VisAttributes *visatt =
new G4VisAttributes();
42 visatt->SetVisibility(
true);
43 visatt->SetForceSolid(
true);
44 visatt->SetForceWireframe(
false);
47 if (
it.second ==
"AzimuthSegment")
49 visatt->SetColor(.1, .1, .1, .5);
51 visatt->SetForceSolid(
false);
53 else if (
it.second ==
"Block")
55 visatt->SetColor(.3, .3, .3, .3);
59 else if (
it.second ==
"Divider")
61 visatt->SetColor(.8, 1, .8, .3);
64 else if (
it.second ==
"Fiber")
70 else if (
it.second ==
"FiberCore")
73 visatt->SetVisibility(
false);
74 visatt->SetForceSolid(
false);
76 else if (
it.second ==
"LightGuide")
79 visatt->SetColor(.8, 1, .8, .3);
83 else if (
it.second ==
"Sector")
85 visatt->SetColor(.5, .9, .5, .5);
87 visatt->SetForceSolid(
false);
88 visatt->SetForceWireframe(
true);
90 else if (
it.second ==
"SpacalCylinder")
95 else if (
it.second ==
"Wall")
97 visatt->SetColor(.5, .9, .5, .1);
100 else if (
it.second ==
"WallProj")
102 visatt->SetColor(.5, .9, .5, .2);
107 std::cout <<
"did not assing color to " <<
it.first->GetName()
108 <<
" under " <<
it.second << std::endl;
111 logvol->SetVisAttributes(visatt);