24#include "BeamlineCore/VacuumRep.h"
25#include "Structure/ParticleMatterInteraction.h"
30 "The \"VACUUM\" element defines the vacuum conditions "
31 "for beam stripping interactions."),
34 (
"GAS",
"The composition of residual gas", {
"AIR",
"H2"});
37 (
"PRESSURE",
" Pressure in the accelerator, [mbar]");
40 (
"PMAPFN",
"Filename for the Pressure fieldmap");
43 (
"PSCALE",
"Scale factor for the P-field", 1.0);
46 (
"TEMPERATURE",
" Temperature of the accelerator, [K]");
49 (
"STOP",
"Option whether stop tracking after beam stripping. Default: true",
true);
77 VacuumRep* vac =
dynamic_cast<VacuumRep*
>(
getElement());
87 vac->setElementLength(length);
88 vac->setResidualGas(gas);
89 vac->setPressure(pressure);
90 vac->setPressureMapFN(pmap);
91 vac->setPScale(pscale);
92 vac->setTemperature(temperature);
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
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.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void update()
Update the embedded CLASSIC element.
OpalElement(int size, const char *name, const char *help)
Exemplar constructor.
void registerOwnership() const
OpalVacuum()
Exemplar constructor.
ParticleMatterInteraction * parmatint_m
virtual OpalVacuum * clone(const std::string &name)
Make clone.
virtual void update()
Update the embedded CLASSIC vacuum.