Module simpa.core

Class BeamTrajectoryObserver

java.lang.Object
simpa.core.api.track.BeamTrajectoryObserver
All Implemented Interfaces:
TrackingObserver

public class BeamTrajectoryObserver extends Object implements TrackingObserver
  • Constructor Details

  • Method Details

    • getBehaviour

      public TrackingObserver.ObserverBehaviour getBehaviour()
    • observe

      public void observe(Particle p)
      Description copied from interface: TrackingObserver
      Observe the particle using this observer.
      Specified by:
      observe in interface TrackingObserver
      Parameters:
      p - - Particle to observe
    • finish

      public void finish(Particle p)
      Description copied from interface: TrackingObserver
      Finishes the tracking of the given particle.
      Specified by:
      finish in interface TrackingObserver
      Parameters:
      p - the particle to stop tracking
    • getTrajectoryData

      public Map<String,List<TrajectoryData>> getTrajectoryData()
      Returns:
      A map containing trajectory for each particle in the beam. The key is the particle name.
    • writeToFile

      public void writeToFile(String fileName)
      Write the trajectory of the particles in a beam hitting this observer to a file. Should be called after the beam tracking is finished. If the observer was created with the ObserverBehaviour.STORE_ONLY option the method returns without writing the file.
      Parameters:
      fileName - The file to write to.