19#include "BDSGlobalConstants.hh"
20#include "BDSIntegratorMag.hh"
21#include "BDSMagnetStrength.hh"
23#include "BDSUtilities.hh"
26#include "G4ClassicalRK4.hh"
34 G4MagIntegratorStepper(eqOfMIn, nVariablesIn),
36 nVariables(nVariablesIn),
40 backupStepper =
new G4ClassicalRK4(eqOfMIn, nVariablesIn);
43 if (thinElementLength < 0)
46 if (nominalMatrixRelativeMomCut < 0)
50BDSIntegratorMag::~BDSIntegratorMag()
56 const G4ThreeVector& localMom,
59 const G4double momScaling)
64 globalMom*=momScaling;
66 yOut[0] = globalPos.x();
67 yOut[1] = globalPos.y();
68 yOut[2] = globalPos.z();
70 yOut[3] = globalMom.x();
71 yOut[4] = globalMom.y();
72 yOut[5] = globalMom.z();
75 const G4double standardError = 1e-8;
76 G4ThreeVector momUnit = globalMom.unit();
77 momUnit *= standardError;
78 for (G4int i = 0; i < 3; i++)
BDSStep ConvertToGlobalStep(const G4ThreeVector &localPosition, const G4ThreeVector &localDirection, const G4bool useCurvilinear=true) const
static BDSGlobalConstants * Instance()
Access method.
static G4double nominalMatrixRelativeMomCut
static G4double thinElementLength
static G4bool currentTrackIsPrimary
void ConvertToGlobal(const G4ThreeVector &localPos, const G4ThreeVector &localMom, G4double yOut[], G4double yErr[], const G4double momScaling=1.0)
scaling of momentum in case localMom is a unit vector
G4MagIntegratorStepper * backupStepper
BDSIntegratorMag()=delete
Private default constructor to force use of specific constructor.
A simple class to represent the positions of a step.
G4ThreeVector PostStepPoint() const
Accessor.
G4ThreeVector PreStepPoint() const
Accessor.