36 "The \"SBEND\" element defines a sector 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 "GREATERTHANPI not supportet any more");
186 "ROTATION not supportet any more; use PSI instead");
190 else if(bend->
getName() !=
"SBEND") {
192 "Will assume the default map "
193 "\"1DPROFILE1-DEFAULT\"."
210 "APERTURE in RBEND not supported; use GAP and HAPERT instead");
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
virtual double getExitFaceRotation() const
Get pole face rotation.
virtual const SBend & getDesign() const
Get design SBend.
virtual double getSlices() const
Get number of slices.
virtual double getEntryFaceCurvature() const
Get pole face curvature.
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
double normal(int) const
Get component.
virtual BMultipoleField & getField() override=0
Get multipole expansion of field.
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.
virtual void setExitFaceCurvature(double h2)
Set exit pole face curvature.
A simple arc in the XZ plane.
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 double getLength() const
Return element length.
virtual const std::string & getName() const
Get element name.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
void setSkewComponent(int n, double Bn)
Set component.
void setNSlices(const std::size_t &nSlices)
virtual double getStepsize() const
Get stepsize.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
virtual void setField(const BMultipoleField &field)
Set field.
void initWakefunction(ElementBase &element)
Base class for all bending magnets.
virtual void setEntranceAngle(double entranceAngle)
virtual void setDesignEnergy(const double &energy, bool changeable=true)
void setExitAngle(double exitAngle)
ParticleMatterInteractionHandler * handler_m
virtual void setBendAngle(double angle)
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 PlanarArcGeometry & getGeometry()
Get geometry.
void setFieldMapFN(std::string fileName)
double skew(int) const
Get component.
virtual void setSlices(double sl)
Set number of slices.
Quaternion getRotation() const
void initParticleMatterInteractionHandler(ElementBase &element)
ParticleMatterInteraction * parmatint_m
static OpalWake * find(const std::string &name)
Find named WAKE.
constexpr double c
The velocity of light in m/s.
virtual BMultipoleField & getField()
Get field.
virtual void setEntryFaceCurvature(double h1)
Set entry pole face curvature.
virtual void update()
Update the embedded CLASSIC bend.
virtual BMultipoleField & errorField() const
Get multipole field error.
OpalSBend()
Exemplar constructor.
void setElement(ElementBase *)
Assign new CLASSIC element.
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
void registerOwnership() const
Vector_t getOrigin() const
Representation of a perturbed sector bend.
virtual void update()
Update the embedded CLASSIC element.
void setLength(double length)
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 magnetic field of a multipole.
virtual void setStepsize(double ds)
Set stepsize.
bool isPositioned() const
virtual void setExitFaceRotation(double e2)
Set exit pole face rotation.
virtual double getExitFaceCurvature() const
Get pole face curvature.
void setAperture(const ApertureType &type, const std::vector< double > &args)
virtual double getEntryFaceRotation() const
Get pole face rotation.
virtual OpalSBend * clone(const std::string &name)
Make clone.
void setFieldAmplitude(double k0, double k0s)
double getReal(const Attribute &attr)
Return real value.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
int order() const
Return order.
virtual void setEntryFaceRotation(double e1)
Set pole entry face rotation.
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.
Representation for a sector bend magnet.
CoordinateSystemTrafo getCSTrafoGlobal2Local() const