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>
37 , m_Params(parameters)
38 , m_CylinderPhysicalVolume(nullptr)
63 if (!isfinite(radius) || !isfinite(thickness) || !isfinite(length))
66 cout <<
"Radius: " << radius << endl;
67 cout <<
"Thickness: " << thickness << endl;
68 cout <<
"Length: " << length << endl;
71 G4VSolid *cylinder_solid =
new G4Tubs(G4String(
GetName()),
74 length / 2., 0,
twopi);
76 G4UserLimits *g4userlimits =
nullptr;
77 if (isfinite(steplimits))
79 g4userlimits =
new G4UserLimits(steplimits);
82 G4LogicalVolume *cylinder_logic =
new G4LogicalVolume(cylinder_solid,
85 nullptr,
nullptr, g4userlimits);
89 G4RotationMatrix *rotm =
new G4RotationMatrix();
109 cout <<__PRETTY_FUNCTION__<<
": Warning : " <<
GetName()<<
" is configured with more than one of the x-y-z rotations of "
113 <<
"The rotation is instruction is ambiguous and they are performed in the order of X->Y->Z rotations with result rotation matrix of:";