hep.lcd.vertexing.zvtop
Class ZvTrack

java.lang.Object
  |
  +--hep.lcd.vertexing.zvtop.ZvTrack
Direct Known Subclasses:
ZvGhostTrack

public class ZvTrack
extends Object
implements Track

ZvTrack -- ZvTop internal track representation

Class provides conversion to/from TrackParameters

Version:
$Id: ZvTrack.java,v 1.2 2001/06/05 18:20:58 walkowia Exp $
Author:
W.Walkowiak, 09/13/00
Source Code:
ZvTrack.java

Constructor Summary
ZvTrack()
           
ZvTrack(double[] hlxPar, double charge)
           
ZvTrack(double[] hlxPar, double[][] dHlxPar, double charge)
           
ZvTrack(ReconTrack tRecon)
           
ZvTrack(ZvTrack track)
          copy constructor
 
Method Summary
 ZvTrack copy()
          make a deep copy
 double cosTheta()
          cos(Theta) of momentum vector for Hep3VectorImplementation
 String dumpToString()
          print the current values of hlxPar[6] and dHlxPar[5][5] to a String
 boolean equals(ZvTrack track)
          Check for being the same track handle.
 boolean fitSuccess()
          fitSuccess() is always true for MC tracks
 ZvVertex getAssignedVertex()
          get assigned vertex information
 int getCharge()
          get the track charge (in units of e)
 double getChi2()
          getChi2() (from track fit) is set to 0.
 double getChi2Contribution()
          get chi2 contribution to assigned vertex by this track
 Vector getChi2Vec()
          get vector with Chi2 contributions to vertices by this track
 double[][] getErrorMatrix()
          get the helix parameter error matrix array
(5x5 dim - LCD/BaBar convention)
 double getErrorMatrixElement(int i, int j)
          get a helix parameter error matrix element
(5x5 dim - LCD/BaBar convention)
 double getLongDist()
          get longitudinal distance along line IP - choosen vtx
 MCParticle getMCParticle()
          get MC particle associated with track
 double[] getMomentum()
          get momentum vector
 double getMomentumX()
           
 double getMomentumY()
           
 double getMomentumZ()
           
 double getNDF()
          getNDF() (for track fit) is set to 0.
 TrackParameters getNewTrackParameters()
          Get the TrackParameters as constructed from ZvTrack information.
 double[] getOrigin()
          use current doca position as origin of track
 double getOriginX()
          x position
 double getOriginY()
          y position
 double getOriginZ()
          z position
 ReconTrack getOrigReconTrack()
          Get the ReconTrack as entered on creation.
 TrackParameters getOrigTrackParameters()
          Get the TrackParameters as entered on creation.
 double getPt()
          get transverse momentum Pt
 double getPtot()
          get total momentum
 double getPX()
          get momentum in x
 double getPY()
          get momentum in y
 double getPZ()
          get momentum in z
 ZvSwimStatus getSwimStatus()
          get the swim status
 double getTrackParameter(int i)
          get the helix parameter i
(5 dim - LCD/BaBar convention)
 double[] getTrackParameters()
          get the helix parameter array
(5 dim - LCD/BaBar convention)
 double getTransDist()
          get transverse distance from line IP - choosen vtx
 int getVtxInfo()
          get special information on vertex
settingmeaning vtxInfo == -1 --isolated track vtxInfo n >= 0--vertex of order n+1 vtxInfo < -1 --special vertex type Note 1: A special vertex type doesn't necessarily mean that a vertex handle is actually stored.
 Vector getVtxSigVec()
          get vector with vertex significances if this track is included into vertex
 double[][] getZvTrackError()
          get the helix parameter error matrix array
(5x5 dim - ZvTrack convention)
 double getZvTrackError(int i, int j)
          get the helix parameter error matrix element (i,j)
(5x5 dim - ZvTrack convention)
 double[][] getZvTrackErrorCopy()
          get the helix parameter error matrix array as a deep copy
(5x5 dim - ZvTrack convention)
 double getZvTrackKappa()
          get track kappa
 double[] getZvTrackParam()
          get the helix parameter array
(6 dim - ZvTrack convention)
 double getZvTrackParam(int i)
          get the helix parameter i
(6 dim - ZvTrack convention)
 double[] getZvTrackParamCopy()
          get the helix parameter array as a deep copy
(6 dim - ZvTrack convention)
 double getZvTrackPhi()
          get track phi
 double[] getZvTrackPos()
          get the helix parameter position sub array
(3 out of 6 dim - ZvTrack convention)
 double getZvTrackTanL()
          get track tanL
 boolean isGhost()
          check whether track describes a ghost track
 boolean isInAnyVertex()
          is track in any vertex? based on VtxInfo >= 0
 boolean isInVertex(ZvVertex vertex)
          is track in this specific vertex?
 boolean isIsolated()
          isolated track? based on vtxInfo == -1
 boolean isSpecial()
          is track marked as special? based on VtxInfo < -1
 double mag()
          total momentum for Hep3Vector implementation
 double mag2()
          squared total momentum for Hep3Vector implementation
