50 "The \"MULTIPOLETSTRAIGHT\" element defines a straight, combined function multipole magnet.") {
52 (
"TP",
"Transverse Profile derivatives in m^(-k)");
54 (
"LFRINGE",
"The length of the left end field in m");
56 (
"RFRINGE",
"The length of the right end field in m");
58 (
"HAPERT",
"The aperture width in m");
60 (
"VAPERT",
"The aperture height in m");
62 (
"EANGLE",
"The entrance angle (rad)");
65 "Number of terms used in each field component");
68 "Rotation angle about its axis for skew elements (rad)");
71 "Distance between centre of magnet and entrance in m");
107 std::ostringstream ss;
109 std::string orderString = ss.str();
110 std::string attrName =
"TP" + orderString;
143 const std::vector<double> transProfile =
145 int transSize = transProfile.size();
156 for(
int comp = 0; comp < transSize; comp++) {
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
double getEntranceAngle() const
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Interface for basic beam line object.
std::vector< double > getFringeLength() const
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
bool setFringeField(const double &s0, const double &lambda_left, const double &lambda_right)
ValueFlag
Switch for value desired on ATTLIST command.
virtual void setMaxOrder(const std::size_t &maxOrder) override
void setAperture(const double &vertAp, const double &horizAp)
virtual OpalMultipoleTStraight * clone(const std::string &name)
virtual ElementBase * removeWrappers()
Return the design element.
virtual void setElementLength(double length)
Set design length.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual ~OpalMultipoleTStraight()
std::size_t getTransMaxOrder() const
void setTransProfile(const std::size_t &n, const double &Bn)
double getRotation() const
virtual ElementBase * makeWrappers()
Allow errors.
void setTransMaxOrder(const std::size_t &transMaxOrder)
void setEntranceAngle(const double &entranceAngle)
Base class for all beam line elements.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
void setLength(const double &length)
void setElement(ElementBase *)
Assign new CLASSIC element.
void registerOwnership() const
void setBoundingBoxLength(const double &boundingBoxLength)
virtual void update()
Update the embedded CLASSIC element.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
StraightGeometry & getGeometry() override
A geometry representing a straight line.
ElementBase * getElement() const
Return the embedded CLASSIC element.
std::size_t getMaxOrder() const
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
void setRotation(const double &rot)
double getBoundingBoxLength() const
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.
std::vector< double > getAperture() const
virtual void print(std::ostream &) const
Print the object.
virtual void setReal(double)
Store the value.
void print(std::ostream &os) const
Print the object.
double getTransProfile(const std::size_t &n) const