#include <RKTrackRep.h>
Public Member Functions | |
RKTrackRep () | |
RKTrackRep (const TVector3 &pos, const TVector3 &mom, const TVector3 &poserr, const TVector3 &momerr, const int &PDGCode) | |
RKTrackRep (const GFTrackCand *aGFTrackCandPtr) | |
RKTrackRep (const TVector3 &pos, const TVector3 &mom, const int &PDGCode) | |
RKTrackRep (const GFDetPlane &pl, const TVector3 &mom, const int &PDGCode) | |
virtual | ~RKTrackRep () |
virtual GFAbsTrackRep * | clone () const |
virtual GFAbsTrackRep * | prototype () const |
double | extrapolate (const GFDetPlane &, TMatrixT< Double_t > &statePred, TMatrixT< Double_t > &covPred) |
returns the tracklength spanned in this extrapolation More... | |
double | extrapolate (const GFDetPlane &, TMatrixT< Double_t > &statePred) |
returns the tracklength spanned in this extrapolation More... | |
void | extrapolateToPoint (const TVector3 &pos, TVector3 &poca, TVector3 &dirInPoca) |
This method is to extrapolate the track to point of closest approach to a point in space. More... | |
void | extrapolateToLine (const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &dirInPoca, TVector3 &poca_onwire) |
This method extrapolates to the point of closest approach to a line. More... | |
TVector3 | getPos (const GFDetPlane &) |
Returns position of the track in the plane. More... | |
TVector3 | getMom (const GFDetPlane &) |
Returns momentum of the track in the plane. More... | |
TVector3 | getMomLast (const GFDetPlane &) |
void | getPosMom (const GFDetPlane &, TVector3 &pos, TVector3 &mom) |
Gets position and momentum in the plane by exrapolating or not. More... | |
double | getCharge () const |
Returns charge. More... | |
void | switchDirection () |
deprecated More... | |
void | setPDG (int) |
Set PDG particle code. More... | |
int | getPDG () |
void | rescaleCovOffDiags () |
void | setData (const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=NULL, const TMatrixT< double > *aux=NULL) |
Sets state, plane and (optionally) covariance. More... | |
const TMatrixT< double > * | getAuxInfo (const GFDetPlane &pl) |
bool | hasAuxInfo () |
Public Member Functions inherited from genf::GFAbsTrackRep | |
GFAbsTrackRep () | |
GFAbsTrackRep (int) | |
virtual | ~GFAbsTrackRep () |
virtual void | stepalong (double h) |
make step of h cm along the track 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 void | getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov) |
method which gets position, momentum and 6x6 covariance matrix More... | |
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) |
bool | setInverted (bool f=true) |
Deprecated. Should be removed soon. More... | |
bool | getStatusFlag () |
virtual void | reset () |
Private Member Functions | |
RKTrackRep & | operator= (const RKTrackRep *) |
RKTrackRep (const RKTrackRep &) | |
bool | RKutta (const GFDetPlane &plane, double *P, double &coveredDistance, std::vector< TVector3 > &points, std::vector< double > &pointLengths, const double &maxLen=-1, bool calcCov=true) const |
Contains all material effects. More... | |
TVector3 | poca2Line (const TVector3 &extr1, const TVector3 &extr2, const TVector3 &point) const |
double | Extrap (const GFDetPlane &plane, TMatrixT< Double_t > *state, TMatrixT< Double_t > *cov=NULL) const |
Handles propagation and material effects. More... | |
Private Attributes | |
GFDetPlane | fCachePlane |
double | fCacheSpu |
double | fSpu |
TMatrixT< double > | fAuxInfo |
bool | fDirection |
int | fPdg |
PDG particle code. More... | |
double | fMass |
Mass (in GeV) More... | |
double | fCharge |
Charge. More... | |
Additional Inherited Members | |
Protected Attributes inherited from genf::GFAbsTrackRep | |
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 |
Definition at line 53 of file RKTrackRep.h.
genf::RKTrackRep::RKTrackRep | ( | ) |
Definition at line 71 of file RKTrackRep.cxx.
genf::RKTrackRep::RKTrackRep | ( | const TVector3 & | pos, |
const TVector3 & | mom, | ||
const TVector3 & | poserr, | ||
const TVector3 & | momerr, | ||
const int & | PDGCode | ||
) |
Definition at line 83 of file RKTrackRep.cxx.
genf::RKTrackRep::RKTrackRep | ( | const GFTrackCand * | aGFTrackCandPtr | ) |
Definition at line 140 of file RKTrackRep.cxx.
genf::RKTrackRep::RKTrackRep | ( | const TVector3 & | pos, |
const TVector3 & | mom, | ||
const int & | PDGCode | ||
) |
Definition at line 191 of file RKTrackRep.cxx.
genf::RKTrackRep::RKTrackRep | ( | const GFDetPlane & | pl, |
const TVector3 & | mom, | ||
const int & | PDGCode | ||
) |
Definition at line 245 of file RKTrackRep.cxx.
|
virtual |
Definition at line 65 of file RKTrackRep.cxx.
|
inlineprivate |
Definition at line 174 of file RKTrackRep.h.
|
inlinevirtual |
|
private |
Handles propagation and material effects.
extrapolate(), extrapolateToPoint() and extrapolateToLine() call this function. Extrap() needs a plane as an argument, hence extrapolateToPoint() and extrapolateToLine() create virtual detector planes. In this function, RKutta() is called and the resulting points and point paths are filtered so that the direction doesn't change and tiny steps are filtered out. After the propagation the material effects in #fEffect are called. Extrap() will loop until the plane is reached, unless the propagation fails or the maximum number of iterations is exceeded.
Definition at line 1058 of file RKTrackRep.cxx.
|
virtual |
returns the tracklength spanned in this extrapolation
The covariance matrix is transformed from the plane coordinate system to the master reference system (for the propagation) and, after propagation, back to the plane coordinate system.
Also the parameter spu (which is +1 or -1 and indicates the direction of the particle) is calculated and stored in fCacheSpu. The plane is stored in fCachePlane.
Master reference system (MARS):
Plane coordinate system:
Jacobians:
with
Implements genf::GFAbsTrackRep.
Definition at line 475 of file RKTrackRep.cxx.
|
virtual |
returns the tracklength spanned in this extrapolation
Reimplemented from genf::GFAbsTrackRep.
Definition at line 601 of file RKTrackRep.cxx.
|
virtual |
This method extrapolates to the point of closest approach to a line.
Reimplemented from genf::GFAbsTrackRep.
Definition at line 424 of file RKTrackRep.cxx.
|
virtual |
This method is to extrapolate the track to point of closest approach to a point in space.
Reimplemented from genf::GFAbsTrackRep.
Definition at line 365 of file RKTrackRep.cxx.
const TMatrixT< double > * genf::RKTrackRep::getAuxInfo | ( | const GFDetPlane & | pl | ) |
Definition at line 55 of file RKTrackRep.cxx.
|
inlinevirtual |
|
virtual |
Returns momentum of the track in the plane.
If #GFDetPlane equals the reference plane fRefPlane, returns current momentum; otherwise it extrapolates the track to the plane and returns the momentum.
Implements genf::GFAbsTrackRep.
Definition at line 323 of file RKTrackRep.cxx.
TVector3 genf::RKTrackRep::getMomLast | ( | const GFDetPlane & | pl | ) |
Definition at line 337 of file RKTrackRep.cxx.
int genf::RKTrackRep::getPDG | ( | ) |
Definition at line 311 of file RKTrackRep.cxx.
|
virtual |
Returns position of the track in the plane.
If #GFDetPlane equals the reference plane fRefPlane, returns current position; otherwise it extrapolates the track to the plane and returns the position.
Implements genf::GFAbsTrackRep.
Definition at line 313 of file RKTrackRep.cxx.
|
virtual |
Gets position and momentum in the plane by exrapolating or not.
If #GFDetPlane equals the reference plane fRefPlane, it gets current position and momentum; otherwise for getMom() it extrapolates the track to the plane and gets the position and momentum. GetMomLast() does no extrapn. EC.
Implements genf::GFAbsTrackRep.
Definition at line 347 of file RKTrackRep.cxx.
|
inline |
Definition at line 163 of file RKTrackRep.h.
|
inlineprivate |
Definition at line 173 of file RKTrackRep.h.
|
private |
Definition at line 411 of file RKTrackRep.cxx.
|
inlinevirtual |
void genf::RKTrackRep::rescaleCovOffDiags | ( | ) |
Definition at line 1222 of file RKTrackRep.cxx.
|
private |
Contains all material effects.
Propagates the particle through the magnetic field. If the propagation is successfull and the plane is reached, the function returns true. The argument P has to contain the state (#P[0] - #P[6]) and a unity matrix (#P[7] - #P[55]) with the last column multiplied wit q/p (hence #P[55] is not 1 but q/p). Propagated state and the jacobian (with the last column multiplied wit q/p) of the extrapolation are written to #P. In the main loop of the Runge Kutta algorithm, the steppers in #fEffect are called and may reduce the estimated stepsize so that a maximum momentum loss will not be exceeded. If this is the case, RKutta() will only propagate the reduced distance and then return. This is to ensure that material effects, which are calculated after the propagation, are taken into account properly.
Definition at line 691 of file RKTrackRep.cxx.
void genf::RKTrackRep::setData | ( | const TMatrixT< double > & | st, |
const GFDetPlane & | pl, | ||
const TMatrixT< double > * | cov = NULL , |
||
const TMatrixT< double > * | aux = NULL |
||
) |
Sets state, plane and (optionally) covariance.
This function also sets the parameter fSpu to the value stored in fCacheSpu. Therefore it has to be ensured that the plane #pl is the same as the plane of the last extrapolation (i.e. fCachePlane), where fCacheSpu was calculated. Hence, if the argument #pl is not equal to fCachePlane, an error message is shown an an exception is thrown.
Definition at line 42 of file RKTrackRep.cxx.
void genf::RKTrackRep::setPDG | ( | int | i | ) |
|
inlinevirtual |
|
private |
Definition at line 170 of file RKTrackRep.h.
|
private |
Definition at line 167 of file RKTrackRep.h.
|
private |
Definition at line 168 of file RKTrackRep.h.
|
private |
Charge.
Definition at line 182 of file RKTrackRep.h.
|
private |
Definition at line 175 of file RKTrackRep.h.
|
private |
Mass (in GeV)
Definition at line 180 of file RKTrackRep.h.
|
private |
PDG particle code.
Definition at line 178 of file RKTrackRep.h.
|
private |
Definition at line 169 of file RKTrackRep.h.