30 "The \"RBEND\" element defines a rectangular bending magnet."),
32 parmatint_m(nullptr) {
43 parmatint_m(nullptr) {
91 length ? 2 *
sin(angle / 2) / length : angle;
127 "ROTATION not supported any more; use PSI instead");
132 }
else if (bend->
getName() !=
"RBEND") {
134 "Will assume the default map "
135 "\"1DPROFILE1-DEFAULT\"."
143 }
else if (bend->
getName() !=
"RBEND") {
145 "RBend requires non-zero DESIGNENERGY");
153 "APERTURE in RBEND 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 setK1(double k1)
Set quadrupole field component.
void setNSlices(const std::size_t &nSlices)
void setFieldMapFN(std::string fileName)
virtual void setDesignEnergy(const double &energy, bool changeable=true)
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
virtual void setBendAngle(double angle) override
virtual void setEntranceAngle(double entranceAngle) override
Vector_t getOrigin() const
Quaternion getRotation() const
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual void setSlices(double sl)
Set number of slices.
virtual void setStepsize(double ds)
Set stepsize.
virtual void setField(const BMultipoleField &field)
Set field.
virtual RBendGeometry & getGeometry()
Get geometry.
virtual void setExitFaceRotation(double e2)
Set exit pole face rotation.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
The geometry for a RBend element.
void setBendAngle(double angle)
Set angle.
virtual void setElementLength(double length)
Set design length.
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
virtual OpalRBend * clone(const std::string &name)
Make clone.
OpalRBend()
Exemplar constructor.
virtual void update()
Update the embedded CLASSIC bend.
ParticleMatterInteraction * parmatint_m
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.