Package cnuphys.swimZ

Class SwimZResult

java.lang.Object
cnuphys.swimZ.SwimZResult

public class SwimZResult extends Object
Holds the result of a swimZ integration
Author:
heddle
  • Constructor Details

    • SwimZResult

      public SwimZResult(int Q, double p, double zo, double zf, int capacity)
      Constructor Create a SwimZResult with the trajectory initialized but empty.
      Parameters:
      Q - the integer charge (-1 for electron)
      p - the momentum in Gev/c
      zo - the initial z value in cm;
      zf - the final z value in cm;
      capacity - the initial capacity of the trajectory
  • Method Details

    • getMomentum

      public double getMomentum()
      Get the magnitude of the three momentum, which is constant.
      Returns:
      the magnitude of the three momentum in GeV/c
    • getThreeMomentum

      public double[] getThreeMomentum(SwimZStateVector sv)
      Get the momentum three-vector for a given statevector, which should be on this result's trajectory.
      Parameters:
      sv - the given state vector
      Returns:
      the three momentum in x, y, z order in GeV/c
    • getPathLength

      public double getPathLength()
      Get the approximate path length in cm
      Returns:
      the approximate path length in cm
    • getBDL

      public double getBDL(FieldProbe probe)
      Get the approximate integral |B x dL|
      Parameters:
      probe - the probe use to compute this result trajectory
      Returns:
      the approximate integral |B x dL| in kG*cm
    • sectorGetBDL

      public double sectorGetBDL(int sector, FieldProbe probe)
      Get the approximate integral |B x dL|
      Parameters:
      sector - sector 1..6
      probe - the probe use to compute this result trajectory
      Returns:
      the approximate integral |B x dL| in kG*cm
    • sectorGetBDLXZPlane

      public double sectorGetBDLXZPlane(int sector, FieldProbe probe)
      Get the approximate integral |B x dL| in the middle plane
      Parameters:
      sector - sector 1..6
      probe - the probe use to compute this result trajectory
      Returns:
      the approximate integral |B x dL| in kG*cm
    • getThreeMomentum

      public void getThreeMomentum(SwimZStateVector sv, double[] p3)
      Get the momentum three-vector for a given statevector, which should be on this result's trajectory.
      Parameters:
      sv - the given state vector
    • getInitialThreeMomentum

      public double[] getInitialThreeMomentum()
      Get the initial three momentum
      Returns:
      the initial three momentum
    • getFinalThreeMomentum

      public double[] getFinalThreeMomentum()
      Get the final three momentum
      Returns:
      the final three momentum
    • getQ

      public int getQ()
      Get the integer charge. This is not an element of the state vector but is stored here for convenience.
      Returns:
      the integer charge (e.g., -1 for electron)
    • getZo

      public double getZo()
      Get the starting z value
      Returns:
      the starting z value
    • getZf

      public double getZf()
      Get the final z value
      Returns:
      the final z value
    • add

      protected void add(SwimZStateVector vector)
      Add a state vector into the trajectory
      Parameters:
      vector - the vector to add
    • getTrajectory

      public List<SwimZStateVector> getTrajectory()
      Get the trajectory of state vectors
      Returns:
      the trajectory
    • first

      public SwimZStateVector first()
      Get the first state vector
      Returns:
      the first state vector
    • size

      public int size()
      Get the number of state vectors in the trajectory
      Returns:
      the number of state vectors in the trajectory
    • last

      public SwimZStateVector last()
      Get the final state vector
      Returns:
      the final state vector
    • getThetaAndPhi

      public double[] getThetaAndPhi(SwimZStateVector sv)
      Get the values of theta and phi from the momentum and a state vector.
      Parameters:
      sv - the statevector, presumably on this trajectory
      Returns:
      theta and phi in an array, in that order, in degrees.
    • getFinalThetaAndPhi

      public double[] getFinalThetaAndPhi()
      Get the values of theta and phi from the momentum and the final state vector.
      Returns:
      theta and phi in an array, in that order, in degrees.
    • getInitialThetaAndPhi

      public double[] getInitialThetaAndPhi()
      Get the values of theta and phi from the momentum and the initial state vector.
      Returns:
      theta and phi in an array, in that order, in degrees.
    • getGeneratedParticleRecord

      public GeneratedParticleRecord getGeneratedParticleRecord()
      Obtain a GeneratedParticleRecord for this result
      Returns:
      a GeneratedParticleRecord for this result
    • toSwimTrajectory

      public SwimTrajectory toSwimTrajectory()
      Create a SwimTrajectory for this result object
      Returns:
      a SwimTrajectory corresponding to this result.