6 #include <Geant4/G4Colour.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4Material.hh>
9 #include <Geant4/G4VisAttributes.hh>
36 if (
it->GetVisAttributes())
42 G4VisAttributes *VisAtt =
new G4VisAttributes();
43 m_VisAttVec.push_back(VisAtt);
44 VisAtt->SetVisibility(
true);
45 VisAtt->SetForceSolid(
true);
46 if (
it->GetMaterial()->GetName().find(
"air") != string::npos)
48 VisAtt->SetVisibility(
false);
49 VisAtt->SetForceSolid(
false);
51 else if (
it->GetMaterial()->GetName().find(
"CarbonFiber") != string::npos)
53 VisAtt->SetColour(G4Colour::Grey());
55 else if (
it->GetMaterial()->GetName().find(
"Kapton") != string::npos)
57 VisAtt->SetColour(G4Colour::Green());
59 else if (
it->GetMaterial()->GetName().find(
"water") != string::npos)
61 VisAtt->SetColour(G4Colour::Blue());
63 else if (
it->GetMaterial()->GetName().find(
"silicon") != string::npos)
65 VisAtt->SetColour(G4Colour::Cyan());
67 else if (
it->GetMaterial()->GetName().find(
"aluminum") != string::npos)
69 VisAtt->SetColour(G4Colour::Yellow());
71 else if (
it->GetMaterial()->GetName().find(
"beryllium") != string::npos)
73 VisAtt->SetColour(G4Colour::Red());
77 VisAtt->SetColour(G4Colour::Red());
80 it->SetVisAttributes(VisAtt);