4 #include <phparameter/PHParameters.h>
12 #include <Geant4/G4LogicalVolume.hh>
13 #include <Geant4/G4PVPlacement.hh>
14 #include <Geant4/G4PhysicalConstants.hh>
15 #include <Geant4/G4RotationMatrix.hh>
16 #include <Geant4/G4String.hh>
17 #include <Geant4/G4SystemOfUnits.hh>
18 #include <Geant4/G4ThreeVector.hh>
19 #include <Geant4/G4Tubs.hh>
20 #include <Geant4/G4UserLimits.hh>
35 , m_Params(parameters)
36 , m_CylinderPhysicalVolume(nullptr)
65 if (!std::isfinite(radius) || !std::isfinite(thickness) || !std::isfinite(length))
67 std::cout <<
PHWHERE <<
": Bad Parameters for " <<
GetName() << std::endl;
68 std::cout <<
"Radius: " << radius << std::endl;
69 std::cout <<
"Thickness: " << thickness << std::endl;
70 std::cout <<
"Length: " << length << std::endl;
73 G4VSolid *cylinder_solid =
new G4Tubs(G4String(
GetName()),
76 length / 2., start_phi_rad, delta_phi_rad);
78 G4UserLimits *g4userlimits =
nullptr;
79 if (std::isfinite(steplimits))
81 g4userlimits =
new G4UserLimits(steplimits);
84 G4LogicalVolume *cylinder_logic =
new G4LogicalVolume(cylinder_solid,
87 nullptr,
nullptr, g4userlimits);
91 G4RotationMatrix *rotm =
new G4RotationMatrix();
111 std::cout << __PRETTY_FUNCTION__ <<
": Warning : " <<
GetName() <<
" is configured with more than one of the x-y-z rotations of "
115 <<
"The rotation is instruction is ambiguous and they are performed in the order of X->Y->Z rotations with result rotation matrix of:";
116 rotm->print(std::cout);