49 "The \"MULTIPOLET\" element defines a combined function multipole.") {
51 (
"TP",
"Transverse Profile derivatives in T m^(-k)");
53 (
"LFRINGE",
"The length of the left end field [m]");
55 (
"RFRINGE",
"The length of the right end field [m]");
57 (
"HAPERT",
"The aperture width [m]");
59 (
"VAPERT",
"The aperture height [m]");
61 (
"ANGLE",
"The azimuthal angle of the magnet in ring [rad]");
63 (
"EANGLE",
"The entrance angle [rad]");
66 "Number of terms used in each field component");
69 "Number of terms used in polynomial expansions");
72 "Rotation angle about its axis for skew elements [rad]");
75 "Set true if radius of magnet is variable");
78 "Distance between centre of magnet and entrance [m]");
113 std::ostringstream ss;
115 std::string orderString = ss.str();
116 std::string attrName =
"TP" + orderString;
154 const std::vector<double> transProfile =
156 int transSize = transProfile.size();
158 if (transSize == 0) {
168 for(
int comp = 0; comp < transSize; comp++) {
169 double units = 10.*gsl_sf_pow_int(1
e-3, comp);
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
std::size_t getTransMaxOrder() const
constexpr double e
The value of .
void setTransMaxOrder(std::size_t transMaxOrder)
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
ValueFlag
Switch for value desired on ATTLIST command.
double getTransProfile(int n) const
virtual ElementBase * removeWrappers()
Return the design element.
virtual void setElementLength(double length)
Set design length.
bool setFringeField(double s0, double lambda_left, double lambda_right)
void print(std::ostream &os) const
Print the object.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
std::size_t getMaxXOrder() const
std::size_t getMaxOrder() const
void setEntranceAngle(double entranceAngle)
void setBendAngle(double angle)
bool getBool(const Attribute &attr)
Return logical value.
virtual ElementBase * makeWrappers()
Allow errors.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
void setMaxOrder(std::size_t maxOrder)
Base class for all beam line elements.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
virtual OpalMultipoleT * clone(const std::string &name)
void setElement(ElementBase *)
Assign new CLASSIC element.
double getEntranceAngle() const
void registerOwnership() const
virtual void update()
Update the embedded CLASSIC element.
void initialise(PartBunchBase< double, 3 > *, double &startField, double &endField) override
void setAperture(double vertAp, double horizAp)
std::vector< double > getAperture() const
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
ElementBase * getElement() const
Return the embedded CLASSIC element.
double getBoundingBoxLength() const
void setTransProfile(std::size_t n, double Bn)
void setRotation(double rot)
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
void setLength(double length)
void setMaxXOrder(std::size_t maxXOrder)
virtual ~OpalMultipoleT()
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
double getReal(const Attribute &attr)
Return real value.
void setBoundingBoxLength(const double &boundingBoxLength)
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
double getRotation() const
std::vector< double > getFringeLength() const
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
virtual void print(std::ostream &) const
Print the object.
virtual void setReal(double)
Store the value.