19#ifndef ABSBEAMLINE_VerticalFFAMagnet_H
20#define ABSBEAMLINE_VerticalFFAMagnet_H
108 inline bool bends()
const {
return false;}
ParticleAttrib< Vector_t > P
Interface for a single beam element.
PartBunchBase< double, 3 > * RefPartBunch_m
Bending magnet with an exponential dependence on field in the vertical plane.
void setBBLength(double bbLength)
Set the length of the bounding box (centred on magnet centre)
void finalise()
Finalise the VerticalFFAMagnet - sets bunch to nullptr.
ElementBase * clone() const
Inheritable copy constructor.
bool bends() const
Return false - VerticalFFAMagnet is a straight magnet.
endfieldmodel::EndFieldModel * getEndField() const
Get the fringe field.
void accept(BeamlineVisitor &visitor) const
Accept a beamline visitor.
VerticalFFAMagnet & operator=(const VerticalFFAMagnet &rhs)
bool getFieldValue(const Vector_t &R, Vector_t &B) const
Calculate the field at some arbitrary position in cartesian coordinates.
void setWidth(double width)
Set the full width of the bounding box (centred on magnet centre)
void initialise()
Initialise the VerticalFFAMagnet.
double getFieldIndex() const
Get the field index.
size_t getMaxOrder() const
Get the maximum power of x used in the off-midplane expansion;.
std::vector< std::vector< double > > getDfCoefficients() const
Get the coefficients used for the field expansion.
std::unique_ptr< endfieldmodel::EndFieldModel > endField_m
void calculateDfCoefficients()
BGeometryBase & getGeometry()
Return the cell geometry.
void setMaxOrder(size_t maxOrder)
Set the maximum power of x used in the off-midplane expansion;.
std::vector< std::vector< double > > dfCoefficients_m
double getPositiveVerticalExtent() const
Get the maximum extent above z = 0.
double getNegativeVerticalExtent() const
Get the maximum extent below z = 0.
StraightGeometry straightGeometry_m
EMField & getField()
Return a dummy (0.) field value (what is this for?)
void setB0(double Bz)
Set the centre field at z=0.
double getBBLength() const
Get the length of the bounding box (centred on magnet centre)
double getB0() const
Get the centre field at z=0.
VerticalFFAMagnet(const std::string &name)
Construct a new VerticalFFAMagnet.
void setNegativeVerticalExtent(double negativeExtent)
Set the maximum extent below z = 0.
void setFieldIndex(double index)
Set the field index.
~VerticalFFAMagnet()
Destructor - deletes the field.
void getDimensions(double &, double &) const
Not implemented.
double getWidth() const
Get the full width of the bounding box (centred on magnet centre)
bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
Calculate the field at the position of the ith particle.
void setEndField(endfieldmodel::EndFieldModel *endField)
Set the fringe field.
void setPositiveVerticalExtent(double positiveExtent)
set the maximum extent above z = 0
Abstract base class for accelerator geometry classes.
A geometry representing a straight line.
The magnetic field of a multipole.
Abstract base class for electromagnetic fields.