Class IdealRfGap
- All Implemented Interfaces:
IRfGap,IComponent,IElement
Represents the action of an ideal RF gap. Gap is modeled as a thin element whose accelerating action is given by the Panofsky formula.
The gap provides acceleration to the propagation probe as well as longitudinal focusing and radial defocusing. These mechanisms are implemented according to that provided by an ideal gap where the effects can be described analytically.
- Since:
- November 22, 2005
- Author:
- Christopher K. Allen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameters for XAL MODEL LATTICE dtdstatic final StringDescription of the Fieldstatic final StringDescription of the Fieldstatic final Stringthe string type identifier for all IdealRfGap objectsFields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePosFields inherited from interface xal.model.IElement
LIGHT_SPEED, PERMEABILITY, PERMITTIVITY, UNIT_CHARGE -
Constructor Summary
ConstructorsConstructorDescriptionJavaBean constructor - creates a new uninitialized instance of IdealRfGap BE CAREFULIdealRfGap(String strId, double dblETL, double dblPhase, double dblFreq) Creates a new instance of IdealRfGap -
Method Summary
Modifier and TypeMethodDescriptiondoublebetaMidGap(IProbe probe) Compute and return the mid-gap normalized velocity for the given probe.doublecompLongFocusing(IProbe probe) Get the longitudinal focusing constant for a particular probe.doublecompTransFocusing(IProbe probe) Get the transverse focusing constant for a particular probe.voidCompute the synchronous phase and the energy gain for a cavity gap.doubleelapsedTime(IProbe probe) Returns the time taken for the probe to propagate through element.doubleenergyGain(IProbe probe) Compute the energy gain of the RF gap for a probe including the effects of calculating the phase advance.doublereturn the cell length (m)doublegetE0()Get the on accelerating field (V/m)doubleReturn the energy gain of a cavity gap previously calculated.doublegetETL()Return the ETL product of the gap, where E is the longitudinal electric field, T is the transit time factor, and L is the gap length.doubleGet the operating frequency of the RF gap.doublegetPhase()Return the RF phase delay of the gap with respect to the synchronous particle.doubleReturn the synchronous phase of a cavity gap, which must be previously calculated using computeSynchronousPhase.voidinitializeFrom(LatticeElement element) Conversion method to be provided by the userbooleanreturn whether this gap is the initial gap of a cavityvoidprint(PrintWriter os) Dump current state and content to output stream.voidsetE0(double e) Set the on accelerating field @ param E - the on axis field (V/m)voidsetETL(double dblETL) Set the ETL product of the RF gap where E is the longitudinal electric field of the gap, T is the transit time factor of the gap, L is the length of the gap.voidsetFrequency(double dblFreq) Set the operating frequency of the RF gap.voidsetPhase(double dblPhase) Set the phase delay of the RF in gap with respect to the synchronous particle.doublesimpleEnergyGain(IProbe probe) Compute the energy gain of the RF gap for a probe assuming a fixed default phase at the gap center.protected PhaseMaptransferMap(IProbe probe) Compute the transfer map for an ideal RF gap.doubleCompute the wavelength of the RF.Methods inherited from class xal.model.elem.ThinElement
applyErrors, elapsedTime, energyGain, getLength, longitudinalPhaseAdvance, longitudinalPhaseAdvance, transferMapMethods inherited from class xal.model.elem.Element
addCloseElements, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getLatticePosition, getNodeLen, getNodePos, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getType, getUID, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setParent, setPhiX, setPhiY, setPhiZ, setPosition, toString
-
Field Details
-
TYPE
the string type identifier for all IdealRfGap objects- See Also:
-
PARAM_ETL
Parameters for XAL MODEL LATTICE dtd- See Also:
-
PARAM_PHASE
Description of the Field- See Also:
-
PARAM_FREQ
Description of the Field- See Also:
-
-
Constructor Details
-
IdealRfGap
Creates a new instance of IdealRfGap- Parameters:
strId- instance identifier of elementdblETL- field/transit time/length factor for gap (in volts )dblPhase- operating phase of gap (in radians )dblFreq- operating RF frequency of gap (in Hertz )
-
IdealRfGap
public IdealRfGap()JavaBean constructor - creates a new uninitialized instance of IdealRfGap BE CAREFUL
-
-
Method Details
-
getETL
public double getETL()Return the ETL product of the gap, where E is the longitudinal electric field, T is the transit time factor, and L is the gap length. -
getPhase
public double getPhase()Return the RF phase delay of the gap with respect to the synchronous particle. -
getFrequency
public double getFrequency()Get the operating frequency of the RF gap.- Specified by:
getFrequencyin interfaceIRfGap- Returns:
- frequency of RF gap (in Hertz )
-
isFirstCell
public boolean isFirstCell()return whether this gap is the initial gap of a cavity- Returns:
- The firstGap value
-
setETL
public void setETL(double dblETL) Set the ETL product of the RF gap where E is the longitudinal electric field of the gap, T is the transit time factor of the gap, L is the length of the gap.The maximum energy gain from the gap is given by qETL where q is the charge (in coulombs) of the species particle.
-
setPhase
public void setPhase(double dblPhase) Set the phase delay of the RF in gap with respect to the synchronous particle. The actual energy gain from the gap is given by qETLcos(dblPhi) where dbkPhi is the phase delay. -
setFrequency
public void setFrequency(double dblFreq) Set the operating frequency of the RF gap.- Specified by:
setFrequencyin interfaceIRfGap- Parameters:
dblFreq- frequency of RF gap (in Hertz )
-
setE0
public void setE0(double e) Set the on accelerating field @ param E - the on axis field (V/m) -
getE0
public double getE0()Get the on accelerating field (V/m) -
getCellLength
public double getCellLength()return the cell length (m)- Returns:
- The cellLength value
-
wavelengthRF
public double wavelengthRF()Compute the wavelength of the RF.- Returns:
- RF wavelength in meters
-
betaMidGap
Compute and return the mid-gap normalized velocity for the given probe. NOTE: - Because of the state-dependent nature of the energy calculations (this needs to be fixed), this function will only work correctly if the function energyGain() is consistent.- Parameters:
probe- probe containing energy information- Returns:
- average or "mid-gap" velocity in units of c
- See Also:
-
elapsedTime
Returns the time taken for the probe to propagate through element.- Specified by:
elapsedTimein classThinElement- Parameters:
probe- propagating probe- Returns:
- value of zero
-
energyGain
Compute the energy gain of the RF gap for a probe including the effects of calculating the phase advance.- Specified by:
energyGainin classThinElement- Parameters:
probe- uses the particle species charge- Returns:
- energy gain for this probe (in electron-volts )
-
transferMap
Compute the transfer map for an ideal RF gap.- Specified by:
transferMapin classThinElement- Parameters:
probe- compute transfer map using parameters from this probe- Returns:
- transfer map for the probe
- Throws:
ModelException- this should not occur
-
simpleEnergyGain
Compute the energy gain of the RF gap for a probe assuming a fixed default phase at the gap center.- Parameters:
probe- uses the particle species charge- Returns:
- energy gain for this probe (in electron-volts )
-
compTransFocusing
Get the transverse focusing constant for a particular probe. The focusing constant is used in the construction of the transfer matrix for the RF gap. A gap provides longitudinal focusing and transverse defocusing as well as a gain in beam energy. This focusing constant describes the effect in the transverse direction, which is defocusing and, therefore, negative.The value represents the thin lens focusing constant for an ideal RF gap (this is the inverse of the focal length). To compute the focusing action for the lens we must include beam energy, which is changing through the gap. We use the value of beta for which the beam has received half the total energy gain.
- Parameters:
probe- beam energy and particle charge are taken from the probe- Returns:
- (de)focusing constant (in radians/meter )
-
compLongFocusing
Get the longitudinal focusing constant for a particular probe. The focusing constant is used in the construction of the transfer matrix for the RF gap. A gap provides longitudinal focusing and transverse defocusing as well as a gain in beam energy. This focusing constant describes the effect in the longitudinal direction, which is focusing and, therefore, positive.The value represents the thin lens focusing constant for an ideal RF gap (this is the inverse of the focal length). To compute the focusing action for the lens we must include beam energy, which is changing through the gap. We use the value of beta for which the beam has received half the total energy gain.
- Parameters:
probe- beam energy and particle charge are taken from the probe- Returns:
- (de)focusing constant (in radians/meter )
-
print
Dump current state and content to output stream. -
initializeFrom
Conversion method to be provided by the user- Specified by:
initializeFromin interfaceIComponent- Overrides:
initializeFromin classElement- Parameters:
element- the SMF node to convert
-
computeSynchronousPhaseAndEnergyGain
Description copied from interface:IRfGapCompute the synchronous phase and the energy gain for a cavity gap.- Specified by:
computeSynchronousPhaseAndEnergyGainin interfaceIRfGap
-
getSynchronousPhase
public double getSynchronousPhase()Description copied from interface:IRfGapReturn the synchronous phase of a cavity gap, which must be previously calculated using computeSynchronousPhase.- Specified by:
getSynchronousPhasein interfaceIRfGap- Returns:
- synchronous phase [rad]
-
getEnergyGain
public double getEnergyGain()Description copied from interface:IRfGapReturn the energy gain of a cavity gap previously calculated.- Specified by:
getEnergyGainin interfaceIRfGap- Returns:
-