Class SwimZResult

java.lang.Object
cnuphys.swimZ.SwimZResult

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

    • SwimZResult Link icon

      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 Link icon

    • getMomentum Link icon

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

      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 Link icon

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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

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

      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 Link icon

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

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

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

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

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

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

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

      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 Link icon

      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 Link icon

      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 Link icon

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

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