Module simpa.acc

Class TLBeamTracker

java.lang.Object
simpa.acc.api.track.BeamTracker
simpa.acc.api.track.TLBeamTracker

public class TLBeamTracker extends BeamTracker
This class is for tracking a beam in a line. It is a subclass of BeamTracker The reason we need two classes is that the tracking in a ring is different from the tracking in a line. In a ring for each particle we need to save the phase space coordinates in a separate file. In a transfer line we save all the phase space coordinates in one file for each observer position.
  • Constructor Details

    • TLBeamTracker

      public TLBeamTracker(Beam beam, double maxradius, double stepSize, List<Double> phsObsLocations, boolean backward) throws IOException
      Throws:
      IOException
    • TLBeamTracker

      public TLBeamTracker(Beam beam, double maxradius, double stepSize, int nThreads, List<Double> phsObsLocations, boolean backward) throws IOException
      Throws:
      IOException
  • Method Details

    • setWritePhsTofile

      public void setWritePhsTofile(boolean writePhsTofile)
      Parameters:
      writePhsTofile - If true phase space files and lost particle files are written to disk. True by default.
    • getLossCount

      public int getLossCount()
      Returns:
      Number of lost particles.
    • getPhaseSpaceObservers

      public List<TLPhaseSpaceObserver> getPhaseSpaceObservers()
      Returns:
      The phase space observers.
    • finish

      public void finish()
      Called after the tracking is finished by the BeamTracker track() Writes the output files.
      Specified by:
      finish in class BeamTracker
    • addTrajectoryObserver

      public void addTrajectoryObserver(BeamTrajectoryObserver bto)
      Adds a beam trajectory observer to all tracker tasks.
      Parameters:
      bto - The observer to add.