Class SwimZStateVector

java.lang.Object
cnuphys.swimZ.SwimZStateVector

public class SwimZStateVector extends Object
Holds the position and track slopes. The positions (x, y, z) are in cm, while the track slopes are dimensionless. Note: z is not an actual component of the "true" state vector, it is the independent variable. But it rides along here because we will want to know z at every step.
Author:
heddle
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    double
    the x track slope, px/pz
    double
    the y track slope, py/pz
    double
    the x coordinate (cm)
    double
    the y coordinate (cm)
    double
    the z coordinate (cm)
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Create a state vector for the SwimZ package with all NaNs for the components
    SwimZStateVector(double z, double[] v)
    Create a state variable from an array (probably from RK integration)
    SwimZStateVector(double x, double y, double z, double tx, double ty)
    Constructor for a state vector for the SwimZ package.
    SwimZStateVector(double x, double y, double z, double p, double theta, double phi)
    Constructor
    Create a state variable from another (copy)
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    Copy from another state vector
    void
    dR(SwimZStateVector zv, double[] dr)
    Compute the difference between this state vector's location and another state vector's location
    normalPrint(double p, int pzSign)
     
    void
    set(double z, double[] v)
    Set the state vector
    Get a string representation

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details Link icon

    • x Link icon

      public double x
      the x coordinate (cm)
    • y Link icon

      public double y
      the y coordinate (cm)
    • z Link icon

      public double z
      the z coordinate (cm)
    • tx Link icon

      public double tx
      the x track slope, px/pz
    • ty Link icon

      public double ty
      the y track slope, py/pz
  • Constructor Details Link icon

    • SwimZStateVector Link icon

      public SwimZStateVector()
      Create a state vector for the SwimZ package with all NaNs for the components
    • SwimZStateVector Link icon

      public SwimZStateVector(double x, double y, double z, double tx, double ty)
      Constructor for a state vector for the SwimZ package. Note that it uses CM for distance units
      Parameters:
      x - the x coordinate (cm)
      y - the x coordinate (cm)
      z - the z coordinate (cm). Note: z is not an actual component of the state vector, it is the independent variable. But it rides along here.
      tx - the x track slope, px/pz
      ty - the y track slope, py/pz
    • SwimZStateVector Link icon

      public SwimZStateVector(double z, double[] v)
      Create a state variable from an array (probably from RK integration)
      Parameters:
      z - the value of z in cm. Note: z is not an actual component of the state vector, it is the independent variable. But it rides along here.
      v - the array with, in order, x,y,tx,ty,q
    • SwimZStateVector Link icon

      public SwimZStateVector(SwimZStateVector sv)
      Create a state variable from another (copy)
      Parameters:
      sv - the state vector to copy
      v - the array with, in order, x,y,tx,ty,q
    • SwimZStateVector Link icon

      public SwimZStateVector(double x, double y, double z, double p, double theta, double phi)
      Constructor
      Parameters:
      x - the x coordinate (cm)
      y - the y coordinate (cm)
      z - the z coordinate (cm)
      p - the magnitude of the momentum in GeV/c
      theta - the initial polar angle (degrees)
      phi - the initial azimuthal angle(degrees)
  • Method Details Link icon

    • copy Link icon

      public void copy(SwimZStateVector sv)
      Copy from another state vector
      Parameters:
      sv - the state vector to copy
    • set Link icon

      public void set(double z, double[] v)
      Set the state vector
      Parameters:
      z - the value of z in cm. Note: z is not an actual component of the state vector, it is the independent variable. But it rides along here.
      v - the array with, in order, x,y,tx,ty,
    • dR Link icon

      public void dR(SwimZStateVector zv, double[] dr)
      Compute the difference between this state vector's location and another state vector's location
      Parameters:
      zv - the other state vector
      dr - will hold the delta in cm
    • toString Link icon

      public String toString()
      Get a string representation
      Overrides:
      toString in class Object
      Returns:
      a string representation of the state vector
    • normalPrint Link icon

      public String normalPrint(double p, int pzSign)