47 omegac(0.), anomaly(0.0011659208), pcharge(0.), E(0.), gamma(0.), beta(0.)
60 fElectroMagCof = eplus*particleCharge*c_light ;
61 fMassCof = particleMass*particleMass ;
63 omegac = (eplus/particleMass)*c_light;
65 pcharge = particleCharge;
67 E = std::sqrt(
sqr(MomentumXc)+
sqr(particleMass));
69 gamma = E/particleMass;
96 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
98 G4double Energy = std::sqrt( pSquared + fMassCof );
101 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
103 G4double inverse_velocity = Energy * pModuleInverse / c_light;
105 G4double cof1 = fElectroMagCof*pModuleInverse ;
107 dydx[0] = y[3]*pModuleInverse ;
108 dydx[1] = y[4]*pModuleInverse ;
109 dydx[2] = y[5]*pModuleInverse ;
111 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
113 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
115 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
117 dydx[6] = dydx[8] = 0.;
120 dydx[7] = inverse_velocity;
130 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
131 G4double ucb = (anomaly+1./gamma)/beta;
132 G4double uce = anomaly + 1./(gamma+1.);
137 = pcharge*omegac*( ucb*(Spin.
cross(BField))-udb*(Spin.
cross(u))
141 - uce*(u*(Spin*EField) - EField*(Spin*u)) );
143 dydx[ 9] = dSpin.
x();
144 dydx[10] = dSpin.
y();
145 dydx[11] = dSpin.
z();
Hep3Vector cross(const Hep3Vector &) const
G4EqEMFieldWithSpin(G4ElectroMagneticField *emField)
void EvaluateRhsGivenB(const G4double y[], const G4double Field[], G4double dydx[]) const
void SetChargeMomentumMass(G4double particleCharge, G4double MomentumXc, G4double mass)