34 planarArcGeometry_m(1., 1.), fieldUnits_m(1.), lengthUnits_m(1.),
35 polyOrder_m(1), smoothOrder_m(1), dummy() {
40 planarArcGeometry_m(right.planarArcGeometry_m),
41 fieldUnits_m(right.fieldUnits_m), lengthUnits_m(right.lengthUnits_m),
42 polyOrder_m(right.polyOrder_m), smoothOrder_m(right.smoothOrder_m),
45 if (right.
map_m !=
nullptr)
ParticleAttrib< Vector_t > P
virtual void visitSBend3D(const SBend3D &)=0
Apply the algorithm to a sector bend with 3D field map.
Interface for a single beam element.
PartBunchBase< double, 3 > * RefPartBunch_m
Sector bending magnet from a 3D field map.
void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
Initialise the SBend3D.
ElementBase * clone() const override
Inheritable copy constructor.
void accept(BeamlineVisitor &visitor) const override
Accept a beamline visitor.
EMField & getField() override
Return a dummy (0.) field value (what is this for?)
bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B) override
Calculate the field at the position of the ith particle.
void setFieldMapFileName(const std::string &name)
Set the field map file.
SBend3D(const std::string &name)
Construct a new SBend3D.
PlanarArcGeometry planarArcGeometry_m
void finalise() override
Finalise the SBend3D - sets bunch to nullptr.
SectorMagneticFieldMap * map_m
BGeometryBase & getGeometry() override
Return the cell geometry.
~SBend3D()
Destructor - deletes map.
bool bends() const override
Return true - SBend3D always bends the reference particle.
Abstract base class for accelerator geometry classes.
void setCurvature(double)
Set curvature.
virtual void setElementLength(double)
Set length.
Abstract base class for electromagnetic fields.
virtual std::vector< double > getPolarBoundingBoxMin() const
Get the minimum bounding box in polar coordinates.
virtual std::vector< double > getPolarBoundingBoxMax() const
Get the maximum bounding box in polar coordinates.
handles field map grids with sector geometry
bool getFieldstrength(const Vector_t &R_c, Vector_t &E_c, Vector_t &B_c) const
Return the field value in polar coordinates.
double getDeltaPhi() const
Get change in azimuthal angle between entrance and exit.