![]() |
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=nullptr, const TMatrixT< double > *aux=nullptr) |
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 |
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 | ( | ) |
GFAbsTrackRep::GFAbsTrackRep | ( | int | ) |
|
virtual |
|
inline |
Definition at line 263 of file GFAbsTrackRep.h.
|
inline |
Definition at line 264 of file GFAbsTrackRep.h.
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
|
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.
|
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.
|
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.
|
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.
|
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 296 of file GFAbsTrackRep.h.
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GFTrack::getCharge(), and getCovElem().
|
inline |
Definition at line 208 of file GFAbsTrackRep.h.
References fChiSqu.
Referenced by GFTrack::getChiSqu(), and getRedChiSqu().
|
inline |
|
inline |
Definition at line 183 of file GFAbsTrackRep.h.
References fCov, getCharge(), getMom(), getPos(), getPosMom(), and getPosMomCov().
|
inline |
returns dimension of state vector
Definition at line 175 of file GFAbsTrackRep.h.
References fDimension, and Print().
Referenced by getNDF().
|
inline |
|
inline |
|
inline |
Definition at line 202 of file GFAbsTrackRep.h.
References fFirstState.
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GFTrack::getMom().
|
inline |
Definition at line 199 of file GFAbsTrackRep.h.
References getMom().
Referenced by getCovElem(), getMom(), GeaneTrackRep::prototype(), and RKTrackRep::prototype().
|
inline |
Definition at line 216 of file GFAbsTrackRep.h.
References getDim().
Referenced by GFTrack::getNDF(), and getRedChiSqu().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by GFTrack::getPos().
|
inline |
Definition at line 198 of file GFAbsTrackRep.h.
References getPos().
Referenced by getCovElem(), getPos(), GeaneTrackRep::prototype(), and RKTrackRep::prototype().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by getCovElem().
|
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.
Referenced by getCovElem(), and GFTrack::getPosMomCov().
|
inline |
Definition at line 200 of file GFAbsTrackRep.h.
References getPosMomCov().
Referenced by getPosMomCov().
|
inline |
returns chi2/ndf
Definition at line 210 of file GFAbsTrackRep.h.
References getChiSqu(), and getNDF().
Referenced by GFTrack::getRedChiSqu().
|
inline |
|
inline |
Definition at line 179 of file GFAbsTrackRep.h.
References fState.
|
inline |
Definition at line 182 of file GFAbsTrackRep.h.
References fState.
|
inline |
Definition at line 276 of file GFAbsTrackRep.h.
References fStatusFlag, and reset().
|
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 285 of file GFAbsTrackRep.h.
|
virtual |
Referenced by getDim().
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
|
virtual |
Referenced by getStatusFlag().
|
inline |
Definition at line 261 of file GFAbsTrackRep.h.
|
inline |
Definition at line 243 of file GFAbsTrackRep.h.
|
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 233 of file GFAbsTrackRep.h.
|
inline |
Definition at line 245 of file GFAbsTrackRep.h.
|
inline |
Definition at line 246 of file GFAbsTrackRep.h.
|
inline |
Definition at line 244 of file GFAbsTrackRep.h.
|
inline |
Deprecated. Should be removed soon.
Definition at line 270 of file GFAbsTrackRep.h.
References f.
|
inline |
Definition at line 252 of file GFAbsTrackRep.h.
|
inline |
Definition at line 253 of file GFAbsTrackRep.h.
|
inline |
Definition at line 251 of file GFAbsTrackRep.h.
|
inline |
Definition at line 262 of file GFAbsTrackRep.h.
|
inline |
Definition at line 265 of file GFAbsTrackRep.h.
References switchDirection().
|
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.
|
pure virtual |
Implemented in RKTrackRep, and GeaneTrackRep.
Referenced by setStatusFlag().
|
protected |
|
protected |
The covariance matrix.
Definition at line 91 of file GFAbsTrackRep.h.
Referenced by getCov(), and getCovElem().
|
protected |
Dimensionality of track representation.
Definition at line 85 of file GFAbsTrackRep.h.
Referenced by getDim().
|
protected |
Definition at line 104 of file GFAbsTrackRep.h.
Referenced by getFirstCov().
|
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().
|
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().
|
protected |
Definition at line 109 of file GFAbsTrackRep.h.
Referenced by getLastPlane().
|
protected |
Definition at line 106 of file GFAbsTrackRep.h.
Referenced by getLastState().
|
protected |
Definition at line 95 of file GFAbsTrackRep.h.
|
protected |
Definition at line 112 of file GFAbsTrackRep.h.
Referenced by getReferencePlane().
|
protected |
The vector of track parameters.
Definition at line 88 of file GFAbsTrackRep.h.
Referenced by GeaneTrackRep::getCharge(), getState(), and getStateElem().
|
protected |
status of track representation: 0 means everything's OK
Definition at line 98 of file GFAbsTrackRep.h.
Referenced by getStatusFlag().