Package cnuphys.adaptiveSwim.test
Class InitialValues
java.lang.Object
cnuphys.adaptiveSwim.test.InitialValues
Hold the initial values of a swim
- Author:
- heddle
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
The integer chargedouble
The momentum in GeV/cdouble
The azimuthal angle in degreesdouble
The polar angle in degreesdouble
The coordinate x of the vertex in metersdouble
The y coordinate of the vertex in metersdouble
The z coordinate of the vertex in meters -
Constructor Summary
ConstructorsConstructorDescriptionInitialValues
(int charge, double xo, double yo, double zo, double p, double theta, double phi) Store the initial conditions of a swimCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.toString()
-
Field Details
-
charge
public int chargeThe integer charge -
xo
public double xoThe coordinate x of the vertex in meters -
yo
public double yoThe y coordinate of the vertex in meters -
zo
public double zoThe z coordinate of the vertex in meters -
p
public double pThe momentum in GeV/c -
theta
public double thetaThe polar angle in degrees -
phi
public double phiThe azimuthal angle in degrees
-
-
Constructor Details
-
InitialValues
public InitialValues() -
InitialValues
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 chargexo
- The x coordinate of the vertex in metersyo
- The y coordinate of the vertex in meterszo
- The z coordinate of the vertex in metersp
- The momentum in GeV/ctheta
- The polar angle in degreesphi
- The azimuthal angle in degrees
-
InitialValues
Copy constructor- Parameters:
src
- the source initial values
-
-
Method Details
-
toStringRaw
-
toString
-
getInitialValues
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 < SMALL, the min val is used and the variable is no randomized.- Parameters:
rand
- and random number generatornum
- the number to createcharge
- the integer chargerandCharge
- iftrue
the charge will be 1 or -1 randomlyxmin
- minimum value of the x coordinate in metersxmax
- maximum value of the x coordinate in metersymin
- minimum value of the y coordinate in metersymax
- maximum value of the y coordinate in meterszmin
- minimum value of the z coordinate in meterszmax
- maximum value of the z coordinate in meterspmin
- minimum value of the momentum in GeV/cpmax
- maximum value of the momentum in GeV/cthetamin
- minimum value of the polar angle in degreesthetamax
- maximum value of the polar angle in degreesphimin
- minimum value of the azimuthal angle in degreesphimax
- maximum value of the azimuthal angle in degrees- Returns:
- an array of initial values
-
randomInitVal
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 < SMALL, the min val is used and the variable is no randomized.- Parameters:
rand
- and random number generatorinitVal
- the object to fill with random valuescharge
- the integer chargerandCharge
- iftrue
the charge will be 1 or -1 randomlyxmin
- minimum value of the x coordinate in metersxmax
- maximum value of the x coordinate in metersymin
- minimum value of the y coordinate in metersymax
- maximum value of the y coordinate in meterszmin
- minimum value of the z coordinate in meterszmax
- maximum value of the z coordinate in meterspmin
- minimum value of the momentum in GeV/cpmax
- maximum value of the momentum in GeV/cthetamin
- minimum value of the polar angle in degreesthetamax
- maximum value of the polar angle in degreesphimin
- minimum value of the azimuthal angle in degreesphimax
- maximum value of the azimuthal angle in degrees
-