21#include "BDSIntegratorCavityFringe.hh"
23#include "BDSUtilities.hh"
26#include "G4Mag_EqRhs.hh"
27#include "G4PhysicalConstants.hh"
28#include "G4SystemOfUnits.hh"
30BDSIntegratorCavityFringe::BDSIntegratorCavityFringe(
BDSMagnetStrength const* strength,
32 G4double maximumRadiusIn):
34 phase((*strength)[
"phase"]),
35 efield((*strength)[
"efield"]),
36 isentrance((*strength)[
"isentrance"]),
39 rmat11 = (*strength)[
"rmat11"];
40 rmat21 = (*strength)[
"rmat21"];
41 rmat22 = (*strength)[
"rmat22"];
42 rmat33 = (*strength)[
"rmat33"];
43 rmat43 = (*strength)[
"rmat43"];
44 rmat44 = (*strength)[
"rmat44"];
47void BDSIntegratorCavityFringe::Stepper(
const G4double yIn[],
54 G4double charge =
eq->
FCof()/(eplus*c_light);
55 G4double gammaPrime = charge*efield*std::cos(phase) * CLHEP::m;
61 if (!(G4bool)isentrance)
70 BDSIntegratorRMatrixThin::Stepper(yIn,0,h,yOut,yErr);
BDSMagUsualEqRhs * eq
BDSIM's eqRhs class to give access to particle properties.
Integrator that just moves the particle parallel to the s axis.
Override G4Mag_UsualEqRhs, provides BDSIM integrators access to particle attributes.
G4double TotalEnergy(const G4double y[])
Calculate total particle energy.
G4double FCof() const
Accessor to variable for normalising to charge.
Efficient storage of magnet strengths.
G4bool IsFinite(G4double value, G4double tolerance=std::numeric_limits< double >::epsilon())