19#include "BDSGlobalConstants.hh"
20#include "BDSMagUsualEqRhs.hh"
22#include "G4Mag_EqRhs.hh"
25#include "G4ClassicalRK4.hh"
26#include "G4ChargeState.hh"
27#include "G4MagneticField.hh"
28#include "G4SystemOfUnits.hh"
29#include "G4PhysicalConstants.hh"
30#include "BDSGlobalConstants.hh"
32BDSMagUsualEqRhs::BDSMagUsualEqRhs(G4MagneticField* MagField):
33 G4Mag_UsualEqRhs(MagField),
40 G4double particleMass)
42 G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, particleMass);
43 G4double pcharge = particleCharge.GetCharge();
45 fCof_val = pcharge*eplus*c_light ;
46 fMassCof = particleMass*particleMass;
51 G4ThreeVector mom = G4ThreeVector(y[3], y[4], y[5]);
52 G4double beta =
Beta(mom);
58 G4double momentum_mag_square = mom.mag2();
59 G4double Energy = std::sqrt(momentum_mag_square +
fMassCof);
60 G4double beta = std::sqrt(momentum_mag_square) / Energy;
66 G4ThreeVector mom = G4ThreeVector(y[3], y[4], y[5]);
73 G4double momentum_mag_square = mom.mag2();
74 G4double Energy = std::sqrt(momentum_mag_square +
fMassCof);
G4double fMassCof
Particle mass squared.
G4double TotalEnergy(const G4double y[])
Calculate total particle energy.
G4double Beta(const G4double y[6])
Calculate particle velocity W.R.T speed of light.
virtual void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double particleMass)
Copy of class method from G4Mag_UsualEqRhs.