FairRoot/PandaRoot
|
Namespace for various tools, mainly smoothing. More...
Functions | |
TMatrixT< double > | getSmoothedPos (GFTrack *trk, unsigned int irep, unsigned int ihit) |
Get smoothed track position in plane coordinates. More... | |
TMatrixT< double > | getSmoothedCov (GFTrack *trk, unsigned int irep, unsigned int ihit) |
Get smoothed track covariance in plane coordinates. More... | |
bool | getSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov) |
Get smoothed state vector and state covariance. More... | |
bool | getSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov, GFDetPlane &smoothing_plane) |
Get smoothed state vector, state covariance and smoothing plane. More... | |
bool | getSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov, GFDetPlane &smoothing_plane, TMatrixT< double > &auxInfo) |
Get smoothed state vector, state covariance and smoothing plane. More... | |
GFDetPlane | getSmoothingPlane (GFTrack *trk, unsigned int irep, unsigned int ihit) |
Get smoothing plane. More... | |
bool | getBiasedSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov) |
Get biased smoothed state vector and state covariance. More... | |
bool | getBiasedSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov, GFDetPlane &smoothing_plane) |
Get biased smoothed state vector, state covariance and smoothing plane. More... | |
bool | getBiasedSmoothedData (GFTrack *trk, unsigned int irep, unsigned int ihit, TMatrixT< double > &smoothed_state, TMatrixT< double > &smoothed_cov, GFDetPlane &smoothing_plane, TMatrixT< double > &auxInfo) |
Get biased smoothed state vector, state covariance and smoothing plane. More... | |
TMatrixT< double > | getBiasedSmoothedPos (GFTrack *trk, unsigned int irep, unsigned int ihit) |
Get biased smoothed track position in plane coordinates. More... | |
TMatrixT< double > | getBiasedSmoothedCov (GFTrack *trk, unsigned int irep, unsigned int ihit) |
Get biased smoothed track covariance in plane coordinates. More... | |
void | invertMatrix (const TMatrixT< double > &mat, TMatrixT< double > &inv) |
Invert a matrix, throwing GFException when inversion fails. More... | |
double | getSmoothedChiSqu (GFTrack *const trk, unsigned int irep, unsigned int ihit) |
Get smoothed chi2 for a specific hit (ihit). More... | |
Namespace for various tools, mainly smoothing.
The GFTools namespace contains various functions, most of which er intended to be used with the smoothing feature of the Kalman filter. These functions allow to extract the smoothed information for any track which was fitted with smoothing enabled.
TMatrixT< double > GFTools::getBiasedSmoothedCov | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get biased smoothed track covariance in plane coordinates.
Definition at line 57 of file GFTools.cxx.
References getBiasedSmoothedData(), GFTrack::getHit(), GFAbsRecoHit::getHMatrix(), and GFTrack::getTrackRep().
bool GFTools::getBiasedSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov | ||
) |
Get biased smoothed state vector and state covariance.
Definition at line 81 of file GFTools.cxx.
Referenced by getBiasedSmoothedCov(), getBiasedSmoothedData(), getBiasedSmoothedPos(), and getSmoothedChiSqu().
bool GFTools::getBiasedSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov, | ||
GFDetPlane & | smoothing_plane | ||
) |
Get biased smoothed state vector, state covariance and smoothing plane.
The smoothed data returned by this function includes the detector plane in which the data is calculated.
Definition at line 96 of file GFTools.cxx.
References getBiasedSmoothedData().
bool GFTools::getBiasedSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov, | ||
GFDetPlane & | smoothing_plane, | ||
TMatrixT< double > & | auxInfo | ||
) |
Get biased smoothed state vector, state covariance and smoothing plane.
The smoothed data returned by this function includes the detector plane in which the data is calculated as well as the auxillary information for this plane.
Definition at line 216 of file GFTools.cxx.
References GFAbsTrackRep::clone(), GFAbsTrackRep::extrapolate(), GFTrack::getBK(), GFBookkeeping::getDetPlane(), GFBookkeeping::getMatrix(), GFTrack::getNumHits(), GFTrack::getSmoothing(), GFTrack::getTrackRep(), GFAbsTrackRep::hasAuxInfo(), invertMatrix(), and GFAbsTrackRep::setData().
TMatrixT< double > GFTools::getBiasedSmoothedPos | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get biased smoothed track position in plane coordinates.
Definition at line 22 of file GFTools.cxx.
References getBiasedSmoothedData(), GFTrack::getHit(), GFAbsRecoHit::getHMatrix(), GFTrack::getTrackRep(), and pos.
double GFTools::getSmoothedChiSqu | ( | GFTrack *const | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get smoothed chi2 for a specific hit (ihit).
This function calculates a smoothed chi2 value for a specific hit from the the so called "biased" smoothed state vector and covariance matrix. If many values from different tracks in the same layer are calculated they should be chi2 distributed with dim(m) degree of freedom, where m is the measurement vector of the hit. So for a pixel detector that measures x and y dim(m) will be 2.
Definition at line 358 of file GFTools.cxx.
References getBiasedSmoothedData(), GFTrack::getHit(), GFAbsRecoHit::getHMatrix(), GFAbsRecoHit::getRawHitCoord(), GFAbsRecoHit::getRawHitCov(), GFTrack::getTrackRep(), invertMatrix(), m, pos, R, and res.
TMatrixT< double > GFTools::getSmoothedCov | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get smoothed track covariance in plane coordinates.
Definition at line 41 of file GFTools.cxx.
References GFTrack::getHit(), GFAbsRecoHit::getHMatrix(), getSmoothedData(), and GFTrack::getTrackRep().
bool GFTools::getSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov | ||
) |
Get smoothed state vector and state covariance.
Definition at line 73 of file GFTools.cxx.
Referenced by getSmoothedCov(), getSmoothedData(), and getSmoothedPos().
bool GFTools::getSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov, | ||
GFDetPlane & | smoothing_plane | ||
) |
Get smoothed state vector, state covariance and smoothing plane.
The smoothed data returned by this function includes the detector plane in which the data is calculated.
Definition at line 89 of file GFTools.cxx.
References getSmoothedData().
bool GFTools::getSmoothedData | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit, | ||
TMatrixT< double > & | smoothed_state, | ||
TMatrixT< double > & | smoothed_cov, | ||
GFDetPlane & | smoothing_plane, | ||
TMatrixT< double > & | auxInfo | ||
) |
Get smoothed state vector, state covariance and smoothing plane.
The smoothed data returned by this function includes the detector plane in which the data is calculated as well as the auxillary information for this plane. The smoothed covariance matrix at hit i is:
\[ C_{k,\mbox{smooth}} = (C_{k,k-1,\rightarrow}^{-1}+C_{k,k+1,\leftarrow}^{-1})^{-1}. \\ \]
The smoothed state vector at hit i is:
\[ x_{k,\mbox{smooth}} = C_{k,\mbox{smooth}} \cdot ((C_{k,k-1,\rightarrow}^{-1}\cdot x_{k,k-1,\rightarrow} + C_{k,k+1,\leftarrow}^{-1}\cdot x_{k,k+1,\leftarrow}) \]
The index k,k-1 denotes that the state vector or covariance matrix contains the information of all hits 1,2,....,k-1 and is extrapolated to hit k. The arrow pointing to the right indicates that the information is saved during the forward fit. The index k,k+1 indicates the the state vector or covariance matrix contains the information of all hits N,N-1,...,k+1 and is extrapolated to hit k. The left-poiting arrow indicates that the information is saved during the backward fit.
Definition at line 103 of file GFTools.cxx.
References GFAbsTrackRep::clone(), GFAbsTrackRep::extrapolate(), GFTrack::getBK(), GFBookkeeping::getDetPlane(), GFBookkeeping::getMatrix(), GFTrack::getNumHits(), GFTrack::getSmoothing(), GFTrack::getTrackRep(), GFAbsTrackRep::hasAuxInfo(), invertMatrix(), and GFAbsTrackRep::setData().
TMatrixT< double > GFTools::getSmoothedPos | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get smoothed track position in plane coordinates.
Definition at line 4 of file GFTools.cxx.
References GFTrack::getHit(), GFAbsRecoHit::getHMatrix(), getSmoothedData(), GFTrack::getTrackRep(), and pos.
Referenced by GFDaf::calcWeights().
GFDetPlane GFTools::getSmoothingPlane | ( | GFTrack * | trk, |
unsigned int | irep, | ||
unsigned int | ihit | ||
) |
Get smoothing plane.
Definition at line 299 of file GFTools.cxx.
References GFTrack::getBK(), and GFBookkeeping::getDetPlane().
void GFTools::invertMatrix | ( | const TMatrixT< double > & | mat, |
TMatrixT< double > & | inv | ||
) |
Invert a matrix, throwing GFException when inversion fails.
Definition at line 334 of file GFTools.cxx.
References GFException::setFatal(), and status.
Referenced by GFKalman::calcGain(), GFDaf::calcWeights(), GFKalman::chi2Increment(), getBiasedSmoothedData(), GFDafHit::getHitCov(), getSmoothedChiSqu(), and getSmoothedData().