24 ElementEdge_m(right.ElementEdge_m),
25 startField_m(right.startField_m),
26 endField_m(right.endField_m)
74 (
R(2) + P(2) * recpgamma) < end) {
75 double frac = (end -
R(2)) / (P(2) * recpgamma);
77 lossDs_m->addParticle(R + frac * recpgamma * P,
89 endField = startField;
92 std::string filename =
getName();
ParticleAttrib< Vector_t > P
virtual void visitSource(const Source &)=0
Apply the algorithm to a source.
virtual void getDimensions(double &zBegin, double &zEnd) const override
virtual void goOnline(const double &kineticEnergy) override
virtual const std::string & getName() const
Get element name.
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) override
double getGamma(Vector_t p)
virtual bool bends() const override
void setElType(ElemType elt)
set the element type as enumeration needed in the envelope tracker
virtual double getElementLength() const
Get design length.
constexpr double c
The velocity of light in m/s.
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
PartBunchBase< double, 3 > * RefPartBunch_m
virtual void addKR(int i, double t, Vector_t &K) override
ENVELOPE COMPONENT for radial focussing of the beam Calculates the transverse envelope component for ...
virtual ElementBase::ElementType getType() const override
Get element type std::string.
ParticleAttrib< double > dt
virtual void addKT(int i, double t, Vector_t &K) override
std::unique_ptr< LossDataSink > lossDs_m
virtual void finalise() override
Interface for a single beam element.
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Source.
virtual void goOffline() override