32 "The \"TRAVELINGWAVE\" element defines a traveling wave structure."),
35 (
"VOLT",
"RF voltage in MV/m");
37 (
"DVOLT",
"RF voltage error in MV/m");
39 (
"FREQ",
"RF frequency in MHz");
41 (
"LAG",
"Phase lag in rad");
43 (
"DLAG",
"Phase lag error in rad");
45 (
"HARMON",
"Harmonic number");
49 (
"PG",
"RF power in MW");
51 (
"SHUNT",
"Shunt impedance in MOhm");
53 (
"TFILL",
"Fill time in microseconds");
55 (
"FMAPFN",
"Filename for the fieldmap");
57 (
"FAST",
"Faster but less accurate",
true);
59 (
"APVETO",
"Do not use this cavity in the Autophase procedure",
false);
61 (
"CAVITYTYPE",
"STANDING or TRAVELING wave cavity in photoinjector and LINAC; SINGLEGAP or DOUBLEGAP cavity in cyclotron");
63 (
"NUMCELLS",
"Number of cells in a TW structure");
65 (
"DESIGNENERGY",
"the mean energy of the particles at exit", -1.0);
67 (
"MODE",
"The phase shift between neighboring cells in 2*pi", 1.0/3.0);
virtual std::string getFieldMapFN() const
virtual void setPhasem(double phase) override
virtual void setAmplitudeError(double vPeakError)
static AttCell * registerStringAttribute(const std::string &name)
Register a ``string'' element attribute.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
ValueFlag
Switch for value desired on ATTLIST command.
Representation for a RF cavity.
constexpr double two_pi
The value of .
virtual ElementBase * removeWrappers()
Return the design element.
virtual void setElementLength(double length)
Set design length.
virtual void setAmplitudem(double vPeak)
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual void setFrequencym(double freq)
bool getBool(const Attribute &attr)
Return logical value.
void initWakefunction(ElementBase &element)
static std::map< std::string, OwnPtr< AttCell > > attributeRegistry
The registry for named attributes.
OpalTravelingWave()
Exemplar constructor.
const std::string & getOpalName() const
Return object name.
virtual double getAmplitudeError() const
virtual void setPhase(double phi)
Set phase.
static OpalWake * find(const std::string &name)
Find named WAKE.
void setNumCells(int NumCells)
Base class for all beam line elements.
virtual double getPhaseError() const
void setElement(ElementBase *)
Assign new CLASSIC element.
void registerOwnership() const
virtual void update()
Update the embedded CLASSIC element.
virtual void setFieldMapFN(std::string fmapfn)
Set the name of the field map.
virtual ~OpalTravelingWave()
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
ElementBase * getElement() const
Return the embedded CLASSIC element.
virtual void setAutophaseVeto(bool veto=true)
virtual void setFrequency(double f)
Set frequency.
virtual void setFast(bool fast)
virtual double getPhase() const
Get phase.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
void setMode(double mode)
virtual double getAmplitude() const
Get amplitude.
virtual OpalTravelingWave * clone(const std::string &name)
Make clone.
virtual double getFrequency() const
Get frequency.
virtual void setPhaseError(double phaseError)
double getReal(const Attribute &attr)
Return real value.
virtual void update()
Update the embedded CLASSIC cavity.
virtual void setDesignEnergy(const double &ekin, bool changeable=true) override
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
virtual void setAmplitude(double V)
Set amplitude.
std::string getString(const Attribute &attr)
Get string value.