FairRoot/PandaRoot
|
Base Class for genfit track representations. Defines interface for track parameterizations. More...
#include <GFAbsTrackRep.h>
Public Member Functions | |
virtual GFAbsTrackRep * | clone () const =0 |
virtual GFAbsTrackRep * | prototype () const =0 |
virtual double | extrapolate (const GFDetPlane &plane, TMatrixT< double > &statePred) |
returns the tracklength spanned in this extrapolation More... | |
GFAbsTrackRep () | |
GFAbsTrackRep (int) | |
virtual | ~GFAbsTrackRep () |
virtual void | extrapolateToPoint (const TVector3 &point, TVector3 &poca, TVector3 &normVec) |
This method is to extrapolate the track to point of closest approach to a point in space. More... | |
virtual void | extrapolateToLine (const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &normVec, TVector3 &poca_onwire) |
This method extrapolates to the point of closest approach to a line. More... | |
virtual double | stepalong (double h, TVector3 &point, TVector3 &dir) |
make step of h cm along the track More... | |
virtual double | extrapolate (const GFDetPlane &plane, TMatrixT< double > &statePred, TMatrixT< double > &covPred)=0 |
Extrapolates the track to the given detectorplane. More... | |
double | extrapolate (const GFDetPlane &plane) |
This changes the state and cov and plane of the rep. More... | |
unsigned int | getDim () const |
returns dimension of state vector More... | |
virtual void | Print () const |
TMatrixT< double > | getState () const |
TMatrixT< double > | getCov () const |
double | getStateElem (int i) const |
double | getCovElem (int i, int j) const |
virtual TVector3 | getPos (const GFDetPlane &pl)=0 |
virtual TVector3 | getMom (const GFDetPlane &pl)=0 |
virtual void | getPosMom (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom)=0 |
virtual void | getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov) |
method which gets position, momentum and 6x6 covariance matrix More... | |
virtual double | getCharge () const =0 |
TVector3 | getPos () |
TVector3 | getMom () |
void | getPosMomCov (TVector3 &pos, TVector3 &mom, TMatrixT< double > &c) |
TMatrixT< double > | getFirstState () const |
TMatrixT< double > | getFirstCov () const |
GFDetPlane | getFirstPlane () const |
TMatrixT< double > | getLastState () const |
TMatrixT< double > | getLastCov () const |
GFDetPlane | getLastPlane () const |
double | getChiSqu () const |
double | getRedChiSqu () const |
returns chi2/ndf More... | |
unsigned int | getNDF () const |
virtual void | setData (const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=NULL, const TMatrixT< double > *aux=NULL) |
Puts the track representation in a given state. More... | |
void | setCov (const TMatrixT< double > &aCov) |
void | setFirstState (const TMatrixT< double > &aState) |
void | setFirstCov (const TMatrixT< double > &aCov) |
void | setFirstPlane (const GFDetPlane &aPlane) |
void | setLastState (const TMatrixT< double > &aState) |
void | setLastCov (const TMatrixT< double > &aCov) |
void | setLastPlane (const GFDetPlane &aPlane) |
const GFDetPlane & | getReferencePlane () const |
void | setChiSqu (double aChiSqu) |
void | setNDF (unsigned int n) |
void | addChiSqu (double aChiSqu) |
void | addNDF (unsigned int n) |
void | setStatusFlag (int _val) |
virtual void | switchDirection ()=0 |
bool | setInverted (bool f=true) |
Deprecated. Should be removed soon. More... | |
bool | getStatusFlag () |
virtual void | reset () |
virtual bool | hasAuxInfo () |
See if the track representation has auxillary information stored. More... | |
virtual const TMatrixT< double > * | getAuxInfo (const GFDetPlane &) |
Get auxillary information from the track representation. More... | |
Protected Attributes | |
unsigned int | fDimension |
Dimensionality of track representation. More... | |
TMatrixT< double > | fState |
The vector of track parameters. More... | |
TMatrixT< double > | fCov |
The covariance matrix. More... | |
double | fChiSqu |
chiSqu of the track fit More... | |
unsigned int | fNdf |
int | fStatusFlag |
status of track representation: 0 means everything's OK More... | |
bool | fInverted |
specifies the direction of flight of the particle More... | |
TMatrixT< double > | fFirstState |
state, cov and plane for first and last point in fit More... | |
TMatrixT< double > | fFirstCov |
TMatrixT< double > | fLastState |
TMatrixT< double > | fLastCov |
GFDetPlane | fFirstPlane |
GFDetPlane | fLastPlane |
GFDetPlane | fRefPlane |
Private Member Functions | |
void | Abort (std::string method) |
Base Class for genfit track representations. Defines interface for track parameterizations.
It is important to understand the difference between a track and a track representation in genfit:
All track tepresentations must inherit GFAbsTrackRep to be available in genfit. Algorithms in genfit use this class as interface to access track parameters
Provides:
The track extrapolation engine can be exchanged in genfit. Or one can even use more than one engine in parallel! In order to use a track extrapolation engine (like e.g. GEANE) with genfit one has to write a TrackRep class that inherits from GFAbsTrackRep. This makes it possible to uses different track extrapolation codes within a unified framework without major changes in the detector code.
There is only one thing one has to do to use a specific track representation together with the hits from a detector: add the respective code in the GFAbsRecoHit::getHMatrix method implementation of the RecoHit in question.
Definition at line 80 of file GFAbsTrackRep.h.
GFAbsTrackRep::GFAbsTrackRep | ( | ) |
Definition at line 23 of file GFAbsTrackRep.cxx.
GFAbsTrackRep::GFAbsTrackRep | ( | int | dim | ) |
Definition at line 27 of file GFAbsTrackRep.cxx.
|
virtual |
Definition at line 31 of file GFAbsTrackRep.cxx.
|
private |
Definition at line 47 of file GFAbsTrackRep.cxx.
Referenced by extrapolateToLine(), extrapolateToPoint(), getPosMomCov(), and stepalong().
|
inline |
|
inline |
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GenfitTrack2PndTrack(), GFTools::getBiasedSmoothedData(), GFTools::getSmoothedData(), and GFTrack::operator=().
|
virtual |
returns the tracklength spanned in this extrapolation
There is a default implementation in GFAbsTrackRep.cxx which just drops the predicted covaraiance. If your trackrep has a way to extrapolate without giving a correct cov (that would be faster probably), please overwrite it.
Reimplemented in RKTrackRep, and GeaneTrackRep.
Definition at line 42 of file GFAbsTrackRep.cxx.
References fDimension.
Referenced by extrapolate(), GFTools::getBiasedSmoothedData(), GFKalman::getChi2Hit(), GFTrack::getResiduals(), GFTools::getSmoothedData(), and GFKalman::processHit().
|
pure virtual |
Extrapolates the track to the given detectorplane.
Results are put into statePred and covPred This method does NOT alter the state of the object!
Implemented in RKTrackRep, and GeaneTrackRep.
double GFAbsTrackRep::extrapolate | ( | const GFDetPlane & | plane | ) |
This changes the state and cov and plane of the rep.
This method extrapolates to to the plane and sets the results of state, cov and also plane in itself.
Definition at line 33 of file GFAbsTrackRep.cxx.
References extrapolate(), fDimension, and setData().
|
virtual |
This method extrapolates to the point of closest approach to a line.
This method extrapolates to the POCA to a line, i.e. a wire. There is a default implementation just like for the extrapolateToPoca for trackReps which do not need this feature, which will abort the execution if it is ever called.
Reimplemented in RKTrackRep, and GeaneTrackRep.
Definition at line 62 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by GFWirepointHitPolicy::detPlane(), and GFWireHitPolicy::detPlane().
|
virtual |
This method is to extrapolate the track to point of closest approach to a point in space.
There is an empty implementation of this method in GFAbsTrackRep.cxx, which will just abort with an error message. One can overwrite this method if one wishes to implement a track representation, which should have this feature. An example of an experiment in which you would not need this feature would be track fitting (not so much vertexing) in an experiment with only planar trackers like silicons or planar wire chambers and such. An example where you would need it, would be a TPC where you have to fit the track to space points, or other drift chambers with complicated hit topology.
Reimplemented in RKTrackRep, and GeaneTrackRep.
Definition at line 56 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by GFSpacepointHitPolicy::detPlane(), and trackProximity().
|
inlinevirtual |
Get auxillary information from the track representation.
AuxInfo is a mechanism which allows creators of track repersentations to hand out any information they like (as long as it is compatible with a TMatrixT<double>). It should be used if setData requires additional information to update the representation, but it can also be used for debugging information if needed. See also the documentation of GFAbsTrackRep::setData().
Reimplemented in RKTrackRep.
Definition at line 342 of file GFAbsTrackRep.h.
Referenced by GFKalman::processHit().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GFTrack::getCharge().
|
inline |
Definition at line 244 of file GFAbsTrackRep.h.
References fChiSqu.
Referenced by GFTrack::getChiSqu(), and getRedChiSqu().
|
inline |
Definition at line 198 of file GFAbsTrackRep.h.
References fCov.
Referenced by GFTrack::blowUpCovs(), GFKalman::processHit(), and GFKalman::processTrack().
|
inline |
|
inline |
returns dimension of state vector
Definition at line 191 of file GFAbsTrackRep.h.
References fDimension.
Referenced by GeaneTrackRep::extrapolateToPoint(), GFKalman::getChi2Hit(), getNDF(), GFTrack::getResiduals(), and GFKalman::processHit().
|
inline |
Definition at line 229 of file GFAbsTrackRep.h.
References fFirstCov.
Referenced by GenfitTrack2PndTrack().
|
inline |
Definition at line 232 of file GFAbsTrackRep.h.
References fFirstPlane.
Referenced by GenfitTrack2PndTrack().
|
inline |
Definition at line 226 of file GFAbsTrackRep.h.
References fFirstState.
Referenced by GenfitTrack2PndTrack().
|
inline |
Definition at line 238 of file GFAbsTrackRep.h.
References fLastCov.
Referenced by GenfitTrack2PndTrack().
|
inline |
Definition at line 241 of file GFAbsTrackRep.h.
References fLastPlane.
Referenced by GenfitTrack2PndTrack().
|
inline |
Definition at line 235 of file GFAbsTrackRep.h.
References fLastState.
Referenced by GenfitTrack2PndTrack().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by PndHypMicroWriter::Exec(), PndHypDKalmanTask::Exec(), for(), GenfitTrack2PndTrack(), and GFTrack::getMom().
|
inline |
Definition at line 221 of file GFAbsTrackRep.h.
References getMom().
Referenced by GeaneTrackRep::extrapolate(), GeaneTrackRep::extrapolateToLine(), GeaneTrackRep::extrapolateToPoint(), and getMom().
|
inline |
Definition at line 252 of file GFAbsTrackRep.h.
References getDim().
Referenced by GFTrack::getNDF(), and getRedChiSqu().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by PndHypMicroWriter::Exec(), GFTrack::fillGeoTrack(), GFTrack::getPos(), and trkDist().
|
inline |
Definition at line 220 of file GFAbsTrackRep.h.
References getPos().
Referenced by GeaneTrackRep::extrapolateToLine(), and getPos().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
|
virtual |
method which gets position, momentum and 6x6 covariance matrix
default implementation in cxx file, if a ConcreteTrackRep can not implement this functionality
Reimplemented in RKTrackRep, and GeaneTrackRep.
Definition at line 79 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by getPosMomCov(), and GFTrack::getPosMomCov().
|
inline |
Definition at line 222 of file GFAbsTrackRep.h.
References getPosMomCov().
|
inline |
returns chi2/ndf
Definition at line 248 of file GFAbsTrackRep.h.
References getChiSqu(), and getNDF().
Referenced by GFTrack::getRedChiSqu().
|
inline |
Definition at line 295 of file GFAbsTrackRep.h.
References fRefPlane.
Referenced by GFKalman::processHit(), and GFKalman::processTrack().
|
inline |
Definition at line 195 of file GFAbsTrackRep.h.
References fState.
Referenced by GFTrack::fillGeoTrack(), GFTrack::getResiduals(), GFKalman::processHit(), and GFKalman::processTrack().
|
inline |
Definition at line 202 of file GFAbsTrackRep.h.
References fState.
|
inline |
Definition at line 318 of file GFAbsTrackRep.h.
References fStatusFlag.
Referenced by GFTrack::blowUpCovs(), PndHypMicroWriter::Exec(), PndHypMicroIdealWriter::Exec(), PndHypDKalmanTask::Exec(), GFKalman::fittingPass(), for(), and GFDaf::processTrack().
|
inlinevirtual |
See if the track representation has auxillary information stored.
See if auxillary information is stored in the track representation. See the documentation of GFAbsTrackRep::getAuxInfo() for details.
Reimplemented in RKTrackRep.
Definition at line 329 of file GFAbsTrackRep.h.
Referenced by GFDaf::copySmoothing(), GFTools::getBiasedSmoothedData(), GFTools::getSmoothedData(), GFKalman::processHit(), and GFKalman::processTrack().
|
virtual |
Definition at line 97 of file GFAbsTrackRep.cxx.
References fChiSqu, fCov, fRefPlane, fState, and GFDetPlane::Print().
Referenced by PndLmdBPRungeKuttaTask::Exec(), PndHypDKalmanTask::Exec(), and GFTrack::Print().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
|
virtual |
Definition at line 84 of file GFAbsTrackRep.cxx.
References fCov, fFirstCov, fFirstState, fLastCov, fLastState, fRefPlane, fState, and GFDetPlane::set().
|
inline |
|
inline |
|
inlinevirtual |
Puts the track representation in a given state.
This is used to update the track representation after the update of the Kalman filter was calculated.
IMPORTANT: One should be able to set the track representation to arbitraty values using this method. If the track representation needs additional information beside the state vector, the plane and the covariance, it has to be handed over via the "aux" Matrix. GFAbsTrackRep::getAuxInfo() should return the appropriate information. This is mandatory if smoothing is used.
Reimplemented in RKTrackRep.
Definition at line 267 of file GFAbsTrackRep.h.
Referenced by extrapolate(), GFTools::getBiasedSmoothedData(), GFTools::getSmoothedData(), GFKalman::processHit(), and RKTrackRep::setData().
|
inline |
Definition at line 279 of file GFAbsTrackRep.h.
|
inline |
Definition at line 282 of file GFAbsTrackRep.h.
|
inline |
Definition at line 276 of file GFAbsTrackRep.h.
|
inline |
Deprecated. Should be removed soon.
Definition at line 316 of file GFAbsTrackRep.h.
References f.
|
inline |
Definition at line 288 of file GFAbsTrackRep.h.
|
inline |
Definition at line 291 of file GFAbsTrackRep.h.
|
inline |
Definition at line 285 of file GFAbsTrackRep.h.
|
inline |
Definition at line 300 of file GFAbsTrackRep.h.
References n.
Referenced by GFKalman::fittingPass().
|
inline |
Definition at line 309 of file GFAbsTrackRep.h.
Referenced by GFKalman::fittingPass(), and GFDaf::processTrack().
|
virtual |
make step of h cm along the track
There is an emply implementation in GFAbsTrackRep.cxx which will abort (see one of the extrapolate methods above). This can be overwritten, if this feature is needed.
Reimplemented in RKTrackRep.
Definition at line 71 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by trackProximity().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GFKalman::switchDirection().
|
protected |
chiSqu of the track fit
Definition at line 94 of file GFAbsTrackRep.h.
Referenced by getChiSqu(), and Print().
|
protected |
The covariance matrix.
Definition at line 91 of file GFAbsTrackRep.h.
Referenced by GeaneTrackRep::extrapolate(), RKTrackRep::extrapolate(), GeaneTrackRep::extrapolateToLine(), GeaneTrackRep::extrapolateToPoint(), GeaneTrackRep::GeaneTrackRep(), getCov(), getCovElem(), GeaneTrackRep::getPocaOnLine(), GeaneTrackRep::getPosMomCov(), RKTrackRep::getPosMomCov(), Print(), reset(), and RKTrackRep::RKTrackRep().
|
protected |
Dimensionality of track representation.
Definition at line 85 of file GFAbsTrackRep.h.
Referenced by GeaneTrackRep::extrapolate(), extrapolate(), and getDim().
|
protected |
Definition at line 104 of file GFAbsTrackRep.h.
Referenced by getFirstCov(), and reset().
|
protected |
Definition at line 108 of file GFAbsTrackRep.h.
Referenced by getFirstPlane().
|
protected |
state, cov and plane for first and last point in fit
Definition at line 103 of file GFAbsTrackRep.h.
Referenced by getFirstState(), and reset().
|
protected |
specifies the direction of flight of the particle
Definition at line 100 of file GFAbsTrackRep.h.
|
protected |
Definition at line 107 of file GFAbsTrackRep.h.
Referenced by getLastCov(), and reset().
|
protected |
Definition at line 109 of file GFAbsTrackRep.h.
Referenced by getLastPlane().
|
protected |
Definition at line 106 of file GFAbsTrackRep.h.
Referenced by getLastState(), and reset().
|
protected |
Definition at line 95 of file GFAbsTrackRep.h.
|
protected |
Definition at line 112 of file GFAbsTrackRep.h.
Referenced by GeaneTrackRep::extrapolate(), RKTrackRep::extrapolate(), GeaneTrackRep::extrapolateToLine(), RKTrackRep::extrapolateToLine(), GeaneTrackRep::extrapolateToPoint(), RKTrackRep::extrapolateToPoint(), GeaneTrackRep::GeaneTrackRep(), GeaneTrackRep::getMom(), RKTrackRep::getMom(), GeaneTrackRep::getPocaOnLine(), GeaneTrackRep::getPos(), RKTrackRep::getPos(), GeaneTrackRep::getPosMom(), RKTrackRep::getPosMom(), GeaneTrackRep::getPosMomCov(), RKTrackRep::getPosMomCov(), getReferencePlane(), Print(), reset(), RKTrackRep::RKTrackRep(), and RKTrackRep::stepalong().
|
protected |
The vector of track parameters.
Definition at line 88 of file GFAbsTrackRep.h.
Referenced by GeaneTrackRep::checkState(), GeaneTrackRep::extrapolate(), RKTrackRep::extrapolate(), GeaneTrackRep::extrapolateToLine(), RKTrackRep::extrapolateToLine(), GeaneTrackRep::extrapolateToPoint(), RKTrackRep::extrapolateToPoint(), GeaneTrackRep::GeaneTrackRep(), GeaneTrackRep::getCharge(), GeaneTrackRep::getMom(), RKTrackRep::getMom(), GeaneTrackRep::getPocaOnLine(), GeaneTrackRep::getPos(), RKTrackRep::getPos(), GeaneTrackRep::getPosMom(), RKTrackRep::getPosMom(), GeaneTrackRep::getPosMomCov(), RKTrackRep::getPosMomCov(), getState(), getStateElem(), Print(), reset(), RKTrackRep::RKTrackRep(), RKTrackRep::setData(), and RKTrackRep::stepalong().
|
protected |
status of track representation: 0 means everything's OK
Definition at line 98 of file GFAbsTrackRep.h.
Referenced by getStatusFlag().