Package xal.model

Interface IAlgorithm

All Superinterfaces:
IArchive, IContextAware, Remote
All Known Implementing Classes:
DiagnosticTracker, ElsTracker, EnsembleTracker, EnvelopeBacktracker, EnvelopeTracker, EnvelopeTrackerBase, EnvelopeTrackerPmq, EnvelopeTrackerPmqDipole, EnvTrackerAdapt, ParticleTracker, SynchronousTracker, Trace3dTracker, Tracker, TrackerAdaptive, TransferMapTracker, TwissTracker, TwissTrackerPmq

public interface IAlgorithm extends Remote, IContextAware, IArchive

The defining interface of all probe tracking algorithms

According to the Element-Algorithm-Probe analysis pattern, algorithm objects describe interactions between accelerator structures (Element's) and physical objects (Probe's). Thus, tracking algorithm objects are responsible for propagating probe objects, represented by the IProbe interface, through element objects, represented by the IElement interface.

Version:
$Id: Algorithm.java,v 2.0
Author:
Nikolay Malitsky, Christopher K. Allen
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)
    Get the modeling element string identifier where propagation is to start.
    Get the modeling element string identifier where propagation is to stop.
    Returns a string type identifier of algorithm class
    int
    Returns the version number of this algorithm
    void
    Initialize the algorithm for propagation.
    void
    propagate(IProbe probe, IElement elem)
    Propagates the probe through the element.
    void
    setIncludeStopElement(boolean bolInclStopElem)
    Sets the flag that determines whether or not the propagation stops at the entrance of the stop element (if set), or at the exit of the stop node.
    void
    indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)
    void
    Set the id of the element from which to start propagation.
    void
    Set the id of the element at which to stop propagation.
    void
    reset Start point to the beginning of the sequence
    void
    reset Stop point to the end of the sequence
    boolean
    Check if probe can be handled by this algorithm.

    Methods inherited from interface xal.tools.data.IArchive

    load, save

    Methods inherited from interface xal.tools.data.IContextAware

    load
  • Method Details

    • getType

      String getType()
      Returns a string type identifier of algorithm class
      Returns:
      String algorithm type identifier
    • getVersion

      int getVersion()
      Returns the version number of this algorithm
      Returns:
      int version number of the algorithm
    • validProbe

      boolean validProbe(IProbe probe)
      Check if probe can be handled by this algorithm.
      Parameters:
      probe - probe to be tested
      Returns:
      true if algorithm can propagation probe, false otherwise
    • getStartElementId

      String getStartElementId()
      Get the modeling element string identifier where propagation is to start.
      Returns:
      string id if element is defined, null otherwise
    • setStartElementId

      void setStartElementId(String id)
      Set the id of the element from which to start propagation.
      Parameters:
      id - String id of the element from which to start propagation
    • unsetStartElementId

      void unsetStartElementId()
      reset Start point to the beginning of the sequence
    • getStopElementId

      String getStopElementId()
      Get the modeling element string identifier where propagation is to stop.
      Returns:
      string id if element is defined, null otherwise
    • setStopElementId

      void setStopElementId(String id)
      Set the id of the element at which to stop propagation.
      Parameters:
      id - String id of the element at which to stop propagation
    • setIncludeStopElement

      void setIncludeStopElement(boolean bolInclStopElem)
      Sets the flag that determines whether or not the propagation stops at the entrance of the stop element (if set), or at the exit of the stop node. The later case is the default.
      Parameters:
      bolInclStopElem - propagation stops after stop element if true, before the stop element if false
      Since:
      Oct 20, 2014
    • unsetStopElementId

      void unsetStopElementId()
      reset Stop point to the end of the sequence
    • getRfGapPhaseCalculation

      boolean getRfGapPhaseCalculation()
      indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)
    • setRfGapPhaseCalculation

      void setRfGapPhaseCalculation(boolean tf)
      indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)
    • initialize

      void initialize() throws ModelException
      Initialize the algorithm for propagation. Reset any necessary state variables
      Throws:
      ModelException - unable to initialize algorithm
    • propagate

      void propagate(IProbe probe, IElement elem) throws ModelException
      Propagates the probe through the element.
      Parameters:
      probe - target object
      elem - beamline element acting on the probe
      Throws:
      ModelException
    • copy

      IAlgorithm copy()