46 "The \"MULTIPOLET\" element defines a combined function multipole.") {
48 (
"TP",
"Transverse Profile derivatives in T m^(-k)");
50 (
"LFRINGE",
"The length of the left end field [m]");
52 (
"RFRINGE",
"The length of the right end field [m]");
54 (
"HAPERT",
"The aperture width [m]");
56 (
"VAPERT",
"The aperture height [m]");
58 (
"ANGLE",
"The azimuthal angle of the magnet in ring [rad]");
60 (
"EANGLE",
"The entrance angle [rad]");
63 "Number of terms used in each field component");
66 "Number of terms used in polynomial expansions");
69 "Rotation angle about its axis for skew elements [rad]");
72 "Set true if radius of magnet is variable");
75 "Distance between centre of magnet and entrance [m]");
124 const std::vector<double> transProfile =
126 int transSize = transProfile.size();
128 if (transSize == 0) {
138 for(
int comp = 0; comp < transSize; comp++) {
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
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.
virtual void setElementLength(double length)
Set design length.
void setBendAngle(double angle)
Set the bending angle of the magnet.
void setRotation(double rot)
Set the angle of rotation of the magnet around its axis To make skew components.
void setMaxXOrder(std::size_t maxXOrder)
Set the number of terms used in polynomial expansions.
void setAperture(double vertAp, double horizAp)
Set the aperture dimensions This element only supports a rectangular aperture.
void setMaxOrder(std::size_t maxOrder)
Set the number of terms used in calculation of field components Maximum power of z in Bz is 2 * maxO...
void setEntranceAngle(double entranceAngle)
Set the entrance angle.
void setTransMaxOrder(std::size_t transMaxOrder)
Set the maximum order in the given transverse profile.
void setBoundingBoxLength(const double &boundingBoxLength)
Set distance between centre of magnet and enctrance.
bool setFringeField(double s0, double lambda_left, double lambda_right)
Set fringe field model Tanh model used here .
void initialise(PartBunch_t *, double &startField, double &endField) override
Initialise the MultipoleT.
void setVarRadius()
Set variable radius flag to true.
void setLength(double length)
Set the length of the magnet If straight-> Actual length If curved -> Arc length .
void setTransProfile(std::size_t n, double Bn)
Set transverse profile T(x) T(x) = B_0 + B1 x + B2 x^2 + B3 x^3 + ...
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
virtual void updateUnknown(ElementBase *)
Transmit the `‘unknown’' (not known to OPAL) attributes to CLASSIC.
virtual void print(std::ostream &) const
Print the object.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const
OpalMultipoleT provides user interface information for the MultipoleT object.
virtual ~OpalMultipoleT()
Destructor does nothing.
virtual OpalMultipoleT * clone(const std::string &name)
Inherited copy constructor.
OpalMultipoleT()
Default constructor initialises UI parameters.
virtual void update()
Update the MultipoleT with new parameters from UI parser.
void print(std::ostream &os) const
Print the object.