7 #include <Geant4/G4Colour.hh>
8 #include <Geant4/G4LogicalVolume.hh>
9 #include <Geant4/G4Material.hh>
10 #include <Geant4/G4NistManager.hh>
11 #include <Geant4/G4PVPlacement.hh>
12 #include <Geant4/G4RotationMatrix.hh>
13 #include <Geant4/G4ThreeVector.hh>
14 #include <Geant4/G4VisAttributes.hh>
16 #pragma GCC diagnostic push
17 #pragma GCC diagnostic ignored "-Wshadow"
18 #include <boost/stacktrace.hpp>
19 #pragma GCC diagnostic pop
23 , m_MySubsystem(subsys)
31 if (MyMotherSubsystem)
44 G4LogicalVolume *checksolid =
new G4LogicalVolume(volume, G4Material::GetMaterial(
"G4_POLYSTYRENE"),
"DISPLAYLOGICAL", 0, 0, 0);
51 G4VisAttributes *visattchk =
new G4VisAttributes();
52 visattchk->SetVisibility(
true);
53 visattchk->SetForceSolid(
false);
57 visattchk->SetColour(G4Colour::Red());
61 visattchk->SetColour(G4Colour::Magenta());
65 visattchk->SetColour(G4Colour::Yellow());
69 visattchk->SetColour(G4Colour::Blue());
73 visattchk->SetColour(G4Colour::Cyan());
77 visattchk->SetColour(G4Colour::Green());
82 checksolid->SetVisAttributes(visattchk);
83 new G4PVPlacement(rotm, G4ThreeVector(0, 0, 0), checksolid,
"DISPLAYVOL", logvol, 0,
false,
true);
89 G4Material *thismaterial = G4Material::GetMaterial(name,
false);
94 thismaterial = G4NistManager::Instance()->FindOrBuildMaterial(name);
101 std::cout <<
"PHG4Detector::GetDetectorMaterial: Could not locate " << name <<
" in NIST DB or create it" << std::endl;
102 std::cout << boost::stacktrace::stacktrace();
103 std::cout << std::endl;
104 std::cout <<
"read the above stack trace who is calling this material" << std::endl;
114 G4Element *thiselement = G4Element::GetElement(name,
false);
119 thiselement = G4NistManager::Instance()->FindOrBuildElement(name);
126 std::cout <<
"PHG4Detector::GetDetectorElement: Could not locate " << name <<
" in NIST DB or create it" << std::endl;
127 std::cout << boost::stacktrace::stacktrace();
128 std::cout << std::endl;
129 std::cout <<
"read the above stack trace who is calling this material" << std::endl;