18#include "BDSGlobalConstants.hh"
19#include "BDSMagUsualEqRhs.hh"
21#include "G4Mag_EqRhs.hh"
24#include "G4ClassicalRK4.hh"
25#include "G4ChargeState.hh"
26#include "G4MagneticField.hh"
27#include "G4SystemOfUnits.hh"
28#include "G4PhysicalConstants.hh"
29#include "BDSGlobalConstants.hh"
31BDSMagUsualEqRhs::BDSMagUsualEqRhs(G4MagneticField* MagField):
32 G4Mag_UsualEqRhs(MagField),
39 G4double particleMass)
41 G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, particleMass);
42 G4double pcharge = particleCharge.GetCharge();
44 fCof_val = pcharge*eplus*c_light ;
45 fMassCof = particleMass*particleMass;
50 G4ThreeVector mom = G4ThreeVector(y[3], y[4], y[5]);
51 G4double beta =
Beta(mom);
57 G4double momentum_mag_square = mom.mag2();
58 G4double Energy = std::sqrt(momentum_mag_square +
fMassCof);
59 G4double beta = std::sqrt(momentum_mag_square) / Energy;
65 G4ThreeVector mom = G4ThreeVector(y[3], y[4], y[5]);
72 G4double momentum_mag_square = mom.mag2();
73 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.