Class TwissProbeState

All Implemented Interfaces:
IProbeState, IArchive

public class TwissProbeState extends BunchProbeState<TwissProbeState>
Saves the state of a TwissProbe at a particular instance.
Version:
$id:
Author:
Christopher K. Allen
  • Constructor Details

    • TwissProbeState

      public TwissProbeState()
      Default constructor. Create a new, empty EnvelopeProbeState object.
    • TwissProbeState

      public TwissProbeState(TwissProbeState twissProbeState)
      Copy constructor for TwissProbeState. Initializes the new TwissProbeState objects with the state attributes of the given TwissProbeState.
      Parameters:
      twissProbeState - initializing state
      Since:
      Jun 26, 2014
    • TwissProbeState

      public TwissProbeState(TwissProbe probe)
      Initializing Constructor. Create a new TwissProbeState object and initialize it to the state of the probe argument.
      Parameters:
      probe - TwissProbe containing initializing state information
  • Method Details

    • setCentroid

      public void setCentroid(PhaseVector vecCentroid)
      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

      public void setResponseMatrix(PhaseMatrix matResp)
      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

      public void setBetatronPhase(R3 vecPhase)
      Set the betatron phase with space charge for each phase plane.
      Parameters:
      vecPhase - vector (ψxyz) of betatron phases in radians
    • setTwiss

      public void setTwiss(Twiss3D.IND_3D iPlane, Twiss twiss)
      Set the Twiss parameters for the given phase plane.
      Parameters:
      iPlane - phase plane index
      twiss - twiss parameters
    • setTwiss

      public void setTwiss(Twiss3D arrTwiss)
      Set all the twiss parameters for the probe
      Parameters:
      arrTwiss - new 3 dimensional array of Twiss objects (hor, vert,long)
      See Also:
    • getCentroid

      public PhaseVector 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

      public PhaseMatrix getResponseMatrix()
      Get the first-order response matrix accumulated by the probe since its initial state.
      Returns:
      first-order response matrix in homogeneous coordinates
    • getTwiss

      public Twiss getTwiss(Twiss3D.IND_3D iPlane)
      Returns the Twiss parameters for the given phase plane.
      Parameters:
      iPlane - phase plane index
      Returns:
      twiss parameters for given phase plane
    • getTwiss3D

      public Twiss3D 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

      public PhaseVector 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 the IPhaseState interface

      Returns:
      vector (x,x',y,y',z,z',1) of phase space coordinates
      See Also:
    • getFixedOrbit

      public PhaseVector 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

      public Twiss[] getTwiss()
      Returns the array of Twiss parameters for this state for all three planes.
      Returns:
      array(twiss-H, twiss-V, twiss-L)
    • getBetatronPhase

      public R3 getBetatronPhase()
      Returns the betatron phase with space charge for all three phase planes.
      Returns:
      vector (ψxyz) of betatron phases in radians
    • copy

      public TwissProbeState copy()
      Implements the clone operation required by the base class ProbeState.
      Specified by:
      copy in class ProbeState<TwissProbeState>
      Returns:
      a deep copy of this object.
      Since:
      Jun 27, 2014
      See Also:
    • addPropertiesTo

      protected void addPropertiesTo(DataAdaptor daSink)
      Save the state values particular to TwissProbeState objects to the data sink.
      Overrides:
      addPropertiesTo in class BunchProbeState<TwissProbeState>
      Parameters:
      daSink - data sink represented by DataAdaptor interface
    • readPropertiesFrom

      protected void readPropertiesFrom(DataAdaptor daSource) throws DataFormatException
      Recover the state values particular to TwissProbeState objects from the data source.
      Overrides:
      readPropertiesFrom in class BunchProbeState<TwissProbeState>
      Parameters:
      daSource - data source represented by a DataAdaptor interface
      Throws:
      DataFormatException - state information in data source is malformatted