34 "The \"MULTIPOLE\" element defines a thick multipole.\n"
35 "* If the length is non-zero, the strengths are per unit "
36 "length.\n* If the length is zero, the strengths are the "
37 "values integrated over the length.\n"
38 "* With zero length no synchrotron radiation can be calculated.") {
40 (
"KN",
"Normalised multipole strengths (normal) in m^(-k)");
42 (
"DKN",
"Normalised multipole strengths errors(normal) in m^(-k)");
44 (
"KS",
"Normalised multipole strengths (skew) in m^(-k)");
46 (
"DKS",
"Normalised multipole strength errors (skew) in m^(-k)");
90 int normSize = norm.size();
91 int skewSize = skew.size();
92 normErrors.resize(normSize, 0.0);
93 skewErrors.resize(skewSize, 0.0);
95 int top = (normSize > skewSize) ? normSize : skewSize;
97 for(
int comp = 1; comp <= top; comp++) {
98 factor /= double(comp);
99 if(comp <= normSize) {
103 if(comp <= skewSize) {
static OpalData * getInstance()
constexpr double c
The velocity of light in m/s.
void setNormalComponent(int, double)
Set normal component.
void setSkewComponent(int n, double Bn)
Set component.
virtual OpalMultipole * clone(const std::string &name)
Make clone.
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
void setNormalComponent(int n, double Bn)
Set component.
virtual void print(std::ostream &) const
Print the object.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
virtual void update()
Update the embedded CLASSIC multipole.
OpalMultipole()
Exemplar constructor.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
void setElement(ElementBase *)
Assign new CLASSIC element.
ElementBase * getElement() const
Return the embedded CLASSIC element.
double getP0() const
Return value of global reference momentum.
std::vector< Attribute > itsAttr
The object attributes.
virtual void print(std::ostream &) const
Print the object.
virtual void setElementLength(double length)
Set design length.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual double getLength() const
Return element length.
void setSkewComponent(int, double)
Set skew component.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const
The magnetic field of a multipole.