58 visitor.visitCorrector(*
this);
66 return apply(R, P, t, E, B);
80 if (R(2) < stepSize) {
81 tau = R(2) / stepSize + 0.5;
104 if (pathLength < minLength) {
106 "Corrector::goOnline",
107 "length of corrector, L= " + std::to_string(pathLength)
108 +
", shorter than distance covered during one time step, dS= "
109 + std::to_string(minLength));
113 const double momentum = std::sqrt(
115 const double magnitude = momentum / (
Physics::c * pathLength);
131 const double momentum = std::sqrt(
133 const double magnitude = momentum / (
Physics::c * pathLength);
150 return ElementType::CORRECTOR;
PartBunch< PLayout_t< double, 3 >, double, 3 > PartBunch_t
ippl::Vector< T, Dim > Vector_t
constexpr double c
The velocity of light in m/s.
double getGamma(ippl::Vector< double, 3 > p)
Component(const std::string &name)
Constructor with given name.
PartBunch_t * 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 bool apply(const size_t &i, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B)
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.
Vector_t< double, 3 > kickField_m
virtual void setDesignEnergy(const double &ekin, bool changeable=true)
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField)
bool getFlagDeleteOnTransverseExit() const
virtual double getElementLength() const
Get design length.
bool isInsideTransverse(const Vector_t< double, 3 > &r) const
virtual double getElementLength() const
Get design length.