17 #include <phparameter/PHParameters.h>
21 #include <Geant4/G4AssemblyVolume.hh>
22 #include <Geant4/G4GDMLParser.hh>
23 #include <Geant4/G4GDMLReadStructure.hh>
24 #include <Geant4/G4LogicalVolume.hh>
25 #include <Geant4/G4Material.hh>
26 #include <Geant4/G4PVPlacement.hh>
27 #include <Geant4/G4RotationMatrix.hh>
28 #include <Geant4/G4String.hh>
29 #include <Geant4/G4SystemOfUnits.hh>
30 #include <Geant4/G4ThreeVector.hh>
31 #include <Geant4/G4VPhysicalVolume.hh>
32 #include <Geant4/G4VisAttributes.hh>
46 , m_GDMPath(parameters->get_string_param(
"GDMPath"))
47 , m_TopVolName(parameters->get_string_param(
"TopVolName"))
48 , m_placeX(parameters->get_double_param(
"place_x") *
cm)
49 , m_placeY(parameters->get_double_param(
"place_y") *
cm)
50 , m_placeZ(parameters->get_double_param(
"place_z") *
cm)
51 , m_rotationX(parameters->get_double_param(
"rot_x") *
degree)
52 , m_rotationY(parameters->get_double_param(
"rot_y") *
degree)
53 , m_rotationZ(parameters->get_double_param(
"rot_z") *
degree)
54 , m_skipDSTGeometryExport(parameters->get_int_param(
"skip_DST_geometry_export"))
55 , gdml_config(nullptr)
85 cout <<
" PHG4MapsDetector::Construct:";
107 cout <<
"PHG4GDMLDetector::Construct - Fatal Error - failed to find G4LogicalVolume " <<
m_TopVolName <<
" - Print: ";
144 for (
int i = 0; i < nDaughters; ++i, ++
it)
156 string material_name(
160 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" built with "
161 << material_name << endl;
164 if (material_name.find(
"SI") != std::string::npos)
170 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with G4_Si" << endl;
172 else if (material_name.find(
"KAPTON") != std::string::npos)
178 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with G4_KAPTON" << endl;
180 else if (material_name.find(
"ALUMINUM") != std::string::npos)
186 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with G4_Al" << endl;
188 else if (material_name.find(
"Carbon") != std::string::npos)
194 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with Gray" << endl;
196 else if (material_name.find(
"M60J3K") != std::string::npos)
198 matVis->
SetColour(0.25, 0.25, 0.25, .25);
202 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with Gray" << endl;
204 else if (material_name.find(
"WATER") != std::string::npos)
210 cout <<
"SetDisplayProperty - LV " << lv->
GetName() <<
" display with WATER" << endl;
221 for (
int i = 0; i < nDaughters; ++i)