Package cnuphys.swimZ

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

    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

    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

    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

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

    • x

      public double x
      the x coordinate (cm)
    • y

      public double y
      the y coordinate (cm)
    • z

      public double z
      the z coordinate (cm)
    • tx

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

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

    • SwimZStateVector

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

      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

      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

      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

      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

    • copy

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

      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

      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

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

      public String normalPrint(double p, int pzSign)