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");
virtual void setSlices(double sl)
Set number of slices.
static OpalData * getInstance()
constexpr double c
The velocity of light in m/s.
virtual void setBendAngle(double angle)
OpalSBend()
Exemplar constructor.
void setFieldAmplitude(double k0, double k0s)
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)
Base class for all bending magnets.
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual PlanarArcGeometry & getGeometry()
Get geometry.
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
void setSkewComponent(int n, double Bn)
Set component.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
ParticleMatterInteraction * parmatint_m
Vector_t getOrigin() const
A simple arc in the XZ plane.
void setNormalComponent(int n, double Bn)
Set component.
virtual OpalSBend * clone(const std::string &name)
Make clone.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
virtual const std::string & getName() const
Get element name.
Inform & endl(Inform &inf)
void setElement(ElementBase *)
Assign new CLASSIC element.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
virtual void setField(const BMultipoleField &field)
Set field.
The base class for all OPAL exceptions.
virtual void setStepsize(double ds)
Set stepsize.
void initParticleMatterInteractionHandler(ElementBase &element)
ElementBase * getElement() const
Return the embedded CLASSIC element.
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.
void setExitAngle(double exitAngle)
std::vector< Attribute > itsAttr
The object attributes.
double getReal(const Attribute &attr)
Return real value.
ParticleMatterInteractionHandler * handler_m
virtual void update()
Update the embedded CLASSIC bend.
virtual void setDesignEnergy(const double &energy, bool changeable=true)
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
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 setExitFaceRotation(double e2)
Set exit pole face rotation.
virtual void setEntranceAngle(double entranceAngle) override
Tps< T > sin(const Tps< T > &x)
Sine.
static OpalWake * find(const std::string &name)
Find named WAKE.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const
The magnetic field of a multipole.
void setNSlices(const std::size_t &nSlices)