36 "The \"OCTUPOLE\" element defines a Octupole.") {
38 (
"K3",
"Normalised upright octupole coefficient in m^(-4)");
40 (
"DK3",
"Normalised upright octupole coefficient error in m^(-4)");
42 (
"K3S",
"Normalised skew octupole coefficient in m^(-4)");
44 (
"DK3S",
"Normalised skew octupole coefficient error in m^(-4)");
92 if(length != 0.0) scale *= length;
94 for(
int order = 1; order <= field.
order(); ++order) {
95 std::ostringstream ss;
96 ss << (order - 1) << std::ends;
97 std::string orderString = ss.str();
99 std::string normName =
"K" + orderString +
"L";
102 std::string skewName =
"K" + orderString +
"SL";
105 scale *= double(order);
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
virtual const Multipole & getDesign() const
Get design corrector.
virtual void print(std::ostream &) const
Print the element.
void setSkewComponent(int, double)
Set skew component.
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
double normal(int) const
Get component.
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
double getP0() const
Return value of global reference momentum.
Representation for a general multipole.
virtual BMultipoleField & getField() override=0
Get multipole field.
ValueFlag
Switch for value desired on ATTLIST command.
void setNormalComponent(int n, double Bn)
Set component.
virtual BMultipoleField & getField()
Get field.
virtual ElementBase * removeWrappers()
Return the design element.
void setNormalComponent(int, double)
Set normal component.
virtual void setElementLength(double length)
Set design length.
virtual double getLength() const
Return element length.
Representation of a perturbed multipole.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual OpalOctupole * clone(const std::string &name)
Make clone.
void setSkewComponent(int n, double Bn)
Set component.
static OpalData * getInstance()
double skew(int) const
Get component.
constexpr double c
The velocity of light in m/s.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
Base class for all beam line elements.
void setElement(ElementBase *)
Assign new CLASSIC element.
void registerOwnership() const
virtual void update()
Update the embedded CLASSIC element.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
ElementBase * getElement() const
Return the embedded CLASSIC element.
The magnetic field of a multipole.
virtual BMultipoleField & errorField() const
Get multipole field error.
double getReal(const Attribute &attr)
Return real value.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
OpalOctupole()
Exemplar constructor.
int order() const
Return order.
virtual void update()
Update the embedded CLASSIC multipole.
virtual void print(std::ostream &) const
Print the object.
virtual void setReal(double)
Store the value.