13 #include <simulation/monopoles/G4MonopoleEquation.h>
16 #include <CLHEP/Units/PhysicalConstants.h>
17 #include <CLHEP/Units/SystemOfUnits.h>
21 using namespace Belle2::Monopoles;
22 using namespace CLHEP;
24 G4MonopoleEquation::G4MonopoleEquation(G4MagneticField* mField)
25 : G4EquationOfMotion(mField)
34 G4double particleMass)
36 G4double particleMagneticCharge = particleChargeState.MagneticCharge();
37 G4double particleElectricCharge = particleChargeState.GetCharge();
40 fElCharge = eplus * particleElectricCharge * c_light;
42 fMagCharge = eplus * particleMagneticCharge * c_light ;
44 fMassCof = particleMass * particleMass ;
49 const G4double Field[],
50 G4double dydx[])
const
56 G4double pSquared = y[3] * y[3] + y[4] * y[4] + y[5] * y[5] ;
58 G4double Energy = std::sqrt(pSquared +
fMassCof);
60 G4double pModuleInverse = 1.0 / std::sqrt(pSquared);
62 G4double inverse_velocity = Energy * pModuleInverse / c_light;
64 G4double cofEl =
fElCharge * pModuleInverse ;
65 G4double cofMag =
fMagCharge * Energy * pModuleInverse;
68 dydx[0] = y[3] * pModuleInverse ;
69 dydx[1] = y[4] * pModuleInverse ;
70 dydx[2] = y[5] * pModuleInverse ;
82 dydx[3] = cofMag * Field[0] + cofEl * (y[4] * Field[2] - y[5] * Field[1]);
83 dydx[4] = cofMag * Field[1] + cofEl * (y[5] * Field[0] - y[3] * Field[2]);
84 dydx[5] = cofMag * Field[2] + cofEl * (y[3] * Field[1] - y[4] * Field[0]);
100 dydx[7] = inverse_velocity;