java.lang.Object
simpa.acc.api.track.PhaseSpaceObserver
- All Implemented Interfaces:
TrackingObserver
- Direct Known Subclasses:
TLPhaseSpaceObserver
Observer that can be added to a particle tracking task for observation of the
phase space coordinates when it passes the observer disk.
-
Nested Class Summary
Nested classes/interfaces inherited from interface simpa.core.api.track.TrackingObserver
TrackingObserver.ObserverBehaviour -
Constructor Summary
ConstructorsConstructorDescriptionPhaseSpaceObserver(double longitudinalPos, double radius, double nominalMomentum, ReferenceOrbit orbit, boolean backward) Constructs a disk with the given radius at the longitudinal position and writes the particle's phase space coordinates into the given file each time it is going through the disk.PhaseSpaceObserver(ReferenceOrbit orbit, int orbitIndex, double radius, double nominalMomentum, boolean backward) Constructs a disk with the given radius at the given index of the reference orbit and writes the particle's phase space coordinates into the given file each time it is going through the disk. -
Method Summary
Modifier and TypeMethodDescriptionvoidFinishes the tracking of the given particle.getDisk()Gets the disk of this PhaseSpaceObserverstatic intGets the amount of turns between flushes.doubleGets the output directory.getPhaseSpaceCoordinates(org.apache.commons.math3.geometry.euclidean.threed.Vector3D is, Particle p) Gets the phase space coordinates.voidObserves the location and angle of the particle as it passes through the disk.static voidsetFlushPerTurns(int fpt) Updates/sets the amount of turns between flushes.voidsetOutDirectory(String outDirectory) Sets the output directory.
-
Constructor Details
-
PhaseSpaceObserver
public PhaseSpaceObserver(ReferenceOrbit orbit, int orbitIndex, double radius, double nominalMomentum, boolean backward) Constructs a disk with the given radius at the given index of the reference orbit and writes the particle's phase space coordinates into the given file each time it is going through the disk.- Parameters:
orbit- The reference orbit.orbitIndex- The index of the orbit point at which the observer will be added.radius- Radius of the observation plane. This should be big enough to cover the aperture, but smaller than the diameter of the machine, otherwise the particle trajectory would traverse two times the observation plane.nominalMomentum- The nominal momentum.backward- Must be set true when tracking backward.
-
PhaseSpaceObserver
public PhaseSpaceObserver(double longitudinalPos, double radius, double nominalMomentum, ReferenceOrbit orbit, boolean backward) Constructs a disk with the given radius at the longitudinal position and writes the particle's phase space coordinates into the given file each time it is going through the disk.- Parameters:
longitudinalPos- Longitudinal position of the observation planeradius- Radius of the observation plane. This should be big enough to cover the aperture, but smaller than the diameter of the machine, otherwise the particle trajectory would traverse two times the observation plane.nominalMomentum- The nominal momentum in [GeV/c].orbit- The reference orbit.backward- Must be set true when tracking backward.
-
-
Method Details
-
getFlushPerTurns
public static int getFlushPerTurns()Gets the amount of turns between flushes.- Returns:
- The amount of turns between flushes.
-
setFlushPerTurns
public static void setFlushPerTurns(int fpt) Updates/sets the amount of turns between flushes.- Parameters:
fpt- The amount of turns per flush.
-
observe
Observes the location and angle of the particle as it passes through the disk.- Specified by:
observein interfaceTrackingObserver- Parameters:
p- Particle to observe
-
finish
Description copied from interface:TrackingObserverFinishes the tracking of the given particle.- Specified by:
finishin interfaceTrackingObserver- Parameters:
p- the particle to stop tracking
-
getDisk
Gets the disk of this PhaseSpaceObserver- Returns:
- ObserverDisk
-
getOutDirectory
Gets the output directory.- Returns:
- Local path of the output directory.
-
setOutDirectory
Sets the output directory.- Parameters:
outDirectory- The output directory.
-
getLongitudinalPosition
public double getLongitudinalPosition()- Returns:
- The longitudinal position of the observer along the reference orbit [m].
-
getPhaseSpaceCoordinates
public PhaseSpaceCoordinates getPhaseSpaceCoordinates(org.apache.commons.math3.geometry.euclidean.threed.Vector3D is, Particle p) Gets the phase space coordinates.- Parameters:
is-p- particle- Returns:
- The phase space coordinates.
-