6 #include <Geant4/G4Colour.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4String.hh>
9 #include <Geant4/G4VisAttributes.hh>
38 PHG4TpcColorDefs::tpc_cu_color};
42 G4LogicalVolume *logvol =
it.first;
43 if (logvol->GetVisAttributes())
47 G4VisAttributes *visatt =
new G4VisAttributes();
48 visatt->SetVisibility(
true);
49 visatt->SetForceSolid(
true);
51 if (
it.second ==
"TpcEnvelope")
53 visatt->SetVisibility(
false);
55 else if (
it.second ==
"TpcGas")
59 else if (
it.second ==
"TpcHoneyComb")
63 else if (
it.second ==
"TpcWindow")
69 std::cout <<
"did not assign specific color to " <<
it.first->GetName()
70 <<
" under " <<
it.second <<
". Defaulting to TpcWindow color." << std::endl;
76 logvol->SetVisAttributes(visatt);
80 G4VisAttributes *visatt =
new G4VisAttributes();
81 visatt->SetVisibility(
true);
82 visatt->SetForceSolid(
true);
84 visatt->SetColor(color[
i]);
89 G4VisAttributes *visatt =
new G4VisAttributes();
90 visatt->SetVisibility(
true);
91 visatt->SetForceSolid(
true);
93 visatt->SetColor(color[
i]);