java.lang.Object
simpa.acc.api.track.BeamTracker
simpa.acc.api.track.TLBeamTracker
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 Summary
ConstructorsConstructorDescriptionTLBeamTracker
(Beam beam, double maxradius, double stepSize, int nThreads, List<Double> phsObsLocations, boolean backward) TLBeamTracker
(Beam beam, double maxradius, double stepSize, List<Double> phsObsLocations, boolean backward) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a beam trajectory observer to all tracker tasks.void
finish()
Called after the tracking is finished by theBeamTracker
track() Writes the output files.int
void
setWritePhsTofile
(boolean writePhsTofile) Methods inherited from class simpa.acc.api.track.BeamTracker
track
-
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
- Returns:
- The phase space observers.
-
finish
public void finish()Called after the tracking is finished by theBeamTracker
track() Writes the output files.- Specified by:
finish
in classBeamTracker
-
addTrajectoryObserver
Adds a beam trajectory observer to all tracker tasks.- Parameters:
bto
- The observer to add.
-