28 "The \"TRAVELINGWAVE\" element defines a traveling wave structure."),
31 (
"VOLT",
"RF voltage in MV/m");
33 (
"DVOLT",
"RF voltage error in MV/m");
35 (
"FREQ",
"RF frequency in MHz");
37 (
"LAG",
"Phase lag in rad");
39 (
"DLAG",
"Phase lag error in rad");
41 (
"FMAPFN",
"Filename for the fieldmap");
43 (
"FAST",
"Faster but less accurate",
true);
45 (
"APVETO",
"Do not use this cavity in the Autophase procedure",
false);
47 (
"NUMCELLS",
"Number of cells in a TW structure");
49 (
"DESIGNENERGY",
"the mean energy of the particles at exit", -1.0);
51 (
"MODE",
"The phase shift between neighboring cells in 2*pi", 1.0/3.0);
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
virtual void setFast(bool fast)
virtual void setFrequencym(double freq)
constexpr double MVpm2Vpm
void setNumCells(int NumCells)
std::string getString(const Attribute &attr)
Get string value.
constexpr double two_pi
The value of .
virtual void setPhase(double phi)
Set phase.
virtual void setAmplitude(double V)
Set amplitude.
virtual void setFieldMapFN(const std::string &fmapfn)
Set the name of the field map.
void setElement(ElementBase *)
Assign new CLASSIC element.
bool getBool(const Attribute &attr)
Return logical value.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
virtual void setPhasem(double phase) override
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
virtual void setAmplitudem(double vPeak)
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void initWakefunction(const ElementBase &element)
virtual void setAutophaseVeto(bool veto=true)
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
virtual void update()
Update the embedded CLASSIC cavity.
virtual ~OpalTravelingWave()
double getReal(const Attribute &attr)
Return real value.
virtual void setDesignEnergy(const double &ekin, bool changeable=true) override
virtual void setElementLength(double length)
Set design length.
OpalTravelingWave()
Exemplar constructor.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void setFrequency(double f)
Set frequency.
virtual OpalTravelingWave * clone(const std::string &name)
Make clone.
virtual void setAmplitudeError(double vPeakError)
void setMode(double mode)
virtual void setPhaseError(double phaseError)
static OpalWake * find(const std::string &name)
Find named WAKE.
virtual void update()
Update the embedded CLASSIC element.
void registerOwnership() const