FairRoot/PandaRoot
|
Wrapper class for use with GFDaf. More...
#include <GFDafHit.h>
Public Member Functions | |
GFDafHit () | |
~GFDafHit () | |
GFDafHit (std::vector< GFAbsRecoHit * > HitsInPlane) | |
Constructor adding hits. More... | |
TMatrixT< double > | getHitCoord (const GFDetPlane &pl) |
Get the hit coordinates. More... | |
TMatrixT< double > | getHitCov (const GFDetPlane &pl) |
Get the hit covariance. More... | |
TMatrixT< double > | getHMatrix (const GFAbsTrackRep *rep) |
Get the H matrix. More... | |
GFDafHit * | clone () |
Get clone of this object. More... | |
const GFDetPlane & | getDetPlane (GFAbsTrackRep *rep) |
Get the detector plane. More... | |
void | setWeights (std::vector< double > weights) |
Set the weights. More... | |
void | setBlowUp (double blow_up) |
Set the \(\beta\) blow up factor for the covariance matrices. More... | |
unsigned int | getNumHits () |
Get the number of hits in the GFDafHit. More... | |
GFAbsRecoHit * | getHit (unsigned int ihit) |
Get at hit from the GFDafHit. More... | |
const std::string & | getPolicyName () |
Get the name of the hit policy. More... | |
virtual TMatrixT< double > | residualVector (const GFAbsTrackRep *stateVector, const TMatrixT< double > &state, const GFDetPlane &d) |
Calculate residual with respect to a track representation. More... | |
TMatrixT< double > | getRawHitCov () const |
Get raw hit covariances. More... | |
TMatrixT< double > | getRawHitCoord () const |
Get raw hit coordinates. More... | |
virtual void | Print () |
Print raw hit coordinates. More... | |
int | getNparHit () |
Protected Attributes | |
TMatrixT< double > | fHitCoord |
Vector of raw coordinates of hit. More... | |
TMatrixT< double > | fHitCov |
Covariance of raw hit coordinates. More... | |
Private Attributes | |
bool | fHitCoordUpd |
bool | fHitCovUpd |
GFDetPlane | fPl |
double | fBlow |
std::vector< TMatrixT< double > > | fCovInvs |
std::vector< GFAbsRecoHit * > | fRawHits |
std::vector< double > | fWeights |
Wrapper class for use with GFDaf.
The GFDafHit is a hit class which acts as an effective hit. As the DAF is capable of handling multiple hits in one plane, but GFKalman cannot handle this, the GFDafHit combines all hits in one plane.
Definition at line 40 of file GFDafHit.h.
|
inline |
|
inline |
GFDafHit::GFDafHit | ( | std::vector< GFAbsRecoHit * > | HitsInPlane | ) |
Constructor adding hits.
With this constructor, the GFDafHit is normally initialized. All the hits of the argument should be in one plane.
Definition at line 22 of file GFDafHit.cxx.
References fBlow, fHitCoordUpd, fHitCovUpd, fRawHits, and fWeights.
|
virtual |
Get clone of this object.
Virtual abstract method. Has to be implemented by inherting classes. Creates a deep copy of this object. Ownership is trandsferred to the caller!
Implements GFAbsRecoHit.
Definition at line 135 of file GFDafHit.cxx.
References fBlow, fRawHits, fWeights, GFDafHit(), setBlowUp(), and setWeights().
|
virtual |
Get the detector plane.
Returns the plane as returned by GFDetPlan() of the first hit in the GFDafHit. This is valid because all hits are on the same plane.
Implements GFAbsRecoHit.
Definition at line 54 of file GFDafHit.cxx.
References fRawHits.
GFAbsRecoHit * GFDafHit::getHit | ( | unsigned int | ihit | ) |
Get at hit from the GFDafHit.
Definition at line 32 of file GFDafHit.cxx.
References fRawHits.
Referenced by GFDaf::calcWeights().
|
virtual |
Get the hit coordinates.
Due to the nature of the GFDafHit, the coordinates returned are not necessarily the coordinates of the real hits. There are two cases: if the GFDafHit contains only one hit, then the hit coordinates of this hit are returned. If however, the GFDafHit contains several hits, then the following formula is used to obtain the hit coordinates:
\[ \mathbf{m} = \mathbf{V} \cdot \sum_{i}p_{i}\cdot \mathbf{V}_{i}^{-1}\cdot \mathbf{m}_{i} \]
with \(\mathbf{m_{i}}\) the real hit coordinates, \(\mathbf{V}_{i}\) the real hit covariance and \(p_{i}\) the weights. The sum runs over all real hits in the GFDafHit. \(\mathbf{V}\) is the effective hit covariance as returned by getHitCov(). This calculation is only done, if the plane has changed from the last time gitHitCoord() was called.
Implements GFAbsRecoHit.
Definition at line 60 of file GFDafHit.cxx.
References fCovInvs, GFAbsRecoHit::fHitCoord, fHitCoordUpd, GFAbsRecoHit::fHitCov, fHitCovUpd, fPl, fRawHits, fWeights, getHitCov(), and i.
|
virtual |
Get the hit covariance.
Analog to getHitCoord(), there are two cases: if the GFDafHit contains only one hit, the covariance is calculated like:
\[ \mathbf{V} = \frac{1}{p_{1}}\cdot\beta\cdot\mathbf{V}_{1} \]
with \(\beta\) the blow up factor for the temperature annealing as set in setBlowUp() and the rest of the symbols analog to getHitCoord(). If there are several hits in the GFDafHit, the following formula is used:
\[ \mathbf{V} = \left( \sum_{i} p_{i} \cdot \left( \beta \mathbf{V}_{i}\right)^{-1} \right)^{-1} \]
As before, these calculations are only done if the plane is different from the one getHitCov was last called.
Implements GFAbsRecoHit.
Definition at line 88 of file GFDafHit.cxx.
References fBlow, fCovInvs, GFAbsRecoHit::fHitCoord, GFAbsRecoHit::fHitCov, fHitCovUpd, fPl, fRawHits, fWeights, i, and GFTools::invertMatrix().
Referenced by getHitCoord().
|
virtual |
Get the H matrix.
Returns the H matrix of the first hit in the GFDafHit. This is valid because all hits are on the same plane.
Implements GFAbsRecoHit.
Definition at line 129 of file GFDafHit.cxx.
References fRawHits.
|
inlineinherited |
|
inline |
Get the number of hits in the GFDafHit.
Definition at line 121 of file GFDafHit.h.
References fRawHits.
Referenced by GFDaf::calcWeights(), and GFDaf::copySmoothing().
|
virtual |
Get the name of the hit policy.
Returns the name of the hit policy of the first hit in the GFDafHit. This is valid because if there are several hits, they all have to be planar hits.
Reimplemented from GFAbsRecoHit.
Definition at line 144 of file GFDafHit.cxx.
References fRawHits.
|
inlineinherited |
Get raw hit coordinates.
Definition at line 158 of file GFAbsRecoHit.h.
References GFAbsRecoHit::fHitCoord.
Referenced by GFWirepointHitPolicy::checkPlane(), GFWireHitPolicy::checkPlane(), GFWirepointHitPolicy::detPlane(), GFWireHitPolicy::detPlane(), GFSpacepointHitPolicy::detPlane(), GFTools::getSmoothedChiSqu(), GFWirepointHitPolicy::hitCoord(), GFWireHitPolicy::hitCoord(), GFSpacepointHitPolicy::hitCoord(), and GFPlanarHitPolicy::hitCoord().
|
inlineinherited |
Get raw hit covariances.
Definition at line 153 of file GFAbsRecoHit.h.
References GFAbsRecoHit::fHitCov.
Referenced by GFTools::getSmoothedChiSqu(), GFWirepointHitPolicy::hitCov(), GFWireHitPolicy::hitCov(), GFSpacepointHitPolicy::hitCov(), and GFPlanarHitPolicy::hitCov().
|
inlinevirtualinherited |
Print raw hit coordinates.
Definition at line 207 of file GFAbsRecoHit.h.
References GFAbsRecoHit::fHitCoord.
|
inlinevirtualinherited |
Calculate residual with respect to a track representation.
Returns the N-dimensional residual of this vector to a given track representation.
This method is not doing any extrapolation. But it creates the necessary detector plane object. See GFAbsRecoHit::getGFDetPlane
stateVector | pointer to track representation - used to synchronize with the track repesentation |
state | parameter vector of the track representation |
Definition at line 142 of file GFAbsRecoHit.h.
References GFAbsRecoHit::getHitCoord(), and GFAbsRecoHit::getHMatrix().
Referenced by GFKalman::getChi2Hit(), GFTrack::getResiduals(), and GFKalman::processHit().
void GFDafHit::setBlowUp | ( | double | blow_up | ) |
Set the \(\beta\) blow up factor for the covariance matrices.
Set the \(\beta\) as used by getHitCoord() and getHitCov().
Definition at line 38 of file GFDafHit.cxx.
References fBlow, fHitCoordUpd, and fHitCovUpd.
Referenced by clone(), and GFDaf::processTrack().
void GFDafHit::setWeights | ( | std::vector< double > | weights | ) |
Set the weights.
Set the weights as used by getHitCoord() and getHitCov().
Definition at line 46 of file GFDafHit.cxx.
References fHitCoordUpd, fHitCovUpd, and fWeights.
Referenced by clone(), and GFDaf::processTrack().
|
private |
Definition at line 137 of file GFDafHit.h.
Referenced by clone(), getHitCov(), GFDafHit(), and setBlowUp().
|
private |
Definition at line 138 of file GFDafHit.h.
Referenced by getHitCoord(), and getHitCov().
|
protectedinherited |
Vector of raw coordinates of hit.
Definition at line 76 of file GFAbsRecoHit.h.
Referenced by getHitCoord(), getHitCov(), GFAbsRecoHit::getRawHitCoord(), PndFtsRecoHit::PndFtsRecoHit(), PndGemRecoHit::PndGemRecoHit(), PndHitRecoHit::PndHitRecoHit(), PndHypRecoHit::PndHypRecoHit(), PndHypRecoSPHit::PndHypRecoSPHit(), PndMdtRecoHit::PndMdtRecoHit(), PndSdsRecoHit::PndSdsRecoHit(), PndSttRecoHit::PndSttRecoHit(), and GFAbsRecoHit::Print().
|
private |
Definition at line 135 of file GFDafHit.h.
Referenced by getHitCoord(), GFDafHit(), setBlowUp(), and setWeights().
|
protectedinherited |
Covariance of raw hit coordinates.
Definition at line 79 of file GFAbsRecoHit.h.
Referenced by getHitCoord(), getHitCov(), GFAbsRecoHit::getRawHitCov(), PndFtsRecoHit::PndFtsRecoHit(), PndGemRecoHit::PndGemRecoHit(), PndHitRecoHit::PndHitRecoHit(), PndHypRecoHit::PndHypRecoHit(), PndHypRecoSPHit::PndHypRecoSPHit(), PndMdtRecoHit::PndMdtRecoHit(), PndSdsRecoHit::PndSdsRecoHit(), and PndSttRecoHit::PndSttRecoHit().
|
private |
Definition at line 135 of file GFDafHit.h.
Referenced by getHitCoord(), getHitCov(), GFDafHit(), setBlowUp(), and setWeights().
|
private |
Definition at line 136 of file GFDafHit.h.
Referenced by getHitCoord(), and getHitCov().
|
private |
Definition at line 139 of file GFDafHit.h.
Referenced by clone(), getDetPlane(), getHit(), getHitCoord(), getHitCov(), getHMatrix(), getNumHits(), getPolicyName(), GFDafHit(), and ~GFDafHit().
|
private |
Definition at line 140 of file GFDafHit.h.
Referenced by clone(), getHitCoord(), getHitCov(), GFDafHit(), and setWeights().