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);
constexpr double c
The velocity of light in m/s.
double getGamma(Vector_t p)
virtual void visitCorrector(const Corrector &)=0
Apply the algorithm to a closed orbit corrector.
Component(const std::string &name)
Constructor with given name.
PartBunchBase< double, 3 > * RefPartBunch_m
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.
Corrector(const std::string &name)
Constructor with given name.
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