30#ifndef CLASSIC_MULTIPOLET_CURVED_VAR_RADIUS_H
31#define CLASSIC_MULTIPOLET_CURVED_VAR_RADIUS_H
109 virtual void setMaxOrder(
const std::size_t &maxOrder)
override;
117 virtual void setBendAngle(
const double &angle)
override;
127 double &endField)
override;
147 virtual double getRadius(
const double &s)
override;
152 virtual double getScaleFactor(
const double &x,
const double &s)
override;
159 virtual double getFn(
const std::size_t &n,
161 const double &s)
override;
170 const std::size_t &maxXorder) {
virtual void visitMultipoleTCurvedVarRadius(const MultipoleTCurvedVarRadius &)=0
Apply the algorithm to an arbitrary curved multipole of variable radius.
PartBunch_t * RefPartBunch_m
double getBoundingBoxLength() const
Get distance between centre of magnet and entrance.
std::vector< double > getFringeLength() const
Return vector of 2 doubles [left fringe length, right fringelength].
double getLength() const
Get the length of the magnet.
std::vector< polynomial::RecursionRelationTwo > recursion_m
Objects for storing differential operator acting on Fn.
virtual void transformCoords(Vector_t< double, 3 > &R) override
Transform to Frenet-Serret coordinates for sector magnets.
virtual double getScaleFactor(const double &x, const double &s) override
Returns the scale factor .
~MultipoleTCurvedVarRadius()
Destructor.
virtual void setBendAngle(const double &angle) override
Set the bending angle of the magnet.
VarRadiusGeometry & getGeometry() override
Return the cell geometry.
virtual void transformBField(Vector_t< double, 3 > &B, const Vector_t< double, 3 > &R) override
Transform B-field from Frenet-Serret coordinates to lab coordinates.
virtual double getRadius(const double &s) override
Radius of curvature If radius of curvature is infinite, -1 is returned where S(s) is the fringe f...
virtual void setMaxOrder(const std::size_t &maxOrder) override
Set the number of terms used in calculation of field components Maximum power of z in Bz is 2 * maxO...
void setMaxXOrder(const std::size_t &maxXOrder)
Set the number of terms used in polynomial expansions.
virtual ElementBase * clone() const override
Inheritable copy constructor.
VarRadiusGeometry varRadiusGeometry_m
Geometry.
void accept(BeamlineVisitor &visitor) const override
Accept a beamline visitor.
virtual double getFn(const std::size_t &n, const double &x, const double &s) override
Calculate fn(x, s) by expanding the differential operator (from Laplacian and scalar potential) in te...
MultipoleTCurvedVarRadius(const std::string &name)
Constructor.
std::size_t getMaxXOrder() const
Get highest power of x in polynomial expansions.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialise the MultipoleT.
MultipoleTCurvedVarRadius operator=(const MultipoleTCurvedVarRadius &rhs)
virtual double getBendAngle() const override
Get the bending angle of the magnet.
std::size_t maxOrderX_m
Highest order of polynomial expansions in x.
void setS0(const double &s_0)
Set central fringe field length.
virtual void setElementLength(double length)
Set arc length.
void setLambdaRight(const double &lambda_right)
Set right end fringe field length.
void setLambdaLeft(const double &lambda_left)
Set left end fringe field length.
void setRadius(const double &rho)
Set centre radius of curvature.