Class InitialValues

java.lang.Object
cnuphys.adaptiveSwim.test.InitialValues

public class InitialValues extends Object
Hold the initial values of a swim
Author:
heddle
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    int
    The integer charge
    double
    The momentum in GeV/c
    double
    The azimuthal angle in degrees
    double
    The polar angle in degrees
    double
    The coordinate x of the vertex in meters
    double
    The y coordinate of the vertex in meters
    double
    The z coordinate of the vertex in meters
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
    InitialValues(int charge, double xo, double yo, double zo, double p, double theta, double phi)
    Store the initial conditions of a swim
    Copy constructor
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static InitialValues[]
    getInitialValues(Random rand, int num, int charge, boolean randCharge, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double pmin, double pmax, double thetamin, double thetamax, double phimin, double phimax)
    For setting up an array of initial values for testing.
    static void
    randomInitVal(Random rand, InitialValues initVal, int charge, boolean randCharge, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double pmin, double pmax, double thetamin, double thetamax, double phimin, double phimax)
    For setting up an array of initial values for testing.
     
     

    Methods inherited from class java.lang.Object Link icon

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

    • charge Link icon

      public int charge
      The integer charge
    • xo Link icon

      public double xo
      The coordinate x of the vertex in meters
    • yo Link icon

      public double yo
      The y coordinate of the vertex in meters
    • zo Link icon

      public double zo
      The z coordinate of the vertex in meters
    • p Link icon

      public double p
      The momentum in GeV/c
    • theta Link icon

      public double theta
      The polar angle in degrees
    • phi Link icon

      public double phi
      The azimuthal angle in degrees
  • Constructor Details Link icon

    • InitialValues Link icon

      public InitialValues()
    • InitialValues Link icon

      public InitialValues(int charge, double xo, double yo, double zo, double p, double theta, double phi)
      Store the initial conditions of a swim
      Parameters:
      charge - The integer charge
      xo - The x coordinate of the vertex in meters
      yo - The y coordinate of the vertex in meters
      zo - The z coordinate of the vertex in meters
      p - The momentum in GeV/c
      theta - The polar angle in degrees
      phi - The azimuthal angle in degrees
    • InitialValues Link icon

      public InitialValues(InitialValues src)
      Copy constructor
      Parameters:
      src - the source initial values
  • Method Details Link icon

    • toStringRaw Link icon

      public String toStringRaw()
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • getInitialValues Link icon

      public static InitialValues[] getInitialValues(Random rand, int num, int charge, boolean randCharge, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double pmin, double pmax, double thetamin, double thetamax, double phimin, double phimax)
      For setting up an array of initial values for testing. In cases where the difference between a min val and a max val is invalid input: '<' SMALL, the min val is used and the variable is no randomized.
      Parameters:
      rand - and random number generator
      num - the number to create
      charge - the integer charge
      randCharge - if true the charge will be 1 or -1 randomly
      xmin - minimum value of the x coordinate in meters
      xmax - maximum value of the x coordinate in meters
      ymin - minimum value of the y coordinate in meters
      ymax - maximum value of the y coordinate in meters
      zmin - minimum value of the z coordinate in meters
      zmax - maximum value of the z coordinate in meters
      pmin - minimum value of the momentum in GeV/c
      pmax - maximum value of the momentum in GeV/c
      thetamin - minimum value of the polar angle in degrees
      thetamax - maximum value of the polar angle in degrees
      phimin - minimum value of the azimuthal angle in degrees
      phimax - maximum value of the azimuthal angle in degrees
      Returns:
      an array of initial values
    • randomInitVal Link icon

      public static void randomInitVal(Random rand, InitialValues initVal, int charge, boolean randCharge, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, double pmin, double pmax, double thetamin, double thetamax, double phimin, double phimax)
      For setting up an array of initial values for testing. In cases where the difference between a min val and a max val is invalid input: '<' SMALL, the min val is used and the variable is no randomized.
      Parameters:
      rand - and random number generator
      initVal - the object to fill with random values
      charge - the integer charge
      randCharge - if true the charge will be 1 or -1 randomly
      xmin - minimum value of the x coordinate in meters
      xmax - maximum value of the x coordinate in meters
      ymin - minimum value of the y coordinate in meters
      ymax - maximum value of the y coordinate in meters
      zmin - minimum value of the z coordinate in meters
      zmax - maximum value of the z coordinate in meters
      pmin - minimum value of the momentum in GeV/c
      pmax - maximum value of the momentum in GeV/c
      thetamin - minimum value of the polar angle in degrees
      thetamax - maximum value of the polar angle in degrees
      phimin - minimum value of the azimuthal angle in degrees
      phimax - maximum value of the azimuthal angle in degrees