Package xal.model.probe.traj
Class TwissProbeState
- All Implemented Interfaces:
IProbeState
,IArchive
Saves the state of a
TwissProbe
at a particular instance.- Version:
- $id:
- Author:
- Christopher K. Allen
-
Field Summary
Fields inherited from class xal.model.probe.traj.ProbeState
STATE_LABEL, TYPE_LABEL
Fields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TwissProbeState
(TwissProbeState twissProbeState) Copy constructor for TwissProbeState.TwissProbeState
(TwissProbe probe) Initializing Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPropertiesTo
(DataAdaptor daSink) Save the state values particular toTwissProbeState
objects to the data sink.copy()
Implements the clone operation required by the base classProbeState
.Returns the betatron phase with space charge for all three phase planes.Get the centroid location of the beam bunch in homogeneous coordinates.Get the fixed orbit about which betatron oscillations occur.Returns homogeneous phase space coordinates of the centroid.Get the first-order response matrix accumulated by the probe since its initial state.Twiss[]
getTwiss()
Returns the array of Twiss parameters for this state for all three planes.getTwiss
(Twiss3D.IND_3D iPlane) Returns the Twiss parameters for the given phase plane.Returns the Twiss parameters for this state for all three planes.protected void
readPropertiesFrom
(DataAdaptor daSource) Recover the state values particular toTwissProbeState
objects from the data source.double[]
Convenience Method: Returns the rms emittances for this state as from the individual Twiss parameters.void
setBetatronPhase
(R3 vecPhase) Set the betatron phase with space charge for each phase plane.void
setCentroid
(PhaseVector vecCentroid) Set the centroid location of the beam bunch in homogeneous coordinates.void
setResponseMatrix
(PhaseMatrix matResp) Set the first-order response matrix accumulated by the Envelope since its initial state.void
Set all the twiss parameters for the probevoid
setTwiss
(Twiss3D.IND_3D iPlane, Twiss twiss) Set the Twiss parameters for the given phase plane.Methods inherited from class xal.model.probe.traj.BunchProbeState
beamDCPerveance, beamPerveance, bunchCharge, getBeamCurrent, getBunchFrequency, setBeamCurrent, setBunchFrequency, toString
Methods inherited from class xal.model.probe.traj.ProbeState
computeBetaFromGamma, computeGammaFromBeta, computeGammaFromW, getBeta, getBetaGamma, getElementId, getElementTypeId, getGamma, getHardwareNodeId, getKineticEnergy, getLongitudinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesRestEnergy, getTime, load, save, setElementId, setElementTypeId, setHardwareNodeId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesRestEnergy, setTime
-
Constructor Details
-
TwissProbeState
public TwissProbeState()Default constructor. Create a new, emptyEnvelopeProbeState
object. -
TwissProbeState
Copy constructor for TwissProbeState. Initializes the newTwissProbeState
objects with the state attributes of the givenTwissProbeState
.- Parameters:
twissProbeState
- initializing state- Since:
- Jun 26, 2014
-
TwissProbeState
Initializing Constructor. Create a newTwissProbeState
object and initialize it to the state of the probe argument.- Parameters:
probe
-TwissProbe
containing initializing state information
-
-
Method Details
-
setCentroid
Set the centroid location of the beam bunch in homogeneous coordinates.- Parameters:
vecCentroid
- new centroid of the bunch (x,x',y,y',z,z',1)
-
setResponseMatrix
Set the first-order response matrix accumulated by the Envelope since its initial state. Note that this response includes the effects of space charge.- Parameters:
matResp
- first-order response matrix in homogeneous coordinates
-
setBetatronPhase
Set the betatron phase with space charge for each phase plane.- Parameters:
vecPhase
- vector (ψx,ψy,ψz) of betatron phases in radians
-
setTwiss
Set the Twiss parameters for the given phase plane.- Parameters:
iPlane
- phase plane indextwiss
- twiss parameters
-
setTwiss
Set all the twiss parameters for the probe- Parameters:
arrTwiss
- new 3 dimensional array of Twiss objects (hor, vert,long)- See Also:
-
getCentroid
Get the centroid location of the beam bunch in homogeneous coordinates.- Returns:
- centroid of the bunch (x,x',y,y',z,z',1)
-
getResponseMatrix
Get the first-order response matrix accumulated by the probe since its initial state.- Returns:
- first-order response matrix in homogeneous coordinates
-
getTwiss
Returns the Twiss parameters for the given phase plane.- Parameters:
iPlane
- phase plane index- Returns:
- twiss parameters for given phase plane
-
getTwiss3D
Returns the Twiss parameters for this state for all three planes.- Returns:
- all three twiss parameter sets
-
rmsEmittances
public double[] rmsEmittances()Convenience Method: Returns the rms emittances for this state as from the individual Twiss parameters.- Returns:
- array (ex,ey,ez) of rms emittances
-
getPhaseCoordinates
Returns homogeneous phase space coordinates of the centroid. The units are meters and radians.
CKA NOTE:
- This method simply returns the value of TwissProbeState#getCentroid()
- It is included to support theIPhaseState
interface- Returns:
- vector (x,x',y,y',z,z',1) of phase space coordinates
- See Also:
-
getFixedOrbit
Get the fixed orbit about which betatron oscillations occur. CKA NOTE: This method simply returns the value of getCentroid(). It is here for backward compatibility just to satisfy the IPhaseState interface.- Returns:
- the fixed orbit vector (x,x',y,y',z,z',1)
-
getTwiss
Returns the array of Twiss parameters for this state for all three planes.- Returns:
- array(twiss-H, twiss-V, twiss-L)
-
getBetatronPhase
Returns the betatron phase with space charge for all three phase planes.- Returns:
- vector (ψx,ψy,ψz) of betatron phases in radians
-
copy
Implements the clone operation required by the base classProbeState
.- Specified by:
copy
in classProbeState<TwissProbeState>
- Returns:
- a deep copy of this object.
- Since:
- Jun 27, 2014
- See Also:
-
addPropertiesTo
Save the state values particular toTwissProbeState
objects to the data sink.- Overrides:
addPropertiesTo
in classBunchProbeState<TwissProbeState>
- Parameters:
daSink
- data sink represented byDataAdaptor
interface
-
readPropertiesFrom
Recover the state values particular toTwissProbeState
objects from the data source.- Overrides:
readPropertiesFrom
in classBunchProbeState<TwissProbeState>
- Parameters:
daSource
- data source represented by aDataAdaptor
interface- Throws:
DataFormatException
- state information in data source is malformatted
-