24 "The \"MULTIPOLET\" element defines a combined function multipole.") {
28 "Array of multipolar field strengths b_k. The field generated in the "
29 "flat top is B = b_k x^k [T m^(-k)]");
35 "MAXFORDER",
"Number of terms used in each fringe component",
DefaultMAXFORDER);
37 "ROTATION",
"Rotation angle about its axis for skew elements [rad]");
46 "MAXXORDER",
"Number of terms used in polynomial expansions",
DefaultMAXXORDER);
52 "ENTRYOFFSET",
"Longitudinal offset from standard entrance point [m]", 0.0);
57 "The name of the time dependence model, which should give a scaling factor.");
64 "MISALIGN_ROLL",
"Roll misalignment [rad] about the longitudinal axis", 0.0);
66 "MISALIGN_PITCH",
"Pitch misalignment [rad] about the horizontal axis", 0.0);
68 "MISALIGN_YAW",
"Yaw misalignment [rad] about the vertical axis", 0.0);
93 throw OpalException(
"OpalMultipoleT::Update",
"Attribute MAXFORDER must be >= 1.0");
96 throw OpalException(
"OpalMultipoleT::Update",
"Attribute MAXFORDER must be <= 9.0");
100 if (bendAngle != 0.0 && rotation != 0.0) {
102 "OpalMultipoleT::Update",
103 "Non-zero ROTATION (a skew multipole) is only "
104 "supported for straight magnets");
107 if (varRadius && bendAngle != 0.0) {
108 throw OpalException(
"OpalMultipoleT::Update",
"Variable radius is not currently supported");
111 if (!varRadius && entryOffset != 0.0) {
113 "OpalMultipoleT::Update",
114 "The ENTRYOFFSET is only supported for variable radius curved magnets");
121 multT->setBendAngle(bendAngle, varRadius);
123 multT->setFringeField(
127 multT->setTransProfile(tp);
129 static_cast<size_t>(maxFOrder),
131 multT->setRotation(rotation);
133 multT->setEntryOffset(entryOffset);
ElementBase * getElement() const
Return the embedded OPALX element.
void setElement(ElementBase *)
Assign new OPALX element.
void setElementLength(double length) override
std::vector< Attribute > itsAttr
The object attributes.
virtual void updateUnknown(ElementBase *)
Transmit the `‘unknown’' (not known to OPALX) attributes to OPALX.
virtual void print(std::ostream &) const
Print the object.
virtual void update()
Update the embedded OPALX element.
void registerOwnership() const
OpalMultipoleT * clone(const std::string &name) override
static constexpr double MaximumMAXFORDER
static constexpr double DefaultMAXXORDER
void print(std::ostream &os) const override
Print the object.
static constexpr double DefaultMAXFORDER
static constexpr double MinimumMAXFORDER
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makeUpperCaseString(const std::string &name, const std::string &help)
Make uppercase string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
bool getBool(const Attribute &attr)
Return logical value.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
std::string getString(const Attribute &attr)
Get string value.