46 :
G4Mag_EqRhs( MagField ), charge(0.), mass(0.), magMoment(0.),
47 spin(0.), omegac(0.), anomaly(0.0011659208), beta(0.), gamma(0.)
65 spin = particleCharge.
GetSpin();
72 if ( spin != 0. ) g_BMT = (std::abs(magMoment)/muB)/spin;
75 anomaly = (g_BMT - 2.)/2.;
88 G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
91 dydx[0] = y[3] * inv_momentum_magnitude;
92 dydx[1] = y[4] * inv_momentum_magnitude;
93 dydx[2] = y[5] * inv_momentum_magnitude;
100 dydx[3] = cof*(y[4]*B[2] - y[5]*B[1]) ;
101 dydx[4] = cof*(y[5]*B[0] - y[3]*B[2]) ;
102 dydx[5] = cof*(y[3]*B[1] - y[4]*B[0]) ;
106 u *= inv_momentum_magnitude;
110 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
111 G4double ucb = (anomaly+1./gamma)/beta;
114 dydx[6] = dydx[7] = dydx[8] = 0.0;
119 if (charge == 0.) pcharge = 1.;
120 else pcharge = charge;
123 if (Spin.
mag2() != 0.) {
124 dSpin = pcharge*omegac*(ucb*(Spin.
cross(BField))-udb*(Spin.
cross(u)));
127 dydx[ 9] = dSpin.
x();
128 dydx[10] = dSpin.
y();
129 dydx[11] = dSpin.
z();
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass)
G4double GetCharge() const
double B(double temperature)
static constexpr double eplus
virtual void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass)
static constexpr double c_squared
static constexpr double c_light
G4double GetMagneticDipoleMoment() const
Hep3Vector cross(const Hep3Vector &) const
G4Mag_SpinEqRhs(G4MagneticField *MagField)
static constexpr double hbar_Planck
void EvaluateRhsGivenB(const G4double y[], const G4double B[3], G4double dydx[]) const