protected  boolean same(ZvTrack track)
          compare for same handle first
if not identical, than compare trackIds
protected  boolean sameId(ZvTrack track)
          compare for same trackId
 void setAssignedVertex(ZvVertex vertex)
          set assigned vertex information
 void setAssignedVertex(ZvVertex vertex, double chi2Contribution)
          set assigned vertex information and chi2 contribution by this track
 void setCharge(double charge)
          set the track charge
 void setChi2Contribution(double chi2Contribution)
          set chi2 contribution to assigned vertex by this track
 void setLongDist(double longDist)
          set longitudinal distance along line IP - choosen vtx
 void setSwimStatus(ZvSwimStatus status)
          set the swim status
protected  void setTrackId(int id)
          set track id
default: -1 : none
 void setTrackParameters(ReconTrack tRecon)
          ZvTrack converts track parameters to: IndexMeaning 0 phi 1 kappa = 1/pt 2 s = tan(lambda) 3 x 4 y 5 z
ATTENTION: The ZvTrack error matrix uses however: IndexMeaning 0 phi 1 kappa = 1/pt 2 s = tan(lambda) 3 ksi 4 eta
 void setTrackParameters(TrackParameters trackParameters)
          Set track parameters directly from TrackParameters and convert.
 void setTransDist(double transDist)
          set transverse distance from line IP - choosen vtx
 void setVtxInfo(int vtxInfo)
          set special information on vertex
 void setZvTrackError(double[][] dHlxPar)
          set the helix parameter error array
(5x5 dim - ZvTrack convention)
 void setZvTrackKappa(double kappa)
          set track kappa
 void setZvTrackParam(double[] hlxPar)
          set the helix parameter array
(6 dim - ZvTrack convention)
 void setZvTrackParam(double[] hlxPar, double charge)
          set the helix parameter array plus charge
(6 dim - ZvTrack convention)
 void setZvTrackParam(int i, double value)
          set the helix parameter i
(6 dim - ZvTrack convention)
 void setZvTrackPhi(double phi)
          set track phi
 void setZvTrackPos(double[] hlxPos)
          set the helix parameter position sub array
(3 out of 6 dim - ZvTrack convention)
 void setZvTrackTanL(double tanL)
          set track tanL
 void storeChi2Vec(Vector vChi2Contributions)
          store vector with Chi2 contributions to vertices by this track
 void storeVtxSigVec(Vector vNewVertexSignificances)
          store vector with vertex significances if this track is included into vertex
protected  int trackId()
          get track id
-1 : not set
protected  void unsetTrackId()
          unset track id
 double[] v()
          momentum for Hep3Vector implementation
 double x()
          x momentum for Hep3Vector implementation
 double y()
          momentum y for Hep3Vector implementation
 double z()
          z momentum for Hep3Vector implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZvTrack

public ZvTrack()

ZvTrack

public ZvTrack(ReconTrack tRecon)

ZvTrack

public ZvTrack(double[] hlxPar,
               double[][] dHlxPar,
               double charge)

ZvTrack

public ZvTrack(double[] hlxPar,
               double charge)

ZvTrack

public ZvTrack(ZvTrack track)
copy constructor
Method Detail

setTrackParameters

public void setTrackParameters(ReconTrack tRecon)
ZvTrack converts track parameters to:
IndexMeaning
0 phi
1 kappa = 1/pt
2 s = tan(lambda)
3 x
4 y
5 z

ATTENTION: The ZvTrack error matrix uses however:
IndexMeaning
0 phi
1 kappa = 1/pt
2 s = tan(lambda)
3 ksi
4 eta

setTrackParameters

public void setTrackParameters(TrackParameters trackParameters)
Set track parameters directly from TrackParameters and convert.

getNewTrackParameters

public TrackParameters getNewTrackParameters()
Get the TrackParameters as constructed from ZvTrack information.

getOrigTrackParameters

public TrackParameters getOrigTrackParameters()
Get the TrackParameters as entered on creation.

getOrigReconTrack

public ReconTrack getOrigReconTrack()
Get the ReconTrack as entered on creation.

setZvTrackParam

public void setZvTrackParam(double[] hlxPar,
                            double charge)
set the helix parameter array plus charge
(6 dim - ZvTrack convention)

setZvTrackParam

public void setZvTrackParam(double[] hlxPar)
set the helix parameter array
(6 dim - ZvTrack convention)

setZvTrackParam

public void setZvTrackParam(int i,
                            double value)
set the helix parameter i
(6 dim - ZvTrack convention)

