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");
virtual void update()
Update the embedded CLASSIC bend.
static OpalData * getInstance()
constexpr double c
The velocity of light in m/s.
ParticleMatterInteraction * parmatint_m
void setFieldAmplitude(double k0, double k0s)
virtual void setSlices(double sl)
Set number of slices.
void setBendAngle(double angle)
Set angle.
The geometry for a RBend element.
item[EANGLE] Entrance edge angle(radians).\item[ROTATION] Rotation of the magnet about its central axis(radians
std::string getString(const Attribute &attr)
Get string value.
CoordinateSystemTrafo getCSTrafoGlobal2Local() const
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
virtual RBendGeometry & getGeometry()
Get geometry.
Base class for all bending magnets.
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
void setSkewComponent(int n, double Bn)
Set component.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
Vector_t getOrigin() const
void setNormalComponent(int n, double Bn)
Set component.
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
virtual void setField(const BMultipoleField &field)
Set field.
virtual void setEntranceAngle(double entranceAngle) override
virtual const std::string & getName() const
Get element name.
Inform & endl(Inform &inf)
void setElement(ElementBase *)
Assign new CLASSIC element.
virtual OpalRBend * clone(const std::string &name)
Make clone.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
The base class for all OPAL exceptions.
void initParticleMatterInteractionHandler(ElementBase &element)
ElementBase * getElement() const
Return the embedded CLASSIC element.
virtual void setExitFaceRotation(double e2)
Set exit pole face rotation.
void initWakefunction(const ElementBase &element)
bool isPositioned() const
void setFieldMapFN(std::string fileName)
const std::string & getOpalName() const
Return object name.
void setK1(double k1)
Set quadrupole field component.
double getP0() const
Return value of global reference momentum.
std::vector< Attribute > itsAttr
The object attributes.
double getReal(const Attribute &attr)
Return real value.
ParticleMatterInteractionHandler * handler_m
virtual void setDesignEnergy(const double &energy, bool changeable=true)
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
OpalRBend()
Exemplar constructor.
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
Quaternion getRotation() const
void setAperture(const ApertureType &type, const std::vector< double > &args)
virtual void setStepsize(double ds)
Set stepsize.
Tps< T > sin(const Tps< T > &x)
Sine.
static OpalWake * find(const std::string &name)
Find named WAKE.
virtual void setElementLength(double length)
Set design length.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const
The magnetic field of a multipole.
void setNSlices(const std::size_t &nSlices)
virtual void setBendAngle(double angle) override