![]() |
PandaRoot
|
Track object for genfit. genfit algorithms work on these objects. More...
#include <GFTrack.h>
Public Member Functions | |
GFTrack () | |
Default constructor – needed for compatibility with ROOT. More... | |
GFTrack (const GFTrack &) | |
Copy constructor. More... | |
GFTrack & | operator= (const GFTrack &) |
assignement operator More... | |
GFTrack (GFAbsTrackRep *, bool smooth=false) | |
Initializing constructor. More... | |
virtual | ~GFTrack () |
void | reset () |
Resets the GFTrack – deletes RecoHits! More... | |
int | getFailedHits (int repId=-1) |
return the number of failed Hits in track fit repId == -1 will use cardinal rep More... | |
std::vector< GFAbsRecoHit * > | getHits () |
const GFTrackCand & | getCand () const |
GFAbsRecoHit * | getHit (int id) const |
unsigned int | getNumHits () const |
void | mergeHits (GFTrack *trk) |
Merge two GFTracks. Only hits will be merged. More... | |
void | releaseHits () |
Clear hit vector. Note that hits will not be deleted! More... | |
void | releaseTrackReps () |
Clear TrackRep vector. Note that the Reps will not be deleted! More... | |
unsigned int | getNextHitToFit () const |
Accessor for fNextHitToFit. More... | |
void | setNextHitToFit (unsigned int i) |
Set next hit to be used in a fit. More... | |
GFAbsTrackRep * | getTrackRep (int id) const |
Accessor for track representations. More... | |
unsigned int | getNumReps () const |
Get number of track represenatations. More... | |
GFAbsTrackRep * | getCardinalRep () const |
Get cardinal track representation. More... | |
TVector3 | getMom () const |
Get momentum at the present position. More... | |
TVector3 | getMom (const GFDetPlane &pl) const |
Get momentum at GFDetPlane. More... | |
TVector3 | getPos () const |
Get present position. More... | |
TVector3 | getPos (const GFDetPlane &pl) const |
Get position at GFDetPlane. More... | |
void | getPosMomCov (TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov) |
Get position, momentum, and 6x6 covariance at current position. More... | |
void | getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov) |
Get position, momentum, and 6x6 covariance at GFDetPlane. More... | |
double | getChiSqu () const |
Get chi2. More... | |
unsigned int | getNDF () const |
Get NDF. More... | |
double | getRedChiSqu () const |
Get chi2/NDF. More... | |
double | getCharge () const |
Get charge from fit. More... | |
void | fillGeoTrack (TVirtualGeoTrack *tr) const |
Fill TVirtualGeoTrack object Cardinal representation is used. More... | |
void | fillGeoTrack (TVirtualGeoTrack *tr, unsigned int repid) const |
Fill TVirtualGeoTrack object with data from specified track rep. More... | |
void | addFailedHit (unsigned int irep, unsigned int id) |
void | addHit (GFAbsRecoHit *theHit) |
deprecated! More... | |
void | addHit (GFAbsRecoHit *theHit, unsigned int detId, unsigned int hitId, double rho=0., unsigned int planeId=0) |
Add single hit. Updates the GFTrackCand. More... | |
void | addHitVector (std::vector< GFAbsRecoHit *> hits) |
Add collection of hits. More... | |
void | addTrackRep (GFAbsTrackRep *theTrackRep) |
Add track represenation. More... | |
GFBookkeeping * | getBK (int index=-1) |
get GFBookKeeping object for particular track rep (default is cardinal rep) More... | |
void | setCandidate (const GFTrackCand &cand, bool doreset=false) |
set track candidate More... | |
void | setCardinalRep (unsigned int r) |
Choose cardinal track represenatation. More... | |
void | getResiduals (unsigned int detId, unsigned int dim, unsigned int rep, std::vector< double > &result) |
Get residuals. More... | |
void | setRepAtHit (unsigned int irep, int ihit) |
set the hit index at which plane,state&cov of rep irep is defined More... | |
int | getRepAtHit (unsigned int irep) |
get the hit index at which plane,state&cov of rep irep is defined More... | |
void | clearRepAtHit () |
clear the hit indices at which plane,state&cov of reps are defined More... | |
void | printBookkeeping () |
print bookkeeping More... | |
void | Print () |
void | clearBookkeeping () |
void | clearFailedHits () |
void | getHitsByPlane (std::vector< std::vector< int > *> &retVal) |
void | setSmoothing (bool smooth=true) |
Switch smoothing on or off for this track. More... | |
bool | getSmoothing () |
Read back if smoothing is/was turned on or off for this track. More... | |
void | blowUpCovs (double blowUpFactor) |
this is needed to blow up the covariance matrix before a fitting pass drops off-diagonal elements and blows up diagonal by blowUpFactor More... | |
Track object for genfit. genfit algorithms work on these objects.
Can be used as transient (only in memory) or persistent (written to ROOT-file) object.
A GFTrack contains a collection of RecoHits plus a collection of track representations. The GFTrackCand member is a helper object to store the indices of the hits in the GFTrack.
For a GFTrack one so called "cardinal representation" can be defined. It is that track representation that is used to access the fit results. Usually one will after the fit choose the best fitting representation to be the cardinal rep.
The GFTRack takes ownership over the GFAbsRecoHit pointers it holds.
GFTrack::GFTrack | ( | ) |
Default constructor – needed for compatibility with ROOT.
GFTrack::GFTrack | ( | const GFTrack & | ) |
Copy constructor.
GFTrack::GFTrack | ( | GFAbsTrackRep * | , |
bool | smooth = false |
||
) |
Initializing constructor.
A track needs at least one track representation to be useable. The given track representation has to contain starting values for the fit!
|
virtual |
|
inline |
|
inline |
|
inline |
Add single hit. Updates the GFTrackCand.
Definition at line 286 of file GFTrack.h.
References GFTrackCand::addHit().
|
inline |
|
inline |
Add track represenation.
The given track representation has to contain starting values for fit!
Definition at line 302 of file GFTrack.h.
void GFTrack::blowUpCovs | ( | double | blowUpFactor | ) |
this is needed to blow up the covariance matrix before a fitting pass drops off-diagonal elements and blows up diagonal by blowUpFactor
Referenced by getSmoothing().
|
inline |
Definition at line 376 of file GFTrack.h.
References getNumReps(), and i.
|
inline |
Definition at line 383 of file GFTrack.h.
References getHitsByPlane(), getNumReps(), and i.
|
inline |
clear the hit indices at which plane,state&cov of reps are defined
Definition at line 363 of file GFTrack.h.
References getNumReps(), i, Print(), and printBookkeeping().
|
inline |
Fill TVirtualGeoTrack object Cardinal representation is used.
Definition at line 264 of file GFTrack.h.
References fillGeoTrack().
Referenced by fillGeoTrack().
void GFTrack::fillGeoTrack | ( | TVirtualGeoTrack * | tr, |
unsigned int | repid | ||
) | const |
Fill TVirtualGeoTrack object with data from specified track rep.
|
inline |
get GFBookKeeping object for particular track rep (default is cardinal rep)
Definition at line 312 of file GFTrack.h.
References getNumReps(), and setCandidate().
|
inline |
|
inline |
Get cardinal track representation.
The user has to choose which track rep should be considered the best one after the fit. Usually the track representation giving the smallest chi2 is choosen. By default the first in the list is returned.
Definition at line 197 of file GFTrack.h.
Referenced by getCharge(), getChiSqu(), getMom(), getNDF(), getPos(), getPosMomCov(), and getRedChiSqu().
|
inline |
Get charge from fit.
Cardinal representation is used.
Definition at line 260 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getCharge().
|
inline |
Get chi2.
Cardinal representation is used.
Definition at line 242 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getChiSqu().
|
inline |
|
inline |
|
inline |
void GFTrack::getHitsByPlane | ( | std::vector< std::vector< int > *> & | retVal | ) |
use planeId information of GFTrackCand and return by ref groups of hit ids which are in the same planes.
Referenced by clearFailedHits().
|
inline |
Get momentum at the present position.
Cardinal representation is used.
Definition at line 203 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getMom().
|
inline |
Get momentum at GFDetPlane.
The track will be extrapolated to GFDetPlane to get the momentum there. The track will not be modified. Cardinal representation is used.
Definition at line 210 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getMom().
|
inline |
Get NDF.
Cardinal representation is used.
Definition at line 248 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getNDF().
|
inline |
|
inline |
|
inline |
Get number of track represenatations.
Definition at line 189 of file GFTrack.h.
Referenced by clearBookkeeping(), clearFailedHits(), clearRepAtHit(), getBK(), getRepAtHit(), and setRepAtHit().
|
inline |
Get present position.
Cardinal representation is used.
Definition at line 216 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getPos().
|
inline |
Get position at GFDetPlane.
The track will be extrapolated to GFDetPlane to get the position there. The track will not be modified. Cardinal representation is used.
Definition at line 223 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getPos().
|
inline |
Get position, momentum, and 6x6 covariance at current position.
Cardinal representation is used.
Definition at line 229 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getPosMomCov().
|
inline |
Get position, momentum, and 6x6 covariance at GFDetPlane.
The track will be extrapolated to GFDetPlane to get everything there. The track will not be modified. Cardinal representation is used.
Definition at line 236 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getPosMomCov().
|
inline |
Get chi2/NDF.
Cardinal representation is used.
Definition at line 254 of file GFTrack.h.
References getCardinalRep(), and GFAbsTrackRep::getRedChiSqu().
|
inline |
get the hit index at which plane,state&cov of rep irep is defined
Definition at line 355 of file GFTrack.h.
References getNumReps().
void GFTrack::getResiduals | ( | unsigned int | detId, |
unsigned int | dim, | ||
unsigned int | rep, | ||
std::vector< double > & | result | ||
) |
Get residuals.
detId | which detector? |
dim | = index of coordinate to choose from resiudal vector |
rep | which track representation? |
result | results are written to this vector |
Referenced by setCardinalRep().
|
inline |
Read back if smoothing is/was turned on or off for this track.
Definition at line 400 of file GFTrack.h.
References blowUpCovs().
|
inline |
Accessor for track representations.
Definition at line 185 of file GFTrack.h.
void GFTrack::mergeHits | ( | GFTrack * | trk | ) |
Merge two GFTracks. Only hits will be merged.
All hits from trk will be merged into this GFTrack. trk will be empty afterwards.
Kalman::continueTrack can be used to include the newly added hits in the fit.
Note that the new hits are inserted at the end of the present track!
Referenced by getNumHits().
void GFTrack::Print | ( | ) |
Referenced by clearRepAtHit().
void GFTrack::printBookkeeping | ( | ) |
print bookkeeping
Referenced by clearRepAtHit().
|
inline |
|
inline |
void GFTrack::reset | ( | ) |
Resets the GFTrack – deletes RecoHits!
void GFTrack::setCandidate | ( | const GFTrackCand & | cand, |
bool | doreset = false |
||
) |
set track candidate
Referenced by getBK().
|
inline |
Choose cardinal track represenatation.
Definition at line 327 of file GFTrack.h.
References getResiduals().
|
inline |
|
inline |
set the hit index at which plane,state&cov of rep irep is defined
Definition at line 347 of file GFTrack.h.
References getNumReps().
|
inline |