4 #include <phparameter/PHParameters.h>
13 #include <Geant4/G4ChordFinder.hh>
14 #include <Geant4/G4ClassicalRK4.hh>
15 #include <Geant4/G4FieldManager.hh>
16 #include <Geant4/G4LogicalVolume.hh>
17 #include <Geant4/G4Mag_UsualEqRhs.hh>
18 #include <Geant4/G4MagneticField.hh>
19 #include <Geant4/G4Material.hh>
20 #include <Geant4/G4PVPlacement.hh>
21 #include <Geant4/G4PhysicalConstants.hh>
22 #include <Geant4/G4QuadrupoleMagField.hh>
23 #include <Geant4/G4RotationMatrix.hh>
24 #include <Geant4/G4String.hh>
25 #include <Geant4/G4SystemOfUnits.hh>
26 #include <Geant4/G4ThreeVector.hh>
27 #include <Geant4/G4Transform3D.hh>
28 #include <Geant4/G4Tubs.hh>
29 #include <Geant4/G4Types.hh>
30 #include <Geant4/G4UniformMagField.hh>
31 #include <Geant4/G4VisAttributes.hh>
48 , magnet_physi(nullptr)
49 , magnet_iron_physi(nullptr)
88 if (magnettype ==
"DIPOLE")
98 cout <<
"Creating DIPOLE with field x: " << field.x() /
tesla
99 <<
", y: " << field.y() /
tesla
100 <<
", z: " << field.z()/
tesla
101 <<
" and name " <<
GetName() << endl;
104 else if (magnettype ==
"QUADRUPOLE")
115 cout <<
"Creating QUADRUPOLE with gradient " << fieldGradient <<
" and name " <<
GetName() << endl;
116 cout <<
"at x, y, z = " <<
origin.x() <<
" , " <<
origin.y() <<
" , " <<
origin.z() << endl;
117 cout <<
"with rotation around x, y, z axis by: " << rotm->phiX() <<
", " << rotm->phiY() <<
", " << rotm->phiZ() << endl;
123 cout <<
PHWHERE <<
" No magnetic field specified for " <<
GetName()
124 <<
" of type " << magnettype << endl;
165 magnet_logic->SetFieldManager(fieldMgr,
true);