setZvTrackPos

public void setZvTrackPos(double[] hlxPos)
set the helix parameter position sub array
(3 out of 6 dim - ZvTrack convention)

setCharge

public void setCharge(double charge)
set the track charge

setZvTrackPhi

public void setZvTrackPhi(double phi)
set track phi

setZvTrackKappa

public void setZvTrackKappa(double kappa)
set track kappa

setZvTrackTanL

public void setZvTrackTanL(double tanL)
set track tanL

getZvTrackParam

public double[] getZvTrackParam()
get the helix parameter array
(6 dim - ZvTrack convention)

getZvTrackParamCopy

public double[] getZvTrackParamCopy()
get the helix parameter array as a deep copy
(6 dim - ZvTrack convention)

getZvTrackParam

public double getZvTrackParam(int i)
get the helix parameter i
(6 dim - ZvTrack convention)

getZvTrackPos

public double[] getZvTrackPos()
get the helix parameter position sub array
(3 out of 6 dim - ZvTrack convention)

setZvTrackError

public void setZvTrackError(double[][] dHlxPar)
set the helix parameter error array
(5x5 dim - ZvTrack convention)

getCharge

public int getCharge()
get the track charge (in units of e)
Specified by:
getCharge in interface Track

getZvTrackPhi

public double getZvTrackPhi()
get track phi

getZvTrackKappa

public double getZvTrackKappa()
get track kappa

getZvTrackTanL

public double getZvTrackTanL()
get track tanL

getPt

public double getPt()
get transverse momentum Pt

getPX

public double getPX()
get momentum in x
Specified by:
getPX in interface Track

getPY

public double getPY()
get momentum in y
Specified by:
getPY in interface Track

getPZ

public double getPZ()
get momentum in z
Specified by:
getPZ in interface Track

getPtot

public double getPtot()
get total momentum

getMomentum

public double[] getMomentum()
get momentum vector
Specified by:
getMomentum in interface Track

getMomentumX

public double getMomentumX()
Specified by:
getMomentumX in interface Track
See Also:
getPX()

getMomentumY

public double getMomentumY()
Specified by:
getMomentumY in interface Track
See Also:
getPY()

getMomentumZ

public double getMomentumZ()
Specified by:
getMomentumZ in interface Track
See Also:
getPZ()

getZvTrackError

public double[][] getZvTrackError()
get the helix parameter error matrix array
(5x5 dim - ZvTrack convention)

getZvTrackErrorCopy

public double[][] getZvTrackErrorCopy()
get the helix parameter error matrix array as a deep copy
(5x5 dim - ZvTrack convention)

getZvTrackError

public double getZvTrackError(int i,
                              int j)
get the helix parameter error matrix element (i,j)
(5x5 dim - ZvTrack convention)

getErrorMatrix

public double[][] getErrorMatrix()
get the helix parameter error matrix array
(5x5 dim - LCD/BaBar convention)
Specified by:
getErrorMatrix in interface Track
Following copied from interface: hep.lcd.event.Track
See Also:
Track.getTrackParameter(int)

getTrackParameters

public double[] getTrackParameters()
get the helix parameter array
(5 dim - LCD/BaBar convention)
Specified by:
getTrackParameters in interface Track
Following copied from interface: hep.lcd.event.Track
See Also:
Track.getTrackParameter(int)

getTrackParameter

public double getTrackParameter(int i)
get the helix parameter i
(5 dim - LCD/BaBar convention)
Specified by:
getTrackParameter in interface Track
Following copied from interface: hep.lcd.event.Track
Parameters:
i - The index of the track parameter
Returns:
The track parameter with the specified index

getErrorMatrixElement

public double getErrorMatrixElement(int i,
                                    int j)
get a helix parameter error matrix element
(5x5 dim - LCD/BaBar convention)
Specified by:
getErrorMatrixElement in interface Track
Following copied from interface: hep.lcd.event.Track
See Also:
Track.getTrackParameter(int)

setSwimStatus

public void setSwimStatus(ZvSwimStatus status)
set the swim status

getSwimStatus

public ZvSwimStatus getSwimStatus()
get the swim status

setAssignedVertex

public void setAssignedVertex(ZvVertex vertex)
set assigned vertex information

setAssignedVertex

public void setAssignedVertex(ZvVertex vertex,
                              double chi2Contribution)
set assigned vertex information and chi2 contribution by this track

getAssignedVertex

public ZvVertex getAssignedVertex()
get assigned vertex information

setChi2Contribution

public void setChi2Contribution(double chi2Contribution)
set chi2 contribution to assigned vertex by this track

getChi2Contribution

public double getChi2Contribution()
get chi2 contribution to assigned vertex by this track

storeChi2Vec

public void storeChi2Vec(Vector vChi2Contributions)
store vector with Chi2 contributions to vertices by this track

