27 "The \"TRAVELINGWAVE\" element defines a traveling wave structure.")
30 (
"VOLT",
"RF voltage in MV/m");
32 (
"DVOLT",
"RF voltage error in MV/m");
34 (
"FREQ",
"RF frequency in MHz");
36 (
"LAG",
"Phase lag in rad");
38 (
"DLAG",
"Phase lag error in rad");
40 (
"FMAPFN",
"Filename for the fieldmap");
42 (
"FAST",
"Faster but less accurate",
true);
44 (
"APVETO",
"Do not use this cavity in the Autophase procedure",
false);
46 (
"NUMCELLS",
"Number of cells in a TW structure");
48 (
"DESIGNENERGY",
"the mean energy of the particles at exit", -1.0);
50 (
"MODE",
"The phase shift between neighboring cells in 2*pi", 1.0/3.0);
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 two_pi
The value of.
constexpr double MVpm2Vpm
virtual void setElementLength(double length)
Set design length.
virtual void setAmplitudeError(double vPeakError)
virtual void setAmplitudem(double vPeak)
virtual void setPhaseError(double phaseError)
virtual void setFrequencym(double freq)
virtual void setFieldMapFN(const std::string &fmapfn)
Set the name of the field map.
virtual void setAutophaseVeto(bool veto=true)
virtual void setDesignEnergy(const double &ekin, bool changeable=true) override
virtual void setFast(bool fast)
void setNumCells(int NumCells)
void setMode(double mode)
virtual void setPhasem(double phase) override
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
virtual void setPhase(double phi)
Set phase.
virtual void setFrequency(double f)
Set frequency.
virtual void setAmplitude(double V)
Set amplitude.
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
virtual void update()
Update the embedded CLASSIC cavity.
virtual ~OpalTravelingWave()
OpalTravelingWave()
Exemplar constructor.
virtual OpalTravelingWave * clone(const std::string &name)
Make clone.