Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getMomentum()
- getThreeMomentum(SwimZStateVector)
- getPathLength()
- getBDL(FieldProbe)
- sectorGetBDL(int, FieldProbe)
- sectorGetBDLXZPlane(int, FieldProbe)
- getThreeMomentum(SwimZStateVector, double[])
- getInitialThreeMomentum()
- getFinalThreeMomentum()
- getQ()
- getZo()
- getZf()
- add(SwimZStateVector)
- getTrajectory()
- first()
- size()
- last()
- getThetaAndPhi(SwimZStateVector)
- getFinalThetaAndPhi()
- getInitialThetaAndPhi()
- getGeneratedParticleRecord()
- toSwimTrajectory()
Class SwimZResult
java.lang.Object
cnuphys.swimZ.SwimZResult
-
Constructor Summary
ConstructorsConstructorDescriptionSwimZResult
(int Q, double p, double zo, double zf, int capacity) Constructor Create a SwimZResult with the trajectory initialized but empty. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(SwimZStateVector vector) Add a state vector into the trajectoryfirst()
Get the first state vectordouble
getBDL
(FieldProbe probe) Get the approximate integral |B x dL|double[]
Get the values of theta and phi from the momentum and the final state vector.double[]
Get the final three momentumObtain a GeneratedParticleRecord for this resultdouble[]
Get the values of theta and phi from the momentum and the initial state vector.double[]
Get the initial three momentumdouble
Get the magnitude of the three momentum, which is constant.double
Get the approximate path length in cmint
getQ()
Get the integer charge.double[]
Get the values of theta and phi from the momentum and a state vector.double[]
Get the momentum three-vector for a given statevector, which should be on this result's trajectory.void
getThreeMomentum
(SwimZStateVector sv, double[] p3) Get the momentum three-vector for a given statevector, which should be on this result's trajectory.Get the trajectory of state vectorsdouble
getZf()
Get the final z valuedouble
getZo()
Get the starting z valuelast()
Get the final state vectordouble
sectorGetBDL
(int sector, FieldProbe probe) Get the approximate integral |B x dL|double
sectorGetBDLXZPlane
(int sector, FieldProbe probe) Get the approximate integral |B x dL| in the middle planeint
size()
Get the number of state vectors in the trajectoryCreate a SwimTrajectory for this result object
-
Constructor Details
-
SwimZResult
public SwimZResult(int Q, double p, double zo, double zf, int capacity) Constructor Create a SwimZResult with the trajectory initialized but empty.- Parameters:
Q
- the integer charge (-1 for electron)p
- the momentum in Gev/czo
- the initial z value in cm;zf
- the final z value in cm;capacity
- the initial capacity of the trajectory
-
-
Method Details
-
getMomentum
public double getMomentum()Get the magnitude of the three momentum, which is constant.- Returns:
- the magnitude of the three momentum in GeV/c
-
getThreeMomentum
Get the momentum three-vector for a given statevector, which should be on this result's trajectory.- Parameters:
sv
- the given state vector- Returns:
- the three momentum in x, y, z order in GeV/c
-
getPathLength
public double getPathLength()Get the approximate path length in cm- Returns:
- the approximate path length in cm
-
getBDL
Get the approximate integral |B x dL|- Parameters:
probe
- the probe use to compute this result trajectory- Returns:
- the approximate integral |B x dL| in kG*cm
-
sectorGetBDL
Get the approximate integral |B x dL|- Parameters:
sector
- sector 1..6probe
- the probe use to compute this result trajectory- Returns:
- the approximate integral |B x dL| in kG*cm
-
sectorGetBDLXZPlane
Get the approximate integral |B x dL| in the middle plane- Parameters:
sector
- sector 1..6probe
- the probe use to compute this result trajectory- Returns:
- the approximate integral |B x dL| in kG*cm
-
getThreeMomentum
Get the momentum three-vector for a given statevector, which should be on this result's trajectory.- Parameters:
sv
- the given state vector
-
getInitialThreeMomentum
public double[] getInitialThreeMomentum()Get the initial three momentum- Returns:
- the initial three momentum
-
getFinalThreeMomentum
public double[] getFinalThreeMomentum()Get the final three momentum- Returns:
- the final three momentum
-
getQ
public int getQ()Get the integer charge. This is not an element of the state vector but is stored here for convenience.- Returns:
- the integer charge (e.g., -1 for electron)
-
getZo
public double getZo()Get the starting z value- Returns:
- the starting z value
-
getZf
public double getZf()Get the final z value- Returns:
- the final z value
-
add
Add a state vector into the trajectory- Parameters:
vector
- the vector to add
-
getTrajectory
Get the trajectory of state vectors- Returns:
- the trajectory
-
first
-
size
public int size()Get the number of state vectors in the trajectory- Returns:
- the number of state vectors in the trajectory
-
last
-
getThetaAndPhi
Get the values of theta and phi from the momentum and a state vector.- Parameters:
sv
- the statevector, presumably on this trajectory- Returns:
- theta and phi in an array, in that order, in degrees.
-
getFinalThetaAndPhi
public double[] getFinalThetaAndPhi()Get the values of theta and phi from the momentum and the final state vector.- Returns:
- theta and phi in an array, in that order, in degrees.
-
getInitialThetaAndPhi
public double[] getInitialThetaAndPhi()Get the values of theta and phi from the momentum and the initial state vector.- Returns:
- theta and phi in an array, in that order, in degrees.
-
getGeneratedParticleRecord
Obtain a GeneratedParticleRecord for this result- Returns:
- a GeneratedParticleRecord for this result
-
toSwimTrajectory
Create a SwimTrajectory for this result object- Returns:
- a SwimTrajectory corresponding to this result.
-