public class RfCavity extends AcceleratorSeq
Modifier and Type | Class and Description |
---|---|
static class |
RfCavity.Property
accessible properties
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<RfGap> |
_gaps
container of the enclosed RfGap(s) in this cavity sorted by position
|
static java.lang.String |
BLANK_BEAM_HANDLE |
static java.lang.String |
CAV_AMP_AVG_HANDLE |
static java.lang.String |
CAV_AMP_SET_HANDLE |
static java.lang.String |
CAV_PHASE_AVG_HANDLE |
static java.lang.String |
CAV_PHASE_SET_HANDLE |
static java.lang.String |
DELTA_TRF_END_HANDLE |
static java.lang.String |
DELTA_TRF_START_HANDLE |
protected RfCavityBucket |
m_bucRfCavity
RF Cavity parameters
|
static java.lang.String |
s_strType
accelerator node type
|
static java.lang.String |
T_DELAY_HANDLE |
_sequences, m_arrNodes, m_bucSequence, nodeTable
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_dblS, m_mapAttrs, m_objAccel, m_seqParent, m_strEId, m_strId, m_strPId
Constructor and Description |
---|
RfCavity(java.lang.String strId)
Constructor
|
RfCavity(java.lang.String strId,
int intReserve)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addBucket(AttributeBucket buc)
Override AcceleratorNode implementation to check for a RfCavityStruct Bucket
|
boolean |
getBlankBeam()
Determine whether the beam is blanked
|
double |
getCavAmpAvg()
get the cavity amplitude (kV)
and publish this to all the gaps connected to this cavity
note the cavity amp [kV] = klystron amplitude * ampFactor
where ampFactor is a calibration factor determined experimentally
|
double |
getCavAmpSetPoint()
return the present live set point for the amplitude
|
double |
getCavFreq()
Get RF cavity frequency.
|
double |
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
|
double |
getCavPhaseSetPoint()
return the present live set point for the phase
|
double |
getDesignPropertyValue(java.lang.String propertyName)
Get the design value for the specified property
|
double |
getDfltAvgCavPhase() |
double |
getDfltAvgCavTTF() |
double |
getDfltCavAmp() |
double |
getDfltCavPhase() |
java.util.Collection<RfGap> |
getGaps()
method to return the gaps associated with this cavity
|
java.util.List<RfGap> |
getGapsAsList()
method to return the gaps associated with this cavity as a List
|
Channel[] |
getLivePropertyChannels(java.lang.String propertyName)
Get the array of channels for the specified property
|
double |
getLivePropertyValue(java.lang.String propertyName,
double[] channelValues)
Get the live property value for the corresponding array of channel values in the order given by getLivePropertyChannels()
|
RfCavityBucket |
getRfField()
returns the bucket for the RfField of this cavity
|
double |
getRFLength()
get the length of the active RF accelerating structure in this cavity (m)
|
UnivariateRealPolynomial |
getSTFFit()
return a polynomial fit of the "S" transit time factor as a function of beta
|
UnivariateRealPolynomial |
getSTFFitEnd()
return a polynomial fit of the "S" transit time factor for end cells as a function of beta
|
UnivariateRealPolynomial |
getSTFPrimeFit()
return a polynomial fit of the "S" transit time factor prime as a function of beta
|
UnivariateRealPolynomial |
getSTFPrimeFitEnd()
return a polynomial fit of the "S" transit time factor prime for end cells as a function of beta
|
double |
getStructureMode()
returns 0 if the gap is part of a 0 mode cavity structure (e.g.
|
UnivariateRealPolynomial |
getTTFFit()
return a polynomial fit of the transit time factor as a function of beta
|
UnivariateRealPolynomial |
getTTFFitEnd()
return a polynomial fit of the transit time factor for end cells as a function of beta
|
UnivariateRealPolynomial |
getTTFPrimeFit()
return a polynomial fit of the transit time factor prime as a function of beta
|
UnivariateRealPolynomial |
getTTFPrimeFitEnd()
return a polynomial fit of the transit time factor prime for end cells as a function of beta
|
java.lang.String |
getType()
Override to provide type signature
|
protected void |
publishAmplitude(double newCavAmp) |
void |
publishPhase(double newCavPhase) |
void |
setBlankBeam(boolean mode)
Blank the beam
|
void |
setCavAmp(double newAmp)
Set the cavity amplitude [kV]
note the cavity amp [kV] = klystron amp * ampFactor
where ampFactor is a calibration factor determined experimentally
|
void |
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 experimentally
|
void |
setDfltCavAmp(double value) |
void |
setDfltCavPhase(double value) |
void |
setRfField(RfCavityBucket buc)
sets the bucket for the RfField of this cavity
|
double |
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 kV.
|
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 convenience
|
void |
updateDesignAmp(double amp)
method to set the design amplitude
|
void |
updateDesignPhase(double phase)
Set the design phase
|
addNode, addNodeAt, addSequenceChain, addSoft, appendNodesOfClassWithQualifier, appendNodesWithQualifier, canPrecede, contains, dataLabel, filterNodesByClass, filterNodesByStatus, formsRing, getAllInclusiveNodes, getAllInclusiveNodes, getAllInclusiveNodesWithQualifier, getAllNodes, getAllNodes, getAllNodesOfType, getAllNodesWithQualifier, getAllSeqs, 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, writeDeeply
channelSuite, clear, findChannel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getChannel, getEId, getHandles, getId, getParent, getPId, getPitchAngle, getPosition, getRollAngle, getSDisplay, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setXOffset, setYawAngle, setYOffset, setZOffset, toString
public static final java.lang.String CAV_AMP_SET_HANDLE
public static final java.lang.String CAV_PHASE_SET_HANDLE
public static final java.lang.String CAV_AMP_AVG_HANDLE
public static final java.lang.String CAV_PHASE_AVG_HANDLE
public static final java.lang.String DELTA_TRF_START_HANDLE
public static final java.lang.String DELTA_TRF_END_HANDLE
public static final java.lang.String T_DELAY_HANDLE
public static final java.lang.String BLANK_BEAM_HANDLE
public static final java.lang.String s_strType
protected RfCavityBucket m_bucRfCavity
protected java.util.List<RfGap> _gaps
container of the enclosed RfGap(s) in this cavity sorted by position
RfCavityStruct
is an AcceleratorSeq
which is
already an ordered list of AcceleratorNode
s. This
attribute and any reliance on it seems dangerously redundant.
public RfCavity(java.lang.String strId)
public RfCavity(java.lang.String strId, int intReserve)
public java.lang.String getType()
getType
in class AcceleratorSeq
public void update(DataAdaptor adaptor)
update
in interface DataListener
update
in class AcceleratorSeq
adaptor
- The adaptor from which to update the datapublic RfCavityBucket getRfField()
public void setRfField(RfCavityBucket buc)
public void addBucket(AttributeBucket buc)
addBucket
in class AcceleratorSeq
public double getDesignPropertyValue(java.lang.String propertyName)
getDesignPropertyValue
in class AcceleratorNode
public double getLivePropertyValue(java.lang.String propertyName, double[] channelValues)
getLivePropertyValue
in class AcceleratorNode
public Channel[] getLivePropertyChannels(java.lang.String propertyName)
getLivePropertyChannels
in class AcceleratorNode
public double getCavAmpAvg() throws ConnectionException, GetException
ConnectionException
GetException
public double toCavAmpAvgFromCA(double rawValue)
rawValue
- the raw channel valuepublic double toCAFromCavAmpAvg(double value)
value
- the cavity amplitudepublic double getCavPhaseAvg() throws ConnectionException, GetException
ConnectionException
GetException
public double toCavPhaseAvgFromCA(double rawValue)
rawValue
- the raw channel valuepublic double toCAFromCavPhaseAvg(double value)
value
- the cavity phasepublic double getDfltCavAmp()
public double getDfltCavPhase()
public void setDfltCavAmp(double value)
public void setDfltCavPhase(double value)
public double getDfltAvgCavPhase()
public double getDfltAvgCavTTF()
public double getRFLength()
public double toAvgCavPhaseFromCavPhase(double cavityPhase)
cavityPhase
- the phase at the start of the cavity.public double toCenterAvgCavPhaseFromCavPhase(double cavityPhase)
cavityPhase
- the phase at the start of the cavity.public void setCavAmp(double newAmp) throws ConnectionException, PutException
ConnectionException
PutException
public void setCavPhase(double newPhase) throws ConnectionException, PutException
ConnectionException
PutException
public double getCavAmpSetPoint() throws ConnectionException, GetException
ConnectionException
GetException
public double getCavPhaseSetPoint() throws ConnectionException, GetException
ConnectionException
GetException
protected void publishAmplitude(double newCavAmp)
public void publishPhase(double newCavPhase)
public boolean getBlankBeam() throws ConnectionException, GetException
ConnectionException
GetException
public void setBlankBeam(boolean mode) throws ConnectionException, PutException
mode
- true to blank the beam and false for continuous onConnectionException
PutException
public java.util.Collection<RfGap> getGaps()
public java.util.List<RfGap> getGapsAsList()
public void updateDesignPhase(double phase)
phase
- new design phase (deg)public void updateDesignAmp(double amp)
amp
- new design amplitude (kV)public UnivariateRealPolynomial getTTFFit()
public UnivariateRealPolynomial getTTFPrimeFit()
public UnivariateRealPolynomial getSTFFit()
public UnivariateRealPolynomial getSTFPrimeFit()
public UnivariateRealPolynomial getTTFFitEnd()
public UnivariateRealPolynomial getTTFPrimeFitEnd()
public UnivariateRealPolynomial getSTFFitEnd()
public UnivariateRealPolynomial getSTFPrimeFitEnd()
public double getStructureMode()
public double getCavFreq()