3 #include <phparameter/PHParameters.h>
10 #include <Geant4/G4ChordFinder.hh>
11 #include <Geant4/G4ClassicalRK4.hh>
12 #include <Geant4/G4FieldManager.hh>
13 #include <Geant4/G4LogicalVolume.hh>
14 #include <Geant4/G4Mag_UsualEqRhs.hh>
15 #include <Geant4/G4MagneticField.hh>
16 #include <Geant4/G4PVPlacement.hh>
17 #include <Geant4/G4PhysicalConstants.hh>
18 #include <Geant4/G4QuadrupoleMagField.hh>
19 #include <Geant4/G4RotationMatrix.hh>
20 #include <Geant4/G4String.hh>
21 #include <Geant4/G4SystemOfUnits.hh>
22 #include <Geant4/G4ThreeVector.hh>
23 #include <Geant4/G4Transform3D.hh>
24 #include <Geant4/G4Tubs.hh>
25 #include <Geant4/G4Types.hh>
26 #include <Geant4/G4UniformMagField.hh>
27 #include <Geant4/G4VisAttributes.hh>
45 , magnet_physi(nullptr)
46 , cylinder_physi(nullptr)
68 fieldVis->SetVisibility(
false);
69 fieldVis->SetForceSolid(
false);
100 if (magnettype ==
"dipole")
106 cout <<
"Creating DIPOLE with field " << fieldValue <<
" and name " <<
GetName() << endl;
108 else if (magnettype ==
"quadrupole")
120 cout <<
"Creating QUADRUPOLE with gradient " << fieldGradient <<
" and name " <<
GetName() << endl;
121 cout <<
"at x, y, z = " <<
origin.x() <<
" , " <<
origin.y() <<
" , " <<
origin.z() << endl;
122 cout <<
"with rotation around x, y, z axis by: " << rotm->phiX() <<
", " << rotm->phiY() <<
", " << rotm->phiZ() << endl;
128 cout <<
PHWHERE <<
" Aborting, no magnetic field specified for " <<
GetName() << endl;
155 magnet_logic->SetVisAttributes(fieldVis);
159 magnet_logic->SetFieldManager(fieldMgr, allLocal);
179 cylinder_logic->SetVisAttributes(siliconVis);