Package cnuphys.swimZ
Class SwimZResult
java.lang.Object
cnuphys.swimZ.SwimZResult
Holds the result of a swimZ integration
- Author:
- heddle
- 
Constructor SummaryConstructorsConstructorDescriptionSwimZResult(int Q, double p, double zo, double zf, int capacity) Constructor Create a SwimZResult with the trajectory initialized but empty.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidadd(SwimZStateVector vector) Add a state vector into the trajectoryfirst()Get the first state vectordoublegetBDL(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 momentumdoubleGet the magnitude of the three momentum, which is constant.doubleGet the approximate path length in cmintgetQ()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.voidgetThreeMomentum(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 vectorsdoublegetZf()Get the final z valuedoublegetZo()Get the starting z valuelast()Get the final state vectordoublesectorGetBDL(int sector, FieldProbe probe) Get the approximate integral |B x dL|doublesectorGetBDLXZPlane(int sector, FieldProbe probe) Get the approximate integral |B x dL| in the middle planeintsize()Get the number of state vectors in the trajectoryCreate a SwimTrajectory for this result object
- 
Constructor Details- 
SwimZResultpublic 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/c
- zo- the initial z value in cm;
- zf- the final z value in cm;
- capacity- the initial capacity of the trajectory
 
 
- 
- 
Method Details- 
getMomentumpublic double getMomentum()Get the magnitude of the three momentum, which is constant.- Returns:
- the magnitude of the three momentum in GeV/c
 
- 
getThreeMomentumGet 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
 
- 
getPathLengthpublic double getPathLength()Get the approximate path length in cm- Returns:
- the approximate path length in cm
 
- 
getBDLGet 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
 
- 
sectorGetBDLGet the approximate integral |B x dL|- Parameters:
- sector- sector 1..6
- probe- the probe use to compute this result trajectory
- Returns:
- the approximate integral |B x dL| in kG*cm
 
- 
sectorGetBDLXZPlaneGet the approximate integral |B x dL| in the middle plane- Parameters:
- sector- sector 1..6
- probe- the probe use to compute this result trajectory
- Returns:
- the approximate integral |B x dL| in kG*cm
 
- 
getThreeMomentumGet the momentum three-vector for a given statevector, which should be on this result's trajectory.- Parameters:
- sv- the given state vector
 
- 
getInitialThreeMomentumpublic double[] getInitialThreeMomentum()Get the initial three momentum- Returns:
- the initial three momentum
 
- 
getFinalThreeMomentumpublic double[] getFinalThreeMomentum()Get the final three momentum- Returns:
- the final three momentum
 
- 
getQpublic 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)
 
- 
getZopublic double getZo()Get the starting z value- Returns:
- the starting z value
 
- 
getZfpublic double getZf()Get the final z value- Returns:
- the final z value
 
- 
addAdd a state vector into the trajectory- Parameters:
- vector- the vector to add
 
- 
getTrajectoryGet the trajectory of state vectors- Returns:
- the trajectory
 
- 
firstGet the first state vector- Returns:
- the first state vector
 
- 
sizepublic int size()Get the number of state vectors in the trajectory- Returns:
- the number of state vectors in the trajectory
 
- 
lastGet the final state vector- Returns:
- the final state vector
 
- 
getThetaAndPhiGet 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.
 
- 
getFinalThetaAndPhipublic 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.
 
- 
getInitialThetaAndPhipublic 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.
 
- 
getGeneratedParticleRecordObtain a GeneratedParticleRecord for this result- Returns:
- a GeneratedParticleRecord for this result
 
- 
toSwimTrajectoryCreate a SwimTrajectory for this result object- Returns:
- a SwimTrajectory corresponding to this result.
 
 
-