36 "The \"RBEND\" element defines a rectangular bending magnet."),
87 if(length != 0.0) scale *= length;
89 for(
int i = 1; i <= field.
order(); ++i) {
90 std::string normName(
"K0L");
91 normName[1] += (i - 1);
94 std::string skewName(
"K0SL");
95 skewName[1] += (i - 1);
146 length ? 2 *
sin(angle / 2) / length : angle;
182 "ROTATION not supported any more; use PSI instead");
187 else if(bend->
getName() !=
"RBEND") {
189 "Will assume the default map "
190 "\"1DPROFILE1-DEFAULT\"."
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
virtual void setEntranceAngle(double entranceAngle) override
virtual void update()
Update the embedded CLASSIC bend.
virtual BMultipoleField & getField() override=0
Get multipole expansion of field.
virtual void setSlices(double sl)
Set number of slices.
Interface for basic beam line object.
Representation for a rectangular bend magnet.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
double normal(int) const
Get component.
double getP0() const
Return value of global reference momentum.
ValueFlag
Switch for value desired on ATTLIST command.
void setNormalComponent(int n, double Bn)
Set component.
The base class for all OPAL exceptions.
Tps< T > sin(const Tps< T > &x)
Sine.
virtual ElementBase * removeWrappers()
Return the design element.
void setK1(double k1)
Set quadrupole field component.
virtual void setBendAngle(double angle) override
virtual double getLength() const
Return element length.
virtual void setStepsize(double ds)
Set stepsize.
virtual const std::string & getName() const
Get element name.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
ParticleMatterInteraction * parmatint_m
virtual void setExitFaceRotation(double e2)
Set exit pole face rotation.
void setSkewComponent(int n, double Bn)
Set component.
void setNSlices(const std::size_t &nSlices)
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
virtual double getEntryFaceRotation() const
Get pole face rotation.
void initWakefunction(ElementBase &element)
Base class for all bending magnets.
virtual void setDesignEnergy(const double &energy, bool changeable=true)
ParticleMatterInteractionHandler * handler_m
static OpalData * getInstance()
static std::map< std::string, OwnPtr< AttCell > > attributeRegistry
The registry for named attributes.
const std::string & getOpalName() const
Return object name.
virtual const RBend & getDesign() const
Get design RBend.
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
void setFieldMapFN(std::string fileName)
double skew(int) const
Get component.
Quaternion getRotation() const
void initParticleMatterInteractionHandler(ElementBase &element)
virtual BMultipoleField & errorField() const
Get multipole field error.
virtual void setElementLength(double length)
Set design length.
OpalRBend()
Exemplar constructor.
static OpalWake * find(const std::string &name)
Find named WAKE.
virtual double getSlices() const
Get number of slices.
constexpr double c
The velocity of light in m/s.
virtual double getExitFaceRotation() const
Get pole face rotation.
virtual double getEntryFaceCurvature() const
Get pole face curvature.
void setElement(ElementBase *)
Assign new CLASSIC element.
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
void registerOwnership() const
Vector_t getOrigin() const
virtual void update()
Update the embedded CLASSIC element.
void setLength(double length)
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual void setField(const BMultipoleField &field)
Set field.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
ElementBase * getElement() const
Return the embedded CLASSIC element.
The geometry for a RBend element.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
virtual BMultipoleField & getField()
Get field.
The magnetic field of a multipole.
void setBendAngle(double angle)
Set angle.
bool isPositioned() const
void setAperture(const ApertureType &type, const std::vector< double > &args)
virtual RBendGeometry & getGeometry()
Get geometry.
void setFieldAmplitude(double k0, double k0s)
double getReal(const Attribute &attr)
Return real value.
virtual double getExitFaceCurvature() const
Get pole face curvature.
Representation of a perturbed rectangular bend.
virtual double getStepsize() const
Get stepsize.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
int order() const
Return order.
virtual OpalRBend * clone(const std::string &name)
Make clone.
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.
CoordinateSystemTrafo getCSTrafoGlobal2Local() const