39 startField_m(right.startField_m),
40 endField_m(right.endField_m),
41 isTransparent_m(right.isTransparent_m)
48 isTransparent_m(false)
67 if (
online_m &&
R(2) <= 0.0 && P(2) < 0.0) {
70 double frac = -
R(2) / singleStep(2);
73 R + frac * singleStep, P,
85 endField = startField;
constexpr double c
The velocity of light in m/s.
Vector_t getBeta(Vector_t p)
ParticleAttrib< double > M
ParticleAttrib< Vector_t > P
ParticleAttrib< double > Q
ParticleAttrib< double > dt
virtual void visitSource(const Source &)=0
Apply the algorithm to a source.
Interface for a single beam element.
PartBunchBase< double, 3 > * RefPartBunch_m
virtual double getElementLength() const
Get design length.
std::string getOutputFN() const
Get output filename.
virtual void getDimensions(double &zBegin, double &zEnd) const override
virtual void goOffline() override
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Source.
virtual ElementType getType() const override
Get element type std::string.
virtual void goOnline(const double &kineticEnergy) override
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
virtual bool bends() const override
virtual void finalise() override
std::unique_ptr< LossDataSink > lossDs_m
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) override