Class TwissProbe

All Implemented Interfaces:
IProbe, IArchive

public class TwissProbe extends BunchProbe<TwissProbeState>

EnvelopeProbe represents the RMS beam envelopes of a beam. Specifically, the state of this probe is the 7x7 matrix of homogeneous phase space moments up to, and including second order. This is the correlation matrix for the beam and is represented as

    χ = < zzT>

where z =(x,x',y,y',z,z',1) is the vector of homogeneous phase space coordinates, and <.> is the moment operator with respect to the beam distribution.

Author:
Christopher K. Allen, Craig McChesney
  • Constructor Details

    • TwissProbe

      public TwissProbe()
      Default Constructor. Creates a new, empty instance of TwissProbe
    • TwissProbe

      public TwissProbe(TwissProbe prbParent)
      Copy constructor - clones the argument
      Parameters:
      prbParent - TwissProbe object to be cloned
    • TwissProbe

      public TwissProbe(DataAdaptor daSource) throws DataFormatException
      Initializing constructor - initialize from data adaptor Create an new TwissProbe object and initialize its state variables according to the data in the data source exposing the DataAdaptor interface.
      Parameters:
      daSource - data source containing state variable values
      Throws:
      DataFormatException - unable to parse, bad data format
  • Method Details

    • initializeFrom

      @Deprecated protected void initializeFrom(Probe<TwissProbeState> probe)
      Deprecated.
      Never used
      Initialize this probe from the one specified.
      Overrides:
      initializeFrom in class Probe<TwissProbeState>
      Parameters:
      probe - to copy
    • copy

      public TwissProbe copy()
      Make a deep copy of this probe and return it.
      Specified by:
      copy in class Probe<TwissProbeState>
      Returns:
      a clone of this probe object
      Since:
      Nov 5, 2013
      See Also:
    • 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 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 envTwiss)
      Set all the twiss parameters for the probe
      Parameters:
      envTwiss - 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
    • getBetatronPhase

      public R3 getBetatronPhase()
      Returns the betatron phase with space charge for all three phase planes.
      Returns:
      vector (ψxyz) of betatron phases in radians
    • 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
    • getTwiss

      public Twiss3D getTwiss()
      Returns the array of Twiss parameters for this state for all three planes.
      Returns:
      array(twiss-H, twiss-V, twiss-L)
    • 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
    • createProbeState

      public TwissProbeState createProbeState()
      Creates a snapshot of the current state and returns it as a ProbeState object of the proper type.
      Specified by:
      createProbeState in class BunchProbe<TwissProbeState>
      Returns:
      a new TwissProbeState encapsulating the probe's current state
      See Also:
    • createEmptyProbeState

      public TwissProbeState createEmptyProbeState()
      Creates a new, empty TwissProbeState.
      Specified by:
      createEmptyProbeState in class BunchProbe<TwissProbeState>
      Returns:
      a new, empty TwissProbeState
      Since:
      Jul 1, 2014
    • createTrajectory

      public Trajectory<TwissProbeState> createTrajectory()
      Creates a Trajectory<TwissProbeState> object of the proper type for saving the probe's history.
      Specified by:
      createTrajectory in class Probe<TwissProbeState>
      Returns:
      a new, empty Trajectory<TwissProbeState> for saving the probe's history
    • readStateFrom

      protected TwissProbeState readStateFrom(DataAdaptor container) throws DataFormatException
      Creates a new TwissProbeState object and initializes it from the data source exposing the given DataAdaptor interface.
      Specified by:
      readStateFrom in class Probe<TwissProbeState>
      Parameters:
      container - DataAdaptor to read a Trajectory from
      Returns:
      the newly instantiated and initialized TwissProbeState object
      Throws:
      DataFormatException - error encountered reading the DataAdaptor
      Since:
      Nov 5, 2013
      See Also: