30 "The \"SBEND\" element defines a sector bending magnet."),
32 parmatint_m(nullptr) {
43 parmatint_m(nullptr) {
93 length ? 2 *
sin(angle / 2) / length : angle;
129 "GREATERTHANPI not supported anymore");
134 "ROTATION not supported anymore; use PSI instead");
139 }
else if (bend->
getName() !=
"SBEND") {
141 "Will assume the default map "
142 "\"1DPROFILE1-DEFAULT\"."
153 }
else if (bend->
getName() !=
"SBEND") {
155 "SBend requires non-zero DESIGNENERGY");
163 "APERTURE in SBEND not supported; use GAP and HAPERT instead");
Tps< T > sin(const Tps< T > &x)
Sine.
Inform & endl(Inform &inf)
double getReal(const Attribute &attr)
Return real value.
std::string getString(const Attribute &attr)
Get string value.
constexpr double c
The velocity of light in m/s.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
double getP0() const
Return value of global reference momentum.
static OpalData * getInstance()
void setExitAngle(double exitAngle)
void setK1(double k1)
Set quadrupole field component.
void setNSlices(const std::size_t &nSlices)
virtual void setEntranceAngle(double entranceAngle) override
void setFieldMapFN(std::string fileName)
virtual void setDesignEnergy(const double &energy, bool changeable=true)
virtual void setBendAngle(double angle)
void setFieldAmplitude(double k0, double k0s)
virtual const std::string & getName() const
Get element name.
void setAperture(const ApertureType &type, const std::vector< double > &args)
bool isPositioned() const
CoordinateSystemTrafo getCSTrafoGlobal2Local() const
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
Vector_t getOrigin() const
Quaternion getRotation() const
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
virtual PlanarArcGeometry & getGeometry()
Get geometry.
virtual void setSlices(double sl)
Set number of slices.
virtual void setField(const BMultipoleField &field)
Set field.
virtual void setExitFaceRotation(double e2)
Set exit pole face rotation.
virtual void setStepsize(double ds)
Set stepsize.
A simple arc in the XZ plane.
The magnetic field of a multipole.
void setNormalComponent(int n, double Bn)
Set component.
void setSkewComponent(int n, double Bn)
Set component.
Base class for all bending magnets.
@ PARTICLEMATTERINTERACTION
virtual void updateUnknown(ElementBase *)
Transmit the `‘unknown’' (not known to OPAL) attributes to CLASSIC.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const
OpalSBend()
Exemplar constructor.
virtual void update()
Update the embedded CLASSIC bend.
ParticleMatterInteraction * parmatint_m
virtual OpalSBend * clone(const std::string &name)
Make clone.
static OpalWake * find(const std::string &name)
Find named WAKE.
void initWakefunction(const ElementBase &element)
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
ParticleMatterInteractionHandler * handler_m
void initParticleMatterInteractionHandler(ElementBase &element)
The base class for all OPAL exceptions.