getChi2Vec

public Vector getChi2Vec()
get vector with Chi2 contributions to vertices by this track

storeVtxSigVec

public void storeVtxSigVec(Vector vNewVertexSignificances)
store vector with vertex significances if this track is included into vertex

getVtxSigVec

public Vector getVtxSigVec()
get vector with vertex significances if this track is included into vertex

setTransDist

public void setTransDist(double transDist)
set transverse distance from line IP - choosen vtx

setLongDist

public void setLongDist(double longDist)
set longitudinal distance along line IP - choosen vtx

getTransDist

public double getTransDist()
get transverse distance from line IP - choosen vtx

getLongDist

public double getLongDist()
get longitudinal distance along line IP - choosen vtx

equals

public boolean equals(ZvTrack track)
Check for being the same track handle.

setVtxInfo

public void setVtxInfo(int vtxInfo)
set special information on vertex
See Also:
getVtxInfo()

getVtxInfo

public int getVtxInfo()
get special information on vertex
settingmeaning
vtxInfo == -1 --isolated track
vtxInfo n >= 0--vertex of order n+1
vtxInfo < -1 --special vertex type
Note 1: A special vertex type doesn't necessarily mean that a vertex handle is actually stored.
Note 2: A track can only be in either one of these three states. Ie not all tracks with a missing regular track are nescessarily marked as isolated tracks. (Use !isInVertex().)
See Also:
isInAnyVertex(), isIsolated(), isSpecial()

isIsolated

public boolean isIsolated()
isolated track? based on vtxInfo == -1
See Also:
getVtxInfo()

isInAnyVertex

public boolean isInAnyVertex()
is track in any vertex? based on VtxInfo >= 0
See Also:
getVtxInfo()

isSpecial

public boolean isSpecial()
is track marked as special? based on VtxInfo < -1
See Also:
getVtxInfo()

isInVertex

public boolean isInVertex(ZvVertex vertex)
is track in this specific vertex?

fitSuccess

public boolean fitSuccess()
fitSuccess() is always true for MC tracks
Specified by:
fitSuccess in interface Track
See Also:
to check for correct swimming

getChi2

public double getChi2()
getChi2() (from track fit) is set to 0. for MC tracks
Specified by:
getChi2 in interface Track
See Also:
for chi2 contribution of this track to the vertex it belongs.

getNDF

public double getNDF()
getNDF() (for track fit) is set to 0. for MC tracks
Specified by:
getNDF in interface Track
Following copied from interface: hep.lcd.event.Track
Returns:
The number of degrees of freedom
See Also:
Track.getChi2()

getMCParticle

public MCParticle getMCParticle()
get MC particle associated with track
Specified by:
getMCParticle in interface Track

getOrigin

public double[] getOrigin()
use current doca position as origin of track
Specified by:
getOrigin in interface Track
See Also:
to find origin of MC particle, getZvTrackPos()

getOriginX

public double getOriginX()
x position
Specified by:
getOriginX in interface Track
See Also:
getOrigin()

getOriginY

public double getOriginY()
y position
Specified by:
getOriginY in interface Track
See Also:
getOrigin()

getOriginZ

public double getOriginZ()
z position
Specified by:
getOriginZ in interface Track
See Also:
getOrigin()

v

public double[] v()
momentum for Hep3Vector implementation
Specified by:
v in interface Hep3Vector
See Also:
getMomentum()

x

public double x()
x momentum for Hep3Vector implementation
Specified by:
x in interface Hep3Vector
See Also:
getMomentumX()

y

public double y()
momentum y for Hep3Vector implementation
Specified by:
y in interface Hep3Vector
See Also:
getMomentumY()

z

public double z()
z momentum for Hep3Vector implementation
Specified by:
z in interface Hep3Vector
See Also:
getMomentumZ()

mag

public double mag()
total momentum for Hep3Vector implementation
Specified by:
mag in interface Hep3Vector

mag2

public double mag2()
squared total momentum for Hep3Vector implementation
Specified by:
mag2 in interface Hep3Vector

cosTheta

public double cosTheta()
cos(Theta) of momentum vector for Hep3VectorImplementation
Specified by:
cosTheta in interface Hep3Vector

isGhost

public boolean isGhost()
check whether track describes a ghost track

copy

public ZvTrack copy()
make a deep copy

dumpToString

public String dumpToString()
print the current values of hlxPar[6] and dHlxPar[5][5] to a String

setTrackId

protected void setTrackId(int id)
set track id
default: -1 : none

unsetTrackId

protected void unsetTrackId()
unset track id

trackId

protected int trackId()
get track id
-1 : not set

sameId

protected boolean sameId(ZvTrack track)
compare for same trackId

same

protected boolean same(ZvTrack track)
compare for same handle first
if not identical, than compare trackIds


The LCD Group