46 G4double momentum_mag_square = y[3]*y[3] + y[4]*y[4] + y[5]*y[5];
47 G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
51 dydx[0] = y[3]*inv_momentum_magnitude;
52 dydx[1] = y[4]*inv_momentum_magnitude;
53 dydx[2] = y[5]*inv_momentum_magnitude;
55 dydx[3] = cof*(y[4]*
B[2] - y[5]*
B[1]) ;
56 dydx[4] = cof*(y[5]*
B[0] - y[3]*
B[2]) ;
57 dydx[5] = cof*(y[3]*
B[1] - y[4]*
B[0]) ;
G4double B(G4double temperature)
G4ChargeState is a container for magnetic charge and moments.
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass) override
G4Mag_EqRhs(G4MagneticField *magField)
G4Mag_UsualEqRhs(G4MagneticField *MagField)
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass) override
void EvaluateRhsGivenB(const G4double y[], const G4double B[3], G4double dydx[]) const override