30#ifndef CLASSIC_MULTIPOLET_CURVED_CONST_RADIUS_H
31#define CLASSIC_MULTIPOLET_CURVED_CONST_RADIUS_H
105 virtual void setMaxOrder(
const std::size_t &maxOrder)
override;
113 virtual void setBendAngle(
const double &angle)
override;
123 double &endField)
override;
143 virtual double getRadius(
const double &s)
override;
148 virtual double getScaleFactor(
const double &x,
const double &s)
override;
155 virtual double getFn(
const std::size_t &n,
157 const double &s)
override;
166 const std::size_t &maxXorder) {
virtual void visitMultipoleTCurvedConstRadius(const MultipoleTCurvedConstRadius &)=0
Apply the algorithm to an arbitrary curved multipole of constant radius.
PartBunch_t * RefPartBunch_m
double getBoundingBoxLength() const
Get distance between centre of magnet and entrance.
double getLength() const
Get the length of the magnet.
std::size_t getMaxXOrder() const
Get highest power of x in polynomial expansions.
std::vector< polynomial::RecursionRelation > recursion_m
Object for storing differential operator acting on Fn.
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...
void setMaxXOrder(const std::size_t &maxXOrder)
Set the number of terms used in polynomial expansions.
std::size_t maxOrderX_m
Highest order of polynomial expansions in x.
virtual void transformCoords(Vector_t< double, 3 > &R) override
Transform to Frenet-Serret coordinates for sector magnets.
virtual void setBendAngle(const double &angle) override
Set the bending angle of the magnet.
void accept(BeamlineVisitor &visitor) const override
Accept a beamline visitor.
MultipoleTCurvedConstRadius(const std::string &name)
Constructor.
virtual double getRadius(const double &s) override
Radius of curvature If radius of curvature is infinite, -1 is returned .
PlanarArcGeometry & 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.
PlanarArcGeometry planarArcGeometry_m
Geometry.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialise the MultipoleT.
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...
~MultipoleTCurvedConstRadius()
Destructor.
virtual double getBendAngle() const override
Get the bending angle of the magnet.
virtual double getScaleFactor(const double &x, const double &s) override
Returns the scale factor .
MultipoleTCurvedConstRadius operator=(const MultipoleTCurvedConstRadius &rhs)
virtual ElementBase * clone() const override
Inheritable copy constructor.
A simple arc in the XZ plane.
void setCurvature(double)
Set curvature.
virtual void setElementLength(double)
Set length.