19 #ifndef CLASSIC_PluginElement_HH
20 #define CLASSIC_PluginElement_HH
26 template <
class T,
unsigned Dim>
46 virtual bool bends()
const override;
47 virtual void getDimensions(
double &zBegin,
double &zEnd)
const override;
50 virtual bool apply(
const size_t &i,
63 void setDimensions(
double xstart,
double xend,
double ystart,
double yend);
74 int checkPoint(
const double & x,
const double & y)
const;
80 void setGeom(
const double dist);
124 #endif // CLASSIC_PluginElement_HH
void setDimensions(double xstart, double xend, double ystart, double yend)
Set dimensions and consistency checks.
virtual void doFinalise()
Virtual hook for finalise.
virtual bool doPreCheck(PartBunchBase< double, 3 > *)
Virtual hook for preCheck.
virtual void doInitialise(PartBunchBase< double, 3 > *)
Pure virtual hook for initialise.
bool check(PartBunchBase< double, 3 > *bunch, const int turnnumber, const double t, const double tstep)
virtual bool doCheck(PartBunchBase< double, 3 > *bunch, const int turnnumber, const double t, const double tstep)=0
Pure virtual hook for check.
virtual void finalise() final
double xstart_m
input geometry positions
virtual void doGoOffline()
Virtual hook for goOffline.
virtual bool doFinaliseCheck(PartBunchBase< double, 3 > *, bool flagNeedUpdate)
Virtual hook for finaliseCheck.
bool finaliseCheck(PartBunchBase< double, 3 > *bunch, bool flagNeedUpdate)
Finalise call after check.
virtual void getDimensions(double &zBegin, double &zEnd) const override
std::unique_ptr< LossDataSink > lossDs_m
Pointer to Loss instance.
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
Pure virtual implementation of Component.
double rmin_m
radius closest to the origin
void operator=(const PluginElement &)=delete
int checkPoint(const double &x, const double &y) const
Checks if coordinate is within element.
virtual void doSetGeom()
Virtual hook for setGeom.
virtual void goOffline() final
bool preCheck(PartBunchBase< double, 3 > *bunch)
Check if bunch is close to element.
Point geom_m[5]
actual geometry positions with adaptive width such that each particle hits element once per turn ...
double calculateIncidentAngle(double xp, double yp) const
Calculate angle of particle/bunch wrt to element.
void changeWidth(PartBunchBase< double, 3 > *bunch, int i, const double tstep, const double tangle)
Change probe width depending on step size and angle of particle.
virtual bool bends() const override
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) override
virtual bool applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) override
double C_m
Geometric lengths used in calculations.
Interface for a single beam element.
int numPassages_m
Number of turns (number of times save() method is called)
double getXStart() const
Member variable access.
void setGeom(const double dist)
Sets geometry geom_m with element width dist.