Package cnuphys.swimZ
Class SwimZStateVector
java.lang.Object
cnuphys.swimZ.SwimZStateVector
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 -
Constructor Summary
ConstructorsConstructorDescriptionCreate a state vector for the SwimZ package with all NaNs for the componentsSwimZStateVector
(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) ConstructorCreate a state variable from another (copy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(SwimZStateVector sv) Copy from another state vectorvoid
dR
(SwimZStateVector zv, double[] dr) Compute the difference between this state vector's location and another state vector's locationnormalPrint
(double p, int pzSign) void
set
(double z, double[] v) Set the state vectortoString()
Get a string representation
-
Field Details
-
x
public double xthe x coordinate (cm) -
y
public double ythe y coordinate (cm) -
z
public double zthe z coordinate (cm) -
tx
public double txthe x track slope, px/pz -
ty
public double tythe 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/pzty
- 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
Create a state variable from another (copy)- Parameters:
sv
- the state vector to copyv
- 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/ctheta
- the initial polar angle (degrees)phi
- the initial azimuthal angle(degrees)
-
-
Method Details
-
copy
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
Compute the difference between this state vector's location and another state vector's location- Parameters:
zv
- the other state vectordr
- will hold the delta in cm
-
toString
Get a string representation -
normalPrint
-