30#ifndef CLASSIC_MULTIPOLET_STRAIGHT_H
31#define CLASSIC_MULTIPOLET_STRAIGHT_H
100 virtual void setMaxOrder(
const std::size_t &maxOrder)
override;
112 double &endField)
override;
125 virtual double getRadius(
const double &s)
override;
130 virtual double getScaleFactor(
const double &x,
const double &s)
override;
147 virtual double getFn(
const std::size_t &n,
149 const double &s)
override;
virtual void visitMultipoleTStraight(const MultipoleTStraight &)=0
Apply the algorithm to an arbitrary straight multipole.
PartBunch_t * RefPartBunch_m
double getBoundingBoxLength() const
Get distance between centre of magnet and entrance.
virtual double getBs(const Vector_t< double, 3 > &R) override
Get s-component of the B-field This function has been overloaded because calculating the B-field di...
void accept(BeamlineVisitor &visitor) const override
Accept a beamline visitor.
virtual double getBx(const Vector_t< double, 3 > &R) override
Get x-component of the B-field This function has been overloaded because calculating the B-field di...
StraightGeometry straightGeometry_m
Geometry.
~MultipoleTStraight()
Destructor.
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...
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...
virtual ElementBase * clone() const override
Inheritable copy constructor.
virtual double getScaleFactor(const double &x, const double &s) override
Returns the scale factor .
StraightGeometry & 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.
MultipoleTStraight(const std::string &name)
Constructor.
virtual double getRadius(const double &s) override
Radius of curvature Straight magnet, infinite radius, infinity (1.0e300) is returned.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialise the MultipoleT.
virtual void transformCoords(Vector_t< double, 3 > &R) override
Transform to Frenet-Serret coordinates for sector magnets.
MultipoleTStraight operator=(const MultipoleTStraight &rhs)
A geometry representing a straight line.
virtual void setElementLength(double length)
Set design length.