Class SwimZ

java.lang.Object
cnuphys.swimZ.SwimZ

public class SwimZ extends Object
This class holds the parameters and static methods for the swimZ integration. The swimZ integration follows the method described for the HERA-B magnet here: http://arxiv.org/pdf/physics/0511177v1.pdf

The state vector has five elements:
(x, y, tx, ty, q)
Where x and y are the transverse coordinates (meters), tx = px/pz, ty = py/pz, and q = Q/|p| where Q is the integer charge (e.g. -1 for an electron)

UNITS

  • x, y, and z are in cm
  • p is in GeV/c
  • B (mag field) is in kGauss

Author:
heddle
  • Field Details Link icon

    • C Link icon

      public static final double C
      The speed of light in these units: (GeV/c)(1/kG)(1/cm)
      See Also:
    • ARGONRADLEN Link icon

      public static final double ARGONRADLEN
      Argon radiation length in cm
      See Also:
  • Constructor Details Link icon

    • SwimZ Link icon

      public SwimZ()
      SwimZ constructor. Here we create a Swimmer that will use the given magnetic field.
      Parameters:
      field - interface into a magnetic field
    • SwimZ Link icon

      public SwimZ(MagneticField magneticField)
      Create a swimmer specific to a magnetic field
      Parameters:
      magneticField - the magnetic field
    • SwimZ Link icon

      public SwimZ(IMagField magneticField)
      Create a swimmer specific to a magnetic field
      Parameters:
      magneticField - the magnetic field
  • Method Details Link icon

    • getProbe Link icon

      public FieldProbe getProbe()
      Get the underlying field probe
      Returns:
      the probe
    • setAbsoluteTolerance Link icon

      public void setAbsoluteTolerance(double eps)
      Set the tolerance used by the CLAS_Tolerance array
      Parameters:
      eps - the baseline absolute tolerance.
    • getEps Link icon

      public double getEps()
      Get the tolerance used by the CLAS_Toleance array
      Returns:
      the tolerance used by the CLAS_Toleance array
    • adaptiveRK Link icon

      public SwimZResult adaptiveRK(int Q, double p, SwimZStateVector start, double zf, double stepSize, double[] hdata) throws SwimZException
      Swim to a fixed z over short distances using RK adaptive stepsize
      Parameters:
      Q - the integer charge of the particle (-1 for electron)
      p - the momentum in GeV/c
      start - the starting state vector
      zf - the final z value (cm)
      stepSize - the initial step size
      hdata - An array with three elements. Upon return it will have the min, average, and max step size (in that order).
      relTolerance - the absolute tolerances on each state variable [x, y, tx, ty] (q = const). So it is an array with four entries, like [1.0e-4 cm, 1.0e-4 cm, 1.0e-5, 1.0e05]
      Returns:
      the swim result
      Throws:
      SwimZException
    • sectorAdaptiveRK Link icon

      public SwimZResult sectorAdaptiveRK(int sector, int Q, double p, SwimZStateVector start, double zf, double stepSize, double[] hdata) throws SwimZException
      Swim to a fixed z over short distances using RK adaptive stepsize
      Parameters:
      sector - the sector [1..6]
      Q - the integer charge of the particle (-1 for electron)
      p - the momentum in GeV/c
      start - the starting state vector
      zf - the final z value (cm)
      stepSize - the initial step size
      hdata - An array with three elements. Upon return it will have the min, average, and max step size (in that order).
      relTolerance - the absolute tolerances on each state variable [x, y, tx, ty] (q = const). So it is an array with four entries, like [1.0e-4 cm, 1.0e-4 cm, 1.0e-5, 1.0e05]
      Returns:
      the swim result
      Throws:
      SwimZException
    • adaptiveRK Link icon

      public int adaptiveRK(int Q, double p, SwimZStateVector start, SwimZStateVector stop, double zf, double stepSize, double[] hdata) throws SwimZException
      Swim to a fixed z using RK adaptive stepsize
      Parameters:
      Q - the integer charge of the particle (-1 for electron)
      p - the momentum in Gev/c
      start - the starting state vector
      stop - will hold the final state vector
      zf - the final z value
      stepSize - the initial step size
      hdata - An array with three elements. Upon return it will have the min, average, and max step size (in that order).
      Returns:
      the number of steps
      Throws:
      SwimZException
    • parabolicEstimate Link icon

      public void parabolicEstimate(int Q, double p, SwimZStateVector start, SwimZStateVector stop, double zf) throws SwimZException
      Swim to a fixed z over short distances using a parabolic estimate, without intermediate points
      Parameters:
      Q - the integer charge of the particle (-1 for electron)
      p - the momentum in GeV/c
      start - the starting state vector
      stop - at end, holds final state vector
      zf - the final z value (cm)
      Throws:
      SwimZException
    • parabolicEstimate Link icon

      public SwimZResult parabolicEstimate(int Q, double p, SwimZStateVector start, double zf, double stepSize) throws SwimZException
      Swim to a fixed z over short distances using a parabolic estimate
      Parameters:
      Q - the integer charge of the particle (-1 for electron)
      p - the momentum in GeV/c
      start - the starting state vector
      zf - the final z value (cm)
      stepSize - the step size
      Returns:
      the swim result
      Throws:
      SwimZException