6 #include <Geant4/G4LogicalVolume.hh>
7 #include <Geant4/G4VisAttributes.hh>
30 G4LogicalVolume *logvol =
it.first;
31 if (logvol->GetVisAttributes())
35 G4VisAttributes *visatt =
new G4VisAttributes();
37 if (
it.second ==
"Carbon")
39 visatt->SetColour(0.5, 0.5, 0.5, .25);
41 else if (
it.second ==
"MVTX_CarbonFiber$")
43 visatt->SetColour(0.4, 0.4, 0.4, 1);
45 else if (
it.second ==
"M60J3K")
47 visatt->SetColour(0.25, 0.25, 0.25, .25);
49 else if (
it.second ==
"WATER" ||
it.second ==
"G4_WATER")
51 visatt->SetColour(0.0, 0.5, 0.0, .25);
53 else if (
it.second ==
"SI")
57 else if (
it.second ==
"KAPTON")
61 else if (
it.second ==
"ALUMINUM")
65 else if (
it.second ==
"G4_Cu")
69 else if (
it.second ==
"G4_POLYETHYLENE")
71 visatt->SetColour(0., 0., 0., 1.);
73 else if (
it.second ==
"red")
75 visatt->SetColour(1., 0., 0., 1.);
77 else if (
it.second ==
"green")
79 visatt->SetColour(0., 1., 0., 1.);
81 else if (
it.second ==
"blue")
83 visatt->SetColour(0., 0., 1., 1.);
85 else if (
it.second ==
"black")
87 visatt->SetColour(0., 0., 0., 1.);
89 else if (
it.second ==
"white")
91 visatt->SetColour(1., 1., 1., 1.);
95 visatt->SetColour(.2, .2, .7, .25);
97 visatt->SetVisibility(
true);
98 visatt->SetForceSolid(
true);
99 logvol->SetVisAttributes(visatt);