Package xal.model.alg

Class Trace3dTracker

java.lang.Object
xal.model.alg.Tracker
xal.model.alg.Trace3dTracker
All Implemented Interfaces:
Remote, IAlgorithm, IArchive, IContextAware

public class Trace3dTracker extends Tracker

Tracking algorithm for EnvelopeProbe's. The EnvelopeProbe's state, which is a CovarianceMatrix object, is advanced using the linear dynamics portion of any beamline element (IElement exposing object) transfer map. The linear portion is represented as a matrix, thus, the state advance is accomplished with a transpose conjugation with this matrix.

The effects of space charge are also included in the dynamics calculations. Space charge effects are also represented with a matrix transpose conjugation, however, the matrix is computation using the values of the probe's correlation matrix. The result is a nonlinear effect. The space charge forces are computed using a linear fit to the fields generated by an ellipsoidal charge distribution with the same statistics described in the probe's correlation matrix. The linear fit is weighted by the beam distribution itself, so it is more accurate in regions of higher charged density. For a complete description see the reference below.

This is a basic algorithm for envelope propagation, almost exact to that used in Trace3D. There is no emittance growth mechanism for RF gaps, however. It was used for direct comparison of results from Trace3D and the XAL online model. All the functionality of this class is contained in EnvelopeTracker so it is no longer supported. However, I am not deprecated this class since it can be used as a light-weight substitute.

NOTES:

· Completed: Replace EllipsoidalCharge with BeamEllipsoid.
· The default value for step size is 0.01 meters (1 cm).

Author:
Christopher K. Allen, Craig McChesney
See Also:
  • Field Details

  • Constructor Details

    • Trace3dTracker

      public Trace3dTracker()
      Creates a new instance of EnvelopeTracker
    • Trace3dTracker

      public Trace3dTracker(Trace3dTracker copy)
      Copy constructor for Trace3dTracker
      Parameters:
      copy - Tracker that is being copied
  • Method Details

    • copy

      public Trace3dTracker copy()
      Creates a deep copy of Trace3dTracker
    • setStepSize

      public void setStepSize(double dblStepSize)
      Sets the value of the integration step size to the given value.
      Parameters:
      dblStepSize - new step length for propagating probes
      Since:
      Oct 25, 2012
    • getStepSize

      public double getStepSize()
      Returns the maximum element subsection length (in meters) that the probe may be advanced before applying a space charge kick.
      Returns:
      maximum step size for numerical integration
    • doPropagation

      public void doPropagation(IProbe probe, IElement elem) throws ModelException
      Propagates the probe through the element.
      Specified by:
      doPropagation in class Tracker
      Parameters:
      probe - probe to propagate
      elem - element acting on probe
      Throws:
      ModelException - invalid probe type or error in advancing probe
      See Also:
    • load

      public void load(String strPrimKeyVal, EditContext ecTableData) throws DataFormatException
      Load the parameters of this IAlgorithm object from the table data in the given EditContext. Here we load only the parameters specific to the base class. It is expected that Subclasses should override this method to recover the data particular to there own operation.
      Specified by:
      load in interface IContextAware
      Overrides:
      load in class Tracker
      Parameters:
      strPrimKeyVal - primary key value specifying the name of the data record
      ecTableData - EditContext containing table data
      Throws:
      DataFormatException - bad data format - error in reading
      See Also:
    • load

      public void load(DataAdaptor daptArchive)
      Load the parameters of the algorithm from a data source exposing the IArchive interface. The superclass load method is called first, then the properties particular to EnvTrackerAdapt are loaded.
      Specified by:
      load in interface IArchive
      Overrides:
      load in class Tracker
      Parameters:
      daptArchive - data source containing algorithm configuration
      See Also:
    • save

      public void save(DataAdaptor daptArchive)
      Save the state and settings of this algorithm to a data source exposing the DataAdaptor interface. Subclasses should override this method to store the data particular to there own operation.
      Specified by:
      save in interface IArchive
      Overrides:
      save in class Tracker
      Parameters:
      daptArchive - data source to receive algorithm configuration
      See Also:
    • advanceState

      protected void advanceState(IProbe ifcProbe, IElement ifcElem, double dblLen) throws ModelException
      Advances the probe state through a subsection of the element with the specified length. Applies a space charge kick at the end of the element subsection for any probe having nonzero beam current.
      Parameters:
      ifcElem - interface to the beam element
      ifcProbe - interface to the probe
      dblLen - length of element subsection to advance through
      Throws:
      ModelException - bad element transfer matrix/corrupt probe state