44 spin(0.), fElectroMagCof(0.), fMassCof(0.), omegac(0.),
45 anomaly(0.0011659208), eta(0.), beta(0.), gamma(0.)
61 spin = particleCharge.
GetSpin();
63 fElectroMagCof = eplus*charge*c_light;
66 omegac = (eplus/mass)*c_light;
68 G4double muB = 0.5*eplus*hbar_Planck/(mass/c_squared);
71 if ( spin != 0. ) g_BMT = (std::abs(magMoment)/muB)/spin;
74 anomaly = (g_BMT - 2.)/2.;
113 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
115 G4double Energy = std::sqrt( pSquared + fMassCof );
118 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
120 G4double inverse_velocity = Energy * pModuleInverse / c_light;
122 G4double cof1 = fElectroMagCof*pModuleInverse ;
124 dydx[0] = y[3]*pModuleInverse ;
125 dydx[1] = y[4]*pModuleInverse ;
126 dydx[2] = y[5]*pModuleInverse ;
128 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
130 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
132 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
134 dydx[6] = dydx[8] = 0.;
137 dydx[7] = inverse_velocity;
147 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
148 G4double ucb = (anomaly+1./gamma)/beta;
149 G4double uce = anomaly + 1./(gamma+1.);
150 G4double ude = beta*gamma/(1.+gamma)*(EField*u);
155 if (charge == 0.) pcharge = 1.;
156 else pcharge = charge;
159 if (Spin.mag2() != 0.)
161 dSpin = pcharge*omegac*( ucb*(Spin.cross(BField))-udb*(Spin.cross(u))
165 - uce*(u*(Spin*EField) - EField*(Spin*u))
166 + eta/2.*(Spin.cross(EField) - ude*(Spin.cross(u))
168 + (u*(Spin*BField) - BField*(Spin*u)) ) );
171 dydx[ 9] = dSpin.
x();
172 dydx[10] = dSpin.
y();
173 dydx[11] = dSpin.
z();
G4double GetCharge() const
G4double GetMagneticDipoleMoment() const
void EvaluateRhsGivenB(const G4double y[], const G4double Field[], G4double dydx[]) const
G4EqEMFieldWithEDM(G4ElectroMagneticField *emField)
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass)