102 G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
104 G4double Energy = std::sqrt( pSquared + fMassCof );
107 G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
109 G4double inverse_velocity = Energy * pModuleInverse / c_light;
111 G4double cof1 = fElectroMagCof*pModuleInverse ;
113 dydx[0] = y[3]*pModuleInverse ;
114 dydx[1] = y[4]*pModuleInverse ;
115 dydx[2] = y[5]*pModuleInverse ;
117 dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
119 dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ;
121 dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;
123 dydx[6] = dydx[8] = 0.;
126 dydx[7] = inverse_velocity;
136 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
137 G4double ucb = (anomaly+1./gamma)/beta;
138 G4double uce = anomaly + 1./(gamma+1.);
153 if (Spin.mag2() != 0.)
155 dSpin = pcharge*omegac*( ucb*(Spin.cross(BField))-udb*(Spin.cross(u))
159 - uce*(u*(Spin*EField) - EField*(Spin*u)) );
162 dydx[ 9] = dSpin.
x();
163 dydx[10] = dSpin.
y();
164 dydx[11] = dSpin.
z();