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 #include <boost/stacktrace.hpp>
20 , m_MySubsystem(subsys)
28 if (MyMotherSubsystem)
41 G4LogicalVolume *checksolid =
new G4LogicalVolume(volume, G4Material::GetMaterial(
"G4_POLYSTYRENE"),
"DISPLAYLOGICAL", 0, 0, 0);
48 G4VisAttributes *visattchk =
new G4VisAttributes();
49 visattchk->SetVisibility(
true);
50 visattchk->SetForceSolid(
false);
54 visattchk->SetColour(G4Colour::Red());
58 visattchk->SetColour(G4Colour::Magenta());
62 visattchk->SetColour(G4Colour::Yellow());
66 visattchk->SetColour(G4Colour::Blue());
70 visattchk->SetColour(G4Colour::Cyan());
74 visattchk->SetColour(G4Colour::Green());
79 checksolid->SetVisAttributes(visattchk);
80 new G4PVPlacement(rotm, G4ThreeVector(0, 0, 0), checksolid,
"DISPLAYVOL", logvol, 0,
false,
true);
86 G4Material *thismaterial = G4Material::GetMaterial(name,
false);
91 thismaterial = G4NistManager::Instance()->FindOrBuildMaterial(name);
98 std::cout <<
"PHG4Detector::GetDetectorMaterial: Could not locate " << name <<
" in NIST DB or create it" << std::endl;
99 std::cout << boost::stacktrace::stacktrace();
100 std::cout << std::endl;
101 std::cout <<
"read the above stack trace who is calling this material" << std::endl;
111 G4Element *thiselement = G4Element::GetElement(name,
false);
116 thiselement = G4NistManager::Instance()->FindOrBuildElement(name);
123 std::cout <<
"PHG4Detector::GetDetectorElement: Could not locate " << name <<
" in NIST DB or create it" << std::endl;
124 std::cout << boost::stacktrace::stacktrace();
125 std::cout << std::endl;
126 std::cout <<
"read the above stack trace who is calling this material" << std::endl;