Package xal.smf.impl
Class RfCavity
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.AcceleratorSeq
xal.smf.impl.RfCavity
- All Implemented Interfaces:
Comparable
,ElementType
,DataListener
- Direct Known Subclasses:
CCL
,DTLTank
,ESSRfCavity
,ReBuncher
,SCLCavity
The implementation of the RF Cavity element. The Rf Cavity is the device that
is directly connected to a klystron. There are internal RF gap(s) within this
cavity, which are controlled by the cavity. The RfGaps are a separate class
of type AcceleratorNode. The beam dynamics are done in the RfGap class. Note:
the "knob" connections are to the klystron. The
- Author:
- Nikolay Malitsky, Christopher K. Allen
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccessibleProperty
static final String
final AccessibleProperty
protected RfCavityBucket
RF Cavity parametersstatic final String
static final String
static final String
static final String
static final String
static final String
final AccessibleProperty
final AccessibleProperty
container of the enclosed RfGap(s) in this cavity sorted by positionfinal AccessibleProperty
static final String
final AccessibleProperty
static final String
accelerator node typeFields inherited from class xal.smf.AcceleratorSeq
arrNodes, bucSequence, nodeTable, sequences
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorConstructorRfCavity
(String strId, ChannelFactory channelFactory) ConstructorRfCavity
(String strId, ChannelFactory channelFactory, int intReserve) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBucket
(AttributeBucket buc) Override AcceleratorNode implementation to check for a RfCavityStruct Bucketboolean
addNode
(AcceleratorNode newNode) Method to move a node from one sequence to this sequence warning be careful - need to check node position when moving it about!!boolean
Determine whether the beam is blankeddouble
get the cavity amplitude (MV) and publish this to all the gaps connected to this cavity note the cavity amp [MV] = klystron amplitude * ampFactor where ampFactor is a calibration factor determined experimentallydouble
return the present live set point for the amplitudedouble
Get RF cavity frequency.double
Get the cavity phase relative to the beam (deg) and publish it to all the rf gaps associated with this cavity note the cavity phase = klystron phase + phaseOffset where phaseOffset is a calibration factor determined experimentallydouble
return the present live set point for the phasedouble
double
CKA - Never useddouble
double
getGaps()
method to return the gaps associated with this cavitymethod to return the gaps associated with this cavity as a Listreturns the bucket for the RfField of this cavitydouble
get the length of the active RF accelerating structure in this cavity (m)return a polynomial fit of the "S" transit time factor as a function of betareturn a polynomial fit of the "S" transit time factor for end cells as a function of betareturn a polynomial fit of the "S" transit time factor prime as a function of betareturn a polynomial fit of the "S" transit time factor prime for end cells as a function of betadouble
returns 0 if the gap is part of a 0 mode cavity structure (e.g.return a polynomial fit of the transit time factor as a function of betareturn a polynomial fit of the transit time factor for end cells as a function of betareturn a polynomial fit of the transit time factor prime as a function of betareturn a polynomial fit of the transit time factor prime for end cells as a function of betagetType()
Override to provide type signaturevoid
setBlankBeam
(boolean mode) Blank the beamvoid
setCavAmp
(double newAmp) Set the cavity amplitude [MV] note the cavity amp [MV] = klystron amp * ampFactor where ampFactor is a calibration factor determined experimentallyvoid
setCavPhase
(double newPhase) Set the cavity phase relative to the beam (deg) note the cavity phase = klystron phase + phaseOffset where phaseOffset is a calibration factor determined experimentallyvoid
setDfltCavAmp
(double value) void
setDfltCavPhase
(double value) void
setRfField
(RfCavityBucket buc) sets the bucket for the RfField of this cavitydouble
toAvgCavPhaseFromCavPhase
(double cavityPhase) Convert the cavity phase (phase at entrance to cavity) to average cavity phase by averaging the phase over the gaps.double
toCAFromCavAmpAvg
(double value) Convert the cavity amplitude to channel access.double
toCAFromCavPhaseAvg
(double value) Convert the cavity phase to channel access.double
toCavAmpAvgFromCA
(double rawValue) Convert the raw channel access value to get the cavity amplitude in MV.double
toCavPhaseAvgFromCA
(double rawValue) Convert the raw channel access value to get the cavity phase in degrees.double
toCenterAvgCavPhaseFromCavPhase
(double cavityPhase) Calculate the average phase of the gaps at the center of the cavity from the phase at the entrance to the cavity.void
update
(DataAdaptor adaptor) Collect all of the enclosed rf gaps for conveniencevoid
updateDesignAmp
(double amp) method to set the design amplitudevoid
updateDesignPhase
(double phase) Set the design phaseMethods inherited from class xal.smf.AcceleratorSeq
addNodeAt, addSequenceChain, addSoft, appendNodesOfClassWithQualifier, appendNodesWithQualifier, canPrecede, contains, dataLabel, filterNodesByClass, filterNodesByStatus, formsRing, getAllInclusiveNodes, getAllInclusiveNodes, getAllInclusiveNodesWithQualifier, getAllNodes, getAllNodes, getAllNodesOfType, getAllNodesWithQualifier, getAllSeqs, getAperProfile, getAperProfile, getDistanceBetween, getEntranceID, getIndexOfNode, getLeaves, getLength, getNodeAt, getNodeCount, getNodes, getNodes, getNodesOfClassWithQualifier, getNodesOfClassWithQualifier, getNodesOfClassWithStatus, getNodesOfType, getNodesOfType, getNodesWithQualifier, getNodesWithQualifier, getNodeWithId, getPosition, getPredecessors, getPrimaryAncestor, getRelativePosition, getRelativePosition, getSequence, getSequenceBuc, getSequences, getSequences, getShortestRelativePosition, indexToAddNode, isLinear, orderSequences, recurNodeSearch, recurSeqSearch, removeAllNodes, removeNode, setSequence, sortNodes, sortNodesByProximity, sortNodesByRelativePosition, write, writeAttributes, writeDeeply, writeStatus
Methods inherited from class xal.smf.AcceleratorNode
batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, findChannel, getAccelerator, getAccessibleProperties, getAccessibleProperties, getAlign, getAllChannels, getAndConnectChannel, getAndConnectChannelSetAndReadback, getAper, getBucket, getBuckets, getChannel, getDefaultHandles, getDesignPropertyValue, getEId, getHandles, getId, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getProperties, getReadbackHandles, getRollAngle, getSDisplay, getSetHandle, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isChannelSettable, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setDesignPropertyValue, setLength, setLivePropertyValue, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setValueAndVerify, setXOffset, setYawAngle, setYOffset, setZOffset, toString
-
Field Details
-
CAV_AMP_SET_HANDLE
- See Also:
-
CAV_PHASE_SET_HANDLE
- See Also:
-
CAV_AMP_AVG_HANDLE
- See Also:
-
CAV_PHASE_AVG_HANDLE
- See Also:
-
DELTA_TRF_START_HANDLE
- See Also:
-
DELTA_TRF_END_HANDLE
- See Also:
-
T_DELAY_HANDLE
- See Also:
-
BLANK_BEAM_HANDLE
- See Also:
-
amplitude
-
phase
-
deltaTRFStart
-
deltaTRFEnd
-
tDelay
-
blankBeam
-
TYPE
accelerator node type- See Also:
-
bucRfCavity
RF Cavity parameters -
gaps
container of the enclosed RfGap(s) in this cavity sorted by position
NOTE:
An
RfCavityStruct
is anAcceleratorSeq
which is already an ordered list ofAcceleratorNode
s. This attribute and any reliance on it seems dangerously redundant.NOTE:
This appears to be used to process the gaps and only the gaps within this cavity structure.
-
-
Constructor Details
-
RfCavity
Primary Constructor -
RfCavity
Constructor -
RfCavity
Constructor -
RfCavity
Constructor
-
-
Method Details
-
getType
Override to provide type signature- Overrides:
getType
in classAcceleratorSeq
-
addNode
Method to move a node from one sequence to this sequence warning be careful - need to check node position when moving it about!!- Overrides:
addNode
in classAcceleratorSeq
-
update
Collect all of the enclosed rf gaps for convenience- Specified by:
update
in interfaceDataListener
- Overrides:
update
in classAcceleratorSeq
- Parameters:
adaptor
- The adaptor from which to update the data
-
getRfField
returns the bucket for the RfField of this cavity -
setRfField
sets the bucket for the RfField of this cavity -
addBucket
Override AcceleratorNode implementation to check for a RfCavityStruct Bucket- Overrides:
addBucket
in classAcceleratorSeq
-
getCavAmpAvg
get the cavity amplitude (MV) and publish this to all the gaps connected to this cavity note the cavity amp [MV] = klystron amplitude * ampFactor where ampFactor is a calibration factor determined experimentally- Throws:
GetException
-
toCavAmpAvgFromCA
public double toCavAmpAvgFromCA(double rawValue) Convert the raw channel access value to get the cavity amplitude in MV.- Parameters:
rawValue
- the raw channel value- Returns:
- the cavity amplitude in MV
-
toCAFromCavAmpAvg
public double toCAFromCavAmpAvg(double value) Convert the cavity amplitude to channel access.- Parameters:
value
- the cavity amplitude- Returns:
- the channel access value
-
getCavPhaseAvg
Get the cavity phase relative to the beam (deg) and publish it to all the rf gaps associated with this cavity note the cavity phase = klystron phase + phaseOffset where phaseOffset is a calibration factor determined experimentally- Throws:
GetException
-
toCavPhaseAvgFromCA
public double toCavPhaseAvgFromCA(double rawValue) Convert the raw channel access value to get the cavity phase in degrees.- Parameters:
rawValue
- the raw channel value- Returns:
- the cavity phase in degrees
-
toCAFromCavPhaseAvg
public double toCAFromCavPhaseAvg(double value) Convert the cavity phase to channel access.- Parameters:
value
- the cavity phase- Returns:
- the channel access value
-
getDfltCavAmp
public double getDfltCavAmp()- Returns:
- default (design) cavity amplitude (MV)
-
getDfltCavPhase
public double getDfltCavPhase()- Returns:
- default (design) cavity phase (deg)
-
setDfltCavAmp
public void setDfltCavAmp(double value) -
setDfltCavPhase
public void setDfltCavPhase(double value) -
getDfltAvgCavPhase
public double getDfltAvgCavPhase()- Returns:
- default (design) average cavity phase (averaged over all RF gaps in the cavity)
-
getDfltAvgCavTTF
public double getDfltAvgCavTTF()CKA - Never used- Returns:
- default (design) average cavity TTF (averaged over all RF gaps in the cavity)
-
getRFLength
public double getRFLength()get the length of the active RF accelerating structure in this cavity (m) -
toAvgCavPhaseFromCavPhase
public double toAvgCavPhaseFromCavPhase(double cavityPhase) Convert the cavity phase (phase at entrance to cavity) to average cavity phase by averaging the phase over the gaps.- Parameters:
cavityPhase
- the phase at the start of the cavity.- Returns:
- the average phase of the cavity
-
toCenterAvgCavPhaseFromCavPhase
public double toCenterAvgCavPhaseFromCavPhase(double cavityPhase) Calculate the average phase of the gaps at the center of the cavity from the phase at the entrance to the cavity.- Parameters:
cavityPhase
- the phase at the start of the cavity.- Returns:
- the average phase of the cavity
-
setCavAmp
Set the cavity amplitude [MV] note the cavity amp [MV] = klystron amp * ampFactor where ampFactor is a calibration factor determined experimentally- Throws:
PutException
-
setCavPhase
Set the cavity phase relative to the beam (deg) note the cavity phase = klystron phase + phaseOffset where phaseOffset is a calibration factor determined experimentally- Throws:
PutException
-
getCavAmpSetPoint
return the present live set point for the amplitude- Throws:
GetException
-
getCavPhaseSetPoint
return the present live set point for the phase- Throws:
GetException
-
getBlankBeam
Determine whether the beam is blanked- Returns:
- true if the beam is blanked and false if not
- Throws:
GetException
-
setBlankBeam
Blank the beam- Parameters:
mode
- true to blank the beam and false for continuous on- Throws:
PutException
-
getGaps
method to return the gaps associated with this cavity -
getGapsAsList
method to return the gaps associated with this cavity as a List -
updateDesignPhase
public void updateDesignPhase(double phase) Set the design phase- Parameters:
phase
- new design phase (deg)
-
updateDesignAmp
public void updateDesignAmp(double amp) method to set the design amplitude- Parameters:
amp
- new design amplitude (MV)
-
getTTFFit
return a polynomial fit of the transit time factor as a function of beta -
getTTFPrimeFit
return a polynomial fit of the transit time factor prime as a function of beta -
getSTFFit
return a polynomial fit of the "S" transit time factor as a function of beta -
getSTFPrimeFit
return a polynomial fit of the "S" transit time factor prime as a function of beta -
getTTFFitEnd
return a polynomial fit of the transit time factor for end cells as a function of beta -
getTTFPrimeFitEnd
return a polynomial fit of the transit time factor prime for end cells as a function of beta -
getSTFFitEnd
return a polynomial fit of the "S" transit time factor for end cells as a function of beta -
getSTFPrimeFitEnd
return a polynomial fit of the "S" transit time factor prime for end cells as a function of beta -
getStructureMode
public double getStructureMode()returns 0 if the gap is part of a 0 mode cavity structure (e.g. DTL) returns 1 if the gap is part of a pi mode cavity (e.g. CCL, Superconducting) -
getCavFreq
public double getCavFreq()Get RF cavity frequency.- Returns:
- RF cavity frequency (MHz)
-