64 G4double momentum_mag_square = y[3]*y[3] + y[4]*y[4] + y[5]*y[5];
65 G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
67 G4double Energy = std::sqrt(momentum_mag_square + fMass*fMass);
69 G4double cof1 = inv_momentum_magnitude*fMass;
70 G4double inverse_velocity = Energy*inv_momentum_magnitude/c_light;
72 dydx[0] = y[3]*inv_momentum_magnitude;
73 dydx[1] = y[4]*inv_momentum_magnitude;
74 dydx[2] = y[5]*inv_momentum_magnitude;
76 dydx[3] = G[0]*cof1*cof2/c_light;
77 dydx[4] = G[1]*cof1*cof2/c_light;
78 dydx[5] = G[2]*cof1*cof2/c_light;
82 dydx[7] = inverse_velocity;