hep.lcd.mc.fast
Class DocaTrackParameters

java.lang.Object
  |
  +--hep.lcd.mc.fast.DocaTrackParameters

public class DocaTrackParameters
extends Object
implements TrackParameters

Holds DOCA parameters and error matrix of track. Can be initialized with a MC truth particle.
Updated to run with track curvature flipping (optional flag for MCFast).

Version:
$Id: DocaTrackParameters.java,v 1.4 2001/06/18 22:39:11 walkowia Exp $
Author:
Tony Johnson, Wolfgang Walkowiak
Source Code:
DocaTrackParameters.java

Field Summary
static int FLIPPED
           
static int NOTFLIPPED
           
 
Constructor Summary
DocaTrackParameters()
           
DocaTrackParameters(double[] parameters)
           
DocaTrackParameters(double[] parameters, double[][] errorMatrix)
           
DocaTrackParameters(double[] parameters, double[][] errorMatrix, double chi2)
           
DocaTrackParameters(double[] parameters, double[][] errorMatrix, double chi2, int ndf)
           
DocaTrackParameters(double[] momentum, double[] x, double q)
           
DocaTrackParameters(double[] momentum, double[] x, double q, double[][] errorMatrix)
           
DocaTrackParameters(double[] momentum, double[] x, double q, double[][] errorMatrix, int flipState)
           
DocaTrackParameters(double[] momentum, double[] x, double q, int flipState)
           
DocaTrackParameters(Hep3Vector momentum, Hep3Vector x, double q)
           
DocaTrackParameters(Hep3Vector momentum, Hep3Vector x, double q, int flipState)
           
DocaTrackParameters(Particle p)
           
DocaTrackParameters(Particle p, int flipState)
           
 
Method Summary
 double[][] calcMomentumErrorMatrix(double l)
          Calculate the error matrix for the momentum for a point on the track specified by l.
 double[][] calcPositionErrorMatrix(double l)
          Calculate the error matrix for the position coordinates for a point on the track specified by l.
 double cosTheta()
          Get cos(Theta) as calculated from the momentum vector at the DOCA.
 void fillErrorMatrix(double[][] errorMatrix)
           
 double getChi2()
          Return the chi2 from smearing.
 double getCosTheta()
          get cos(theta) at DOCA.
 double getD0()
           
 double[] getDoca()
          Get coordinates of DOCA.
 double[] getDocaMomentum(double[] refPoint)
           
 Hep3Vector getDocaMomentumVec(double[] refPoint)
           
 Hep3Vector getDocaMomentumVec(Hep3Vector refPoint)
          Calculate and get Doca momentum on track with respect to any space point.
 double[] getDocaPosition(double[] refPoint)
           
 Hep3Vector getDocaPositionVec(double[] refPoint)
           
 Hep3Vector getDocaPositionVec(Hep3Vector refPoint)
          Calculate and get Doca position on track with respect to any space point.
 double getDocaTransversePathLength(double[] refPoint)
           
 double getDocaTransversePathLength(Hep3Vector refPoint)
          Calculate and get path length on track for a doca to any space point in respect to the track defining doca (with respect to the origin).
 Hep3Vector getDocaVec()
          Get coordinates of DOCA.
 double getDocaX()
           
 double getDocaY()
           
 double getDocaZ()
           
 double[][] getErrorMatrix()
          Get the error matrix as a 2-D array
 double getErrorMatrixElement(int i, int j)
          Get an individual element of the error matrix
 double getL0()
          Get the (transverse) path length l0 to original track vertex.
 double[] getMomentum()
          Get momentum at DOCA.
 double[] getMomentum(double l)
           
 Hep3Vector getMomentumVec()
           
 Hep3Vector getMomentumVec(double l)
          Calculate and get momentum on track with respect to any path length l on track (l in xy plane).
 int getNDF()
          Get the number degrees of freedom.
 double getOmega()
           
 double getPhi0()
           
 double[] getPosition(double l)
           
 Hep3Vector getPositionVec(double l)
          Calculate and get position on track with respect to any path length l on track (l in xy plane).
 double getPt()
          Get transverse momentum at DOCA.
 double getPtot()
          Get total momentum at DOCA.
 double getPX()
           
 double getPY()
           
 double getPZ()
           
 double getTanL()
           
 double getTheta()
          Get theta angle at DOCA.
 double getTrackParameter(int i)
          Get an individual track parameter.
 double[] getTrackParameters()
          Get the track parameters as an array
 int getUnitCharge()
          Get the unit charge, ie +1, 0, -1.
 double getZ0()
           
 boolean isFlipped()
          Check whether this trackparameter set has been calculated for a curvature flipped track.
 double mag()
           
 double mag2()
           
 void setChi2(double chi2)
          Store the chi2.
 void setL0(double l0)
          Set the (transverse) path length l0 to original track vertex.
 void setNDF(int ndf)
          Change the number degrees of freedom.
 double[] v()
           
 double x()
           
 double y()
           
 double z()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTFLIPPED

public static final int NOTFLIPPED

FLIPPED

public static final int FLIPPED
Constructor Detail

DocaTrackParameters

public DocaTrackParameters()

DocaTrackParameters

public DocaTrackParameters(Particle p)

DocaTrackParameters

public DocaTrackParameters(Particle p,
                           int flipState)

DocaTrackParameters

public DocaTrackParameters(Hep3Vector momentum,
                           Hep3Vector x,
                           double q)

DocaTrackParameters

public DocaTrackParameters(Hep3Vector momentum,
                           Hep3Vector x,
                           double q,
                           int flipState)

DocaTrackParameters

public DocaTrackParameters(double[] momentum,
                           double[] x,
                           double q)

DocaTrackParameters

public DocaTrackParameters(double[] momentum,
                           double[] x,
                           double q,
                           int flipState)

DocaTrackParameters

public DocaTrackParameters(double[] momentum,
                           double[] x,
                           double q,
                           double[][] errorMatrix)

DocaTrackParameters

public DocaTrackParameters(double[] momentum,
                           double[] x,
                           double q,
                           double[][] errorMatrix,
                           int flipState)

DocaTrackParameters

public DocaTrackParameters(double[] parameters)

DocaTrackParameters

public DocaTrackParameters(double[] parameters,
                           double[][] errorMatrix)

DocaTrackParameters

public DocaTrackParameters(double[] parameters,
                           double[][] errorMatrix,
                           double chi2)

DocaTrackParameters

public DocaTrackParameters(double[] parameters,
                           double[][] errorMatrix,
                           double chi2,
                           int ndf)
Method Detail

getDocaPositionVec

public Hep3Vector getDocaPositionVec(Hep3Vector refPoint)
Calculate and get Doca position on track with respect to any space point.

getDocaPositionVec

public Hep3Vector getDocaPositionVec(double[] refPoint)

getDocaPosition

public double[] getDocaPosition(double[] refPoint)

getPositionVec

public Hep3Vector getPositionVec(double l)
Calculate and get position on track with respect to any path length l on track (l in xy plane).

getPosition

public double[] getPosition(double l)

getDocaMomentumVec

public Hep3Vector getDocaMomentumVec(Hep3Vector refPoint)
Calculate and get Doca momentum on track with respect to any space point.

getDocaMomentumVec

public Hep3Vector getDocaMomentumVec(double[] refPoint)

getDocaMomentum

public double[] getDocaMomentum(double[] refPoint)

getMomentumVec

public Hep3Vector getMomentumVec(double l)
Calculate and get momentum on track with respect to any path length l on track (l in xy plane).

getMomentum

public double[] getMomentum(double l)

getDocaTransversePathLength

public double getDocaTransversePathLength(Hep3Vector refPoint)
Calculate and get path length on track for a doca to any space point in respect to the track defining doca (with respect to the origin). The length l is given in the transverse plane.
Use L = l*tan(lambda) to convert.

getDocaTransversePathLength

public double getDocaTransversePathLength(double[] refPoint)

calcPositionErrorMatrix

public double[][] calcPositionErrorMatrix(double l)
Calculate the error matrix for the position coordinates for a point on the track specified by l. Result is given as a 3x3 array for the matrix.

calcMomentumErrorMatrix

public double[][] calcMomentumErrorMatrix(double l)
Calculate the error matrix for the momentum for a point on the track specified by l. Result is given as a 3x3 array for the matrix.

fillErrorMatrix

public void fillErrorMatrix(double[][] errorMatrix)

getChi2

public double getChi2()
Return the chi2 from smearing.
Note: The chi2 is to be calculated and stored by the smearing routine using setChi2().

setChi2

public void setChi2(double chi2)
Store the chi2.

getNDF

public int getNDF()
Get the number degrees of freedom. Default is 5 unless changed with setNDF().

setNDF

public void setNDF(int ndf)
Change the number degrees of freedom.

getUnitCharge

public int getUnitCharge()
Get the unit charge, ie +1, 0, -1.
Specified by:
getUnitCharge in interface TrackParameters

getPt

public double getPt()
Get transverse momentum at DOCA.

getMomentum

public double[] getMomentum()
Get momentum at DOCA.
Specified by:
getMomentum in interface TrackParameters

getMomentumVec

public Hep3Vector getMomentumVec()

getPX

public double getPX()
Specified by:
getPX in interface TrackParameters

getPY

public double getPY()
Specified by:
getPY in interface TrackParameters

getPZ

public double getPZ()
Specified by:
getPZ in interface TrackParameters

getPtot

public double getPtot()
Get total momentum at DOCA.
Specified by:
getPtot in interface TrackParameters

getCosTheta

public double getCosTheta()
get cos(theta) at DOCA.

getTheta

public double getTheta()
Get theta angle at DOCA.

getTrackParameter

public double getTrackParameter(int i)
Get an individual track parameter.
The track parameters for LCD are defined as follows
IndexMeaning
0 d0 = XY impact parameter
1 phi0
2 omega = 1/curv.radius (negative for negative tracks)
3 z0 = z of track (z impact parameter)
4 s = tan lambda
Specified by:
getTrackParameter in interface TrackParameters
Parameters:
i - The index of the track parameter
Returns:
The track parameter with the specified index All parameters are given at the DOCA.

getTrackParameters

public double[] getTrackParameters()
Get the track parameters as an array
Specified by:
getTrackParameters in interface TrackParameters
See Also:
getTrackParameter(int)

getD0

public double getD0()
Specified by:
getD0 in interface TrackParameters

getPhi0

public double getPhi0()
Specified by:
getPhi0 in interface TrackParameters

getOmega

public double getOmega()
Specified by:
getOmega in interface TrackParameters

getZ0

public double getZ0()
Specified by:
getZ0 in interface TrackParameters

getTanL

public double getTanL()
Specified by:
getTanL in interface TrackParameters

getErrorMatrixElement

public double getErrorMatrixElement(int i,
                                    int j)
Get an individual element of the error matrix
Specified by:
getErrorMatrixElement in interface TrackParameters
See Also:
getTrackParameter(int)

getErrorMatrix

public double[][] getErrorMatrix()
Get the error matrix as a 2-D array
Specified by:
getErrorMatrix in interface TrackParameters
See Also:
getTrackParameter(int)

getDoca

public double[] getDoca()
Get coordinates of DOCA.

getDocaVec

public Hep3Vector getDocaVec()
Get coordinates of DOCA.

getDocaX

public double getDocaX()

getDocaY

public double getDocaY()

getDocaZ

public double getDocaZ()

x

public double x()
Specified by:
x in interface Hep3Vector

y

public double y()
Specified by:
y in interface Hep3Vector

z

public double z()
Specified by:
z in interface Hep3Vector

v

public double[] v()
Specified by:
v in interface Hep3Vector

mag

public double mag()
Specified by:
mag in interface Hep3Vector

mag2

public double mag2()
Specified by:
mag2 in interface Hep3Vector

cosTheta

public double cosTheta()
Get cos(Theta) as calculated from the momentum vector at the DOCA.
Note: This is the same as getCosTheta()
Specified by:
cosTheta in interface Hep3Vector

getL0

public double getL0()
Get the (transverse) path length l0 to original track vertex.

setL0

public void setL0(double l0)
Set the (transverse) path length l0 to original track vertex.

isFlipped

public boolean isFlipped()
Check whether this trackparameter set has been calculated for a curvature flipped track.


The LCD Group