LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
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_t > &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 void | stepalong (double h) |
make step of h cm along the track More... | |
virtual double | extrapolate (const GFDetPlane &plane, TMatrixT< Double_t > &statePred, TMatrixT< Double_t > &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 (std::ostream &out=std::cout) const |
const TMatrixT< Double_t > & | getState () const |
const TMatrixT< Double_t > & | 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_t > &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_t > &c) |
TMatrixT< Double_t > | getFirstState () const |
TMatrixT< Double_t > | getFirstCov () const |
GFDetPlane | getFirstPlane () const |
TMatrixT< Double_t > | getLastState () const |
TMatrixT< Double_t > | 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_t > &st, const GFDetPlane &pl, const TMatrixT< Double_t > *cov=NULL) |
void | setCov (const TMatrixT< Double_t > &aCov) |
void | setFirstState (const TMatrixT< Double_t > &aState) |
void | setFirstCov (const TMatrixT< Double_t > &aCov) |
void | setFirstPlane (const GFDetPlane &aPlane) |
void | setLastState (const TMatrixT< Double_t > &aState) |
void | setLastCov (const TMatrixT< Double_t > &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 () |
Protected Attributes | |
unsigned int | fDimension |
Dimensionality of track representation. More... | |
TMatrixT< Double_t > | fState |
The vector of track parameters. More... | |
TMatrixT< Double_t > | 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_t > | fFirstState |
state, cov and plane for first and last point in fit More... | |
TMatrixT< Double_t > | fFirstCov |
TMatrixT< Double_t > | fLastState |
TMatrixT< Double_t > | fLastCov |
GFDetPlane | fFirstPlane |
GFDetPlane | fLastPlane |
GFDetPlane | fRefPlane |
Private Member Functions | |
void | Abort (std::string method) |
virtual void | Print (Option_t *) const |
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 85 of file GFAbsTrackRep.h.
genf::GFAbsTrackRep::GFAbsTrackRep | ( | ) |
Definition at line 23 of file GFAbsTrackRep.cxx.
genf::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.
References GFException::setFatal().
Referenced by extrapolateToLine(), extrapolateToPoint(), getPosMomCov(), getStatusFlag(), and stepalong().
|
inline |
|
inline |
Definition at line 296 of file GFAbsTrackRep.h.
References n.
Referenced by genf::GFKalman::processHit().
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Referenced by genf::GFTrack::operator=().
|
virtual |
returns the tracklength spanned in this extrapolation
Reimplemented in genf::RKTrackRep, and genf::GeaneTrackRep2.
Definition at line 42 of file GFAbsTrackRep.cxx.
References fDimension.
Referenced by extrapolate(), genf::GFKalman::getChi2Hit(), genf::GFTrack::getResiduals(), genf::GFKalman::processHit(), and genf::GFDaf::processTrack().
|
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 genf::RKTrackRep, and genf::GeaneTrackRep2.
double genf::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 genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Definition at line 62 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by genf::GFWireHitPolicy::detPlane(), and genf::GFWirepointHitPolicy::detPlane().
|
virtual |
This method is to extrapolate the track to point of closest approach to a point in space.
Reimplemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Definition at line 56 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by genf::GFSpacepointHitPolicy::detPlane().
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Referenced by genf::GFTrack::getCharge(), and getCovElem().
|
inline |
Definition at line 245 of file GFAbsTrackRep.h.
References fChiSqu.
Referenced by genf::GFTrack::getChiSqu(), getRedChiSqu(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
inline |
Definition at line 199 of file GFAbsTrackRep.h.
References fCov.
Referenced by genf::GFDaf::blowUpCovs(), genf::GFKalman::blowUpCovs(), genf::GFKalman::blowUpCovsDiag(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::GFKalman::processTrack(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
inline |
Definition at line 202 of file GFAbsTrackRep.h.
References fCov, getCharge(), getMom(), getPos(), getPosMom(), and getPosMomCov().
|
inline |
returns dimension of state vector
Definition at line 194 of file GFAbsTrackRep.h.
References fDimension, and Print().
Referenced by genf::GFKalman::getChi2Hit(), getNDF(), genf::GFTrack::getResiduals(), genf::GFKalman::processHit(), and genf::GFDaf::processTrack().
|
inline |
|
inline |
|
inline |
Definition at line 227 of file GFAbsTrackRep.h.
References fFirstState.
|
inline |
|
inline |
Definition at line 242 of file GFAbsTrackRep.h.
References fLastPlane.
Referenced by trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
inline |
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Referenced by genf::GFTrack::getMom(), and trkf::Track3DKalmanSPS::produce().
|
inline |
Definition at line 221 of file GFAbsTrackRep.h.
References getMom().
Referenced by genf::GeaneTrackRep2::extrapolate(), genf::GeaneTrackRep2::extrapolateToLine(), genf::GeaneTrackRep2::extrapolateToPoint(), getCovElem(), getMom(), genf::SlTrackRep::getPosMom(), genf::GeaneTrackRep2::prototype(), genf::RKTrackRep::prototype(), and genf::SlTrackRep::setReferencePlane().
|
inline |
Definition at line 253 of file GFAbsTrackRep.h.
References getDim().
Referenced by genf::GFTrack::getNDF(), getRedChiSqu(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Referenced by genf::GFTrack::fillGeoTrack(), and genf::GFTrack::getPos().
|
inline |
Definition at line 220 of file GFAbsTrackRep.h.
References getPos().
Referenced by genf::GeaneTrackRep2::extrapolateToLine(), genf::GeaneTrackRep2::extrapolateToPoint(), getCovElem(), getPos(), genf::SlTrackRep::getPosMom(), genf::GeaneTrackRep2::prototype(), genf::RKTrackRep::prototype(), and genf::SlTrackRep::setReferencePlane().
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
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 genf::GeaneTrackRep2.
Definition at line 75 of file GFAbsTrackRep.cxx.
References Abort().
Referenced by getCovElem(), getPosMomCov(), and genf::GFTrack::getPosMomCov().
|
inline |
Definition at line 223 of file GFAbsTrackRep.h.
References getPosMomCov().
|
inline |
returns chi2/ndf
Definition at line 249 of file GFAbsTrackRep.h.
References getChiSqu(), and getNDF().
Referenced by genf::GFTrack::getRedChiSqu().
|
inline |
Definition at line 285 of file GFAbsTrackRep.h.
References fRefPlane.
Referenced by genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::GFKalman::processTrack(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
inline |
Definition at line 198 of file GFAbsTrackRep.h.
References fState.
Referenced by genf::GFTrack::fillGeoTrack(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::GFKalman::processTrack(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
inline |
Definition at line 201 of file GFAbsTrackRep.h.
References fState.
|
inline |
Definition at line 308 of file GFAbsTrackRep.h.
References Abort(), fStatusFlag, and reset().
Referenced by genf::GFDaf::blowUpCovs(), genf::GFKalman::blowUpCovs(), genf::GFKalman::blowUpCovsDiag(), genf::GFKalman::fittingPass(), genf::GFDaf::processTrack(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().
|
virtual |
Definition at line 93 of file GFAbsTrackRep.cxx.
References fChiSqu, fCov, fRefPlane, fState, genf::GFDetPlane::Print(), and genf::PrintROOTmatrix().
Referenced by getDim(), and genf::GFTrack::Print().
|
inlineprivatevirtual |
Definition at line 317 of file GFAbsTrackRep.h.
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
|
virtual |
Definition at line 80 of file GFAbsTrackRep.cxx.
References fCov, fFirstCov, fFirstState, fLastCov, fLastState, fRefPlane, fState, and genf::GFDetPlane::set().
Referenced by getStatusFlag().
|
inline |
|
inline |
Definition at line 263 of file GFAbsTrackRep.h.
Referenced by genf::GFDaf::blowUpCovs(), genf::GFKalman::blowUpCovs(), and genf::GFKalman::blowUpCovsDiag().
|
inlinevirtual |
Definition at line 258 of file GFAbsTrackRep.h.
Referenced by extrapolate(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::RKTrackRep::setData(), and genf::RKTrackRep::switchDirection().
|
inline |
Definition at line 269 of file GFAbsTrackRep.h.
|
inline |
Definition at line 272 of file GFAbsTrackRep.h.
|
inline |
Definition at line 266 of file GFAbsTrackRep.h.
|
inline |
Deprecated. Should be removed soon.
Definition at line 306 of file GFAbsTrackRep.h.
References f.
|
inline |
Definition at line 278 of file GFAbsTrackRep.h.
|
inline |
Definition at line 281 of file GFAbsTrackRep.h.
|
inline |
Definition at line 275 of file GFAbsTrackRep.h.
|
inline |
Definition at line 290 of file GFAbsTrackRep.h.
References n.
Referenced by genf::GFKalman::fittingPass().
|
inline |
Definition at line 299 of file GFAbsTrackRep.h.
References switchDirection().
Referenced by genf::GFKalman::fittingPass(), and genf::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.
Definition at line 71 of file GFAbsTrackRep.cxx.
References Abort().
|
pure virtual |
Implemented in genf::RKTrackRep, genf::GeaneTrackRep2, and genf::SlTrackRep.
Referenced by setStatusFlag(), and genf::GFKalman::switchDirection().
|
protected |
chiSqu of the track fit
Definition at line 99 of file GFAbsTrackRep.h.
Referenced by getChiSqu(), and Print().
|
protected |
The covariance matrix.
Definition at line 96 of file GFAbsTrackRep.h.
Referenced by genf::SlTrackRep::extrapolate(), genf::GeaneTrackRep2::extrapolate(), genf::RKTrackRep::extrapolate(), genf::GeaneTrackRep2::extrapolateToLine(), genf::GeaneTrackRep2::extrapolateToPoint(), genf::GeaneTrackRep2::GeaneTrackRep2(), getCov(), getCovElem(), Print(), genf::RKTrackRep::rescaleCovOffDiags(), reset(), genf::RKTrackRep::RKTrackRep(), and genf::SlTrackRep::SlTrackRep().
|
protected |
Dimensionality of track representation.
Definition at line 90 of file GFAbsTrackRep.h.
Referenced by genf::SlTrackRep::extrapolate(), genf::GeaneTrackRep2::extrapolate(), extrapolate(), and getDim().
|
protected |
Definition at line 109 of file GFAbsTrackRep.h.
Referenced by getFirstCov(), and reset().
|
protected |
Definition at line 113 of file GFAbsTrackRep.h.
Referenced by getFirstPlane().
|
protected |
state, cov and plane for first and last point in fit
Definition at line 108 of file GFAbsTrackRep.h.
Referenced by getFirstState(), and reset().
|
protected |
specifies the direction of flight of the particle
Definition at line 105 of file GFAbsTrackRep.h.
|
protected |
Definition at line 112 of file GFAbsTrackRep.h.
Referenced by getLastCov(), and reset().
|
protected |
Definition at line 114 of file GFAbsTrackRep.h.
Referenced by getLastPlane().
|
protected |
Definition at line 111 of file GFAbsTrackRep.h.
Referenced by getLastState(), genf::RKTrackRep::getMomLast(), and reset().
|
protected |
Definition at line 100 of file GFAbsTrackRep.h.
|
protected |
Definition at line 117 of file GFAbsTrackRep.h.
Referenced by genf::SlTrackRep::extrapolate(), genf::GeaneTrackRep2::extrapolate(), genf::RKTrackRep::extrapolate(), genf::SlTrackRep::extrapolateToLine(), genf::GeaneTrackRep2::extrapolateToLine(), genf::RKTrackRep::extrapolateToLine(), genf::SlTrackRep::extrapolateToPoint(), genf::GeaneTrackRep2::extrapolateToPoint(), genf::RKTrackRep::extrapolateToPoint(), genf::GeaneTrackRep2::GeaneTrackRep2(), genf::SlTrackRep::getMom(), genf::GeaneTrackRep2::getMom(), genf::RKTrackRep::getMom(), genf::SlTrackRep::getPos(), genf::GeaneTrackRep2::getPos(), genf::RKTrackRep::getPos(), genf::GeaneTrackRep2::getPosMom(), genf::RKTrackRep::getPosMom(), getReferencePlane(), Print(), reset(), genf::RKTrackRep::RKTrackRep(), and genf::SlTrackRep::setReferencePlane().
|
protected |
The vector of track parameters.
Definition at line 93 of file GFAbsTrackRep.h.
Referenced by genf::SlTrackRep::extrapolate(), genf::GeaneTrackRep2::extrapolate(), genf::RKTrackRep::extrapolate(), genf::SlTrackRep::extrapolateToLine(), genf::RKTrackRep::extrapolateToLine(), genf::SlTrackRep::extrapolateToPoint(), genf::RKTrackRep::extrapolateToPoint(), genf::GeaneTrackRep2::GeaneTrackRep2(), genf::SlTrackRep::getMom(), genf::GeaneTrackRep2::getMom(), genf::RKTrackRep::getMom(), genf::SlTrackRep::getPos(), genf::GeaneTrackRep2::getPos(), genf::RKTrackRep::getPos(), genf::GeaneTrackRep2::getPosMom(), genf::RKTrackRep::getPosMom(), getState(), getStateElem(), Print(), reset(), genf::RKTrackRep::RKTrackRep(), genf::RKTrackRep::setData(), and genf::SlTrackRep::SlTrackRep().
|
protected |
status of track representation: 0 means everything's OK
Definition at line 103 of file GFAbsTrackRep.h.
Referenced by getStatusFlag().