39 "The \"QUADRUPOLE\" element defines a Quadrupole."),
42 (
"K1",
"Normalised upright quadrupole coefficient in m^(-2)");
44 (
"DK1",
"Normalised upright quadrupole coefficient error in m^(-2)");
46 (
"K1S",
"Normalised skew quadrupole coefficient in m^(-2)");
49 (
"DK1S",
"Normalised skew quadrupole coefficient error in m^(-2)");
53 "The number of slices/ steps for this element in Map Tracking", 1);
110 if(length != 0.0) scale *= length;
112 for(
int order = 1; order <= field.
order(); ++order) {
113 std::ostringstream ss;
114 ss << (order - 1) << std::ends;
115 std::string orderString = ss.str();
117 std::string normName =
"K" + orderString +
"L";
120 std::string skewName =
"K" + orderString +
"SL";
123 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 ~OpalQuadrupole()
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 void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
virtual double getLength() const
Return element length.
Representation of a perturbed multipole.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
OpalQuadrupole()
Exemplar constructor.
void setSkewComponent(int n, double Bn)
Set component.
virtual void update()
Update the embedded CLASSIC multipole.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
ParticleMatterInteractionHandler * handler_m
static OpalData * getInstance()
const std::string & getOpalName() const
Return object name.
virtual OpalQuadrupole * clone(const std::string &name)
Make clone.
double skew(int) const
Get component.
void initParticleMatterInteractionHandler(ElementBase &element)
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.
ParticleMatterInteraction * parmatint_m
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
ElementBase * getElement() const
Return the embedded CLASSIC element.
The magnetic field of a multipole.
virtual BMultipoleField & errorField() const
Get multipole field error.
virtual void print(std::ostream &) const
Print the quadrupole.
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.
void setNSlices(const std::size_t &nSlices)
virtual void print(std::ostream &) const
Print the object.
virtual void setReal(double)
Store the value.
std::string getString(const Attribute &attr)
Get string value.