37 "The \"SEXTUPOLE\" element defines a Sextupole.") {
39 (
"K2",
"Normalised upright sextupole coefficient in m^(-3)");
41 (
"DK2",
"Normalised upright sextupole coefficient error in m^(-3)");
43 (
"K2S",
"Normalised skew sextupole coefficient in m^(-3)");
45 (
"DK2S",
"Normalised skew sextupole coefficient error in m^(-3)");
94 if(length != 0.0) scale *= length;
96 for(
int order = 1; order <= field.
order(); ++order) {
97 std::ostringstream ss;
98 ss << (order - 1) << std::ends;
99 std::string orderString = ss.str();
101 std::string normName =
"K" + orderString +
"L";
104 std::string skewName =
"K" + orderString +
"SL";
107 scale *= double(order);
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
virtual const Multipole & getDesign() const
Get design corrector.
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 void print(std::ostream &) const
Print the sextupole.
void setSkewComponent(int n, double Bn)
Set component.
static OpalData * getInstance()
double skew(int) const
Get component.
OpalSextupole()
Exemplar constructor.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
constexpr double c
The velocity of light in m/s.
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.
virtual void update()
Update the embedded CLASSIC multipole.
The magnetic field of a multipole.
virtual OpalSextupole * clone(const std::string &name)
Make clone.
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.
int order() const
Return order.
virtual void print(std::ostream &) const
Print the object.
virtual void setReal(double)
Store the value.