35 kickX_m(right.kickX_m),
36 kickY_m(right.kickY_m),
37 designEnergy_m(right.designEnergy_m),
38 designEnergyChangeable_m(right.designEnergyChangeable_m),
39 kickFieldSet_m(right.kickFieldSet_m),
40 kickField_m(right.kickField_m) {}
47 designEnergyChangeable_m(true),
48 kickFieldSet_m(false),
60 return apply(R, P, t, E, B);
73 if (R(2) < stepSize) {
74 tau = R(2) / stepSize + 0.5;
96 if (pathLength < minLength) {
98 "Corrector::goOnline",
99 "length of corrector, L= " + std::to_string(pathLength)
100 +
", shorter than distance covered during one time step, dS= "
101 + std::to_string(minLength));
106 const double momentum = std::sqrt(
108 const double magnitude = momentum / (
Physics::c * pathLength);
125 const double momentum = std::sqrt(
127 const double magnitude = momentum / (
Physics::c * pathLength);
ippl::Vector< T, Dim > Vector_t
Template PIC bunch: IPPL PicManager, shared field mesh/solver, and multiple particle containers.
PartBunch_t * RefPartBunch_m
Interface for general corrector.
virtual StraightGeometry & getGeometry()=0
Return the corrector geometry.
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)
Apply to particle i.
virtual ElementType getType() const
Get element type std::string.
bool designEnergyChangeable_m
virtual void accept(BeamlineVisitor &) const
Apply a visitor to Corrector.
Vector_t< double, 3 > kickField_m
virtual void getFieldExtend(double &zBegin, double &zEnd) const
Return the field-support extent of the component.
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
Vector_t< double, Dim > R(size_t)
Do not use; throws (access positions via ParticleContainer::R).
double getdT() const
Get the global time step.
Vector_t< double, Dim > P(size_t)
Do not use; throws (access momenta via ParticleContainer::P).
virtual double getElementLength() const
Get design length.
constexpr double c
The velocity of light in m/s.
double getGamma(ippl::Vector< double, 3 > p)