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)
virtual void visitSource(const Source &)=0
Apply the algorithm to a source.
Component(const std::string &name)
Constructor with given name.
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.
Source(const std::string &name)
Constructor with given name.
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
Vektor< double, 3 > Vector_t