15#ifndef CLASSIC_OutputPlane_HH
16#define CLASSIC_OutputPlane_HH
184 bool checkOne(
const int index,
const double tstep,
double chargeToMass,
203 void RK4Step(
const double& tstep,
204 const double& chargeToMass,
225 const int turnnumber,
227 const double tstep)
override;
233 const double& chargeToMass,
236 void rk4Test(
double tstep,
double chargeToMass,
T euclidean_norm(const Vector< T > &)
Euclidean norm.
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
constexpr double e
The value of.
double function(PyOpalObjectNS::PyOpalObject< C > pyobject, double t)
Interface for a single beam element.
BVector Bfield(const Point3D &P) const
Return the field in a point.
EVector Efield(const Point3D &P) const
Return the field in a point.
void setAlgorithm(algorithm alg)
Set the algorithm used to interpolate from step to the plane.
virtual ~OutputPlane()
Destructor.
bool getFieldsAtPoint(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &Efield, Vector_t &Bfield)
void setVerticalExtent(double z)
Set the vertical extent from the plane centre.
void setCentre(Vector_t centre)
Set the centre of the plane.
void operator=(const OutputPlane &)=delete
void RK4Step(const double &tstep, const double &chargeToMass, const double &t, Vector_t &R, Vector_t &P) const
Make an RK4Step.
OutputPlane()
Default constructor (initialise to empty.
void rk4Test(double tstep, double chargeToMass, double &t, Vector_t &R, Vector_t &P)
void setNormal(Vector_t normal)
Set the normal to the plane.
void getDerivatives(const Vector_t &R, const Vector_t &P, const double &t, const double &chargeToMass, double *yp) const
const NullField & getField() const override
Returns empty field.
int getVerboseLevel() const
Get the horizontal extent from the plane centre.
double distanceToPlane(Vector_t point) const
bool checkOne(const int index, const double tstep, double chargeToMass, double &t, Vector_t &R, Vector_t &P)
Check for plane crossing.
StraightGeometry & getGeometry() override
Returns empty geometry.
double getVerticalExtent() const
Get the vertical extent from the plane centre.
algorithm getAlgorithm() const
Get the algorithm used to interpolate from step to the plane.
virtual void doInitialise(PartBunchBase< double, 3 > *) override
Initialise peakfinder file.
int getRecentre() const
Return the index of the recentring particle.
const StraightGeometry & getGeometry() const override
Returns empty geometry.
Vector_t getCentre() const
Get the centre of the plane.
NullField & getField() override
Returns empty field.
ElementType getType() const override
Get element type std::string.
void setTolerance(double tolerance)
Set the tolerance, used when finding intersection with the plane.
void setRadialExtent(double r)
Set the radial extent from the centre.
bool doPreCheck(PartBunchBase< double, 3 > *bunch) override
Record probe hits when bunch particles pass.
ElementBase * clone() const override
Inheritable copy operation.
std::function< bool(const double &, const size_t &, Vector_t &, Vector_t &)> function_t
virtual void doGoOffline() override
Hook for goOffline.
double getRadialExtent() const
Get the radial extent from the plane centre.
Component * getGlobalFieldMap() const
Get the field map.
void recentre(Vector_t R, Vector_t P)
double getHorizontalExtent() const
Get the horizontal extent from the plane centre.
size_t getMaxIterations() const
Get the maximum allowed iteratiosn when finding intersection.
void setVerboseLevel(int verbose)
Set the verbose level.
double horizontalExtent_m
void setGlobalFieldMap(Component *field)
Set the field map.
void setMaxIterations(size_t max)
Set the maximum allowed iteratiosn when finding intersection.
virtual bool doCheck(PartBunchBase< double, 3 > *bunch, const int turnnumber, const double t, const double tstep) override
Record probe hits when bunch particles pass.
void interpolation(double &t, Vector_t &R, Vector_t &P)
Vector_t getNormal() const
Get the normal to the plane.
virtual void accept(BeamlineVisitor &) const override
Apply visitor to output plane.
void setHorizontalExtent(double width)
Set the horizontal extent from the plane centre.
void setRecentre(int willRecentre)
Set the index of the recentring particle.
std::unique_ptr< Stepper< function_t > > stepper_m
double getTolerance() const
Get the tolerance, used when finding intersection with the plane.
A geometry representing a straight line.
A zero electromagnetic field.