25 :
OpalElement(
SIZE,
"SOLENOID",
"The \"SOLENOID\" element defines a Solenoid.") {
virtual void setElementLength(double length)
Set design length.
ElementBase * getElement() const
Return the embedded OPALX element.
void setElement(ElementBase *)
Assign new OPALX element.
std::vector< Attribute > itsAttr
The object attributes.
double getP0() const
Return value of global reference momentum.
static OpalData * getInstance()
virtual void updateUnknown(ElementBase *)
Transmit the `‘unknown’' (not known to OPALX) attributes to OPALX.
virtual void update()
Update the embedded OPALX element.
void registerOwnership() const
virtual OpalSolenoid * clone(const std::string &name)
Make clone.
OpalSolenoid()
Exemplar constructor.
virtual void update()
Update the embedded OPALX solenoid.
virtual void setBz(double Bz)
Set field.
void setFast(bool fast)
Set the fast flag.
void setDKS(double ks)
Set the strength scaling error dks.
void setKS(double ks)
Set the strength scaling factor ks.
void setFieldMapFN(std::string fn)
Assign the field filename.
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.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
constexpr double c
The velocity of light in m/s.