47 spin(0.), fElectroMagCof(0.), fMassCof(0.), omegac(0.),
48 anomaly(0.0011659208), beta(0.), gamma(0.)
64 spin = particleCharge.
GetSpin();
69 omegac = (
eplus/mass)*c_light;
74 if ( spin != 0. ) g_BMT = (std::abs(magMoment)/muB)/spin;
77 anomaly = (g_BMT - 2.)/2.;
107 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
109 G4double Energy = std::sqrt( pSquared + fMassCof );
112 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
116 G4double cof1 = fElectroMagCof*pModuleInverse ;
118 dydx[0] = y[3]*pModuleInverse ;
119 dydx[1] = y[4]*pModuleInverse ;
120 dydx[2] = y[5]*pModuleInverse ;
122 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
124 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
126 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
128 dydx[6] = dydx[8] = 0.;
131 dydx[7] = inverse_velocity;
141 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
142 G4double ucb = (anomaly+1./gamma)/beta;
143 G4double uce = anomaly + 1./(gamma+1.);
148 if (charge == 0.) pcharge = 1.;
149 else pcharge = charge;
152 if (Spin.
mag2() != 0.) {
154 pcharge*omegac*( ucb*(Spin.
cross(BField))-udb*(Spin.
cross(u))
158 - uce*(u*(Spin*EField) - EField*(Spin*u)) );
161 dydx[ 9] = dSpin.
x();
162 dydx[10] = dSpin.
y();
163 dydx[11] = dSpin.
z();
G4double GetCharge() const
G4EqEMFieldWithSpin(G4ElectroMagneticField *emField)
static constexpr double eplus
static constexpr double c_squared
void EvaluateRhsGivenB(const G4double y[], const G4double Field[], G4double dydx[]) const
static constexpr double c_light
G4double GetMagneticDipoleMoment() const
Hep3Vector cross(const Hep3Vector &) const
static constexpr double hbar_Planck
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass)