39 kickX_m(right.kickX_m),
40 kickY_m(right.kickY_m),
41 designEnergy_m(right.designEnergy_m),
42 designEnergyChangeable_m(right.designEnergyChangeable_m),
43 kickFieldSet_m(right.kickFieldSet_m),
44 kickField_m(right.kickField_m)
53 designEnergyChangeable_m(true),
54 kickFieldSet_m(false),
71 return apply(
R, P, t, E, B);
87 if (
R(2) < stepSize) {
88 tau =
R(2) / stepSize + 0.5;
111 if (pathLength < minLength) {
113 "length of corrector, L= " + std::to_string(pathLength) +
114 ", shorter than distance covered during one time step, dS= " + std::to_string(minLength));
119 const double magnitude = momentum / (
Physics::c * pathLength);
135 const double magnitude = momentum / (
Physics::c * pathLength);
Tps< T > pow(const Tps< T > &x, int y)
Integer power.
Tps< T > sqrt(const Tps< T > &x)
Square root.
constexpr double c
The velocity of light in m/s.
double getGamma(Vector_t p)
double getQ() const
Access to reference data.
ParticleAttrib< Vector_t > P
virtual void visitCorrector(const Corrector &)=0
Apply the algorithm to a closed orbit corrector.
Interface for a single beam element.
PartBunchBase< double, 3 > * RefPartBunch_m
Interface for general corrector.
virtual StraightGeometry & getGeometry()=0
Return the corrector geometry.
virtual void getDimensions(double &zBegin, double &zEnd) const
virtual void goOnline(const double &kineticEnergy)
virtual bool bends() const
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
virtual ElementType getType() const
Get element type std::string.
bool designEnergyChangeable_m
virtual void accept(BeamlineVisitor &) const
Apply a visitor to Corrector.
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
virtual void setDesignEnergy(const double &ekin, bool changeable=true)
bool getFlagDeleteOnTransverseExit() const
virtual double getElementLength() const
Get design length.
bool isInsideTransverse(const Vector_t &r) const
virtual double getElementLength() const
Get design length.
Vektor< double, 3 > Vector_t