FairRoot/PandaRoot
|
Base Class for representing a Hit in GENFIT. More...
#include <GFAbsRecoHit.h>
Public Member Functions | |
virtual | ~GFAbsRecoHit () |
GFAbsRecoHit (int NparHit) | |
Constructor specifying dimension of coordinate vector. More... | |
GFAbsRecoHit () | |
Default constructor needed for compatibility with ROOT. More... | |
virtual TMatrixT< double > | getHMatrix (const GFAbsTrackRep *stateVector)=0 |
Get transformation matrix. Transformation between hit coordinates and track representation coordinates. 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 TMatrixT< double > | getHitCov (const GFDetPlane &)=0 |
Get hit covariances in a specific detector plane. More... | |
virtual TMatrixT< double > | getHitCoord (const GFDetPlane &)=0 |
Get hit coordinates in a specific detector plane. More... | |
virtual const GFDetPlane & | getDetPlane (GFAbsTrackRep *)=0 |
Get detector plane for a given track representation. More... | |
virtual GFAbsRecoHit * | clone ()=0 |
Get clone of this object. More... | |
virtual void | Print () |
Print raw hit coordinates. More... | |
virtual const std::string & | getPolicyName () |
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 | |
int | fNparHit |
Base Class for representing a Hit in GENFIT.
A hit is defined as a single measurement of a detector. Each detector can define it's own hit representation (geometry) by inherting from GFAbsRecoHit. We call such a child object a "RecoHit" to make clear that it inherits from GFAbsRecoHit. All detector specific information is handled inside the RecoHit objects. The idea behind this is that the fitting algorithms can work on different detectors simultanously.
GFAbsRecoHit defines the basic interface that is used by all genfit algorithms to access hit-measurement information. It provides:
All hits have to inherit from this base class. Inheritance can be direct or through template class RecoHitIfc<GeometryPolicy>. These interface classes (defined with a specific policy) provide additional functionality for specific hit geometries, such as space points, wires, etc. For details look at the RecoHitIfc documentation.
A simple example is given in VirtSpacePointRecoHit
Background information: The main feature here is that coordinates and covariances are available as general TMatrixT<double> objects. By using these general algebraic objects it is possible to abstract from the concrete measurement and thus define a unified framework to handle the data. This is a key ingredient for the separation of data and algorithms which in turn enables us to elegantly combine information from different detectors.
Definition at line 73 of file GFAbsRecoHit.h.
|
virtual |
Definition at line 33 of file GFAbsRecoHit.cxx.
GFAbsRecoHit::GFAbsRecoHit | ( | int | NparHit | ) |
Constructor specifying dimension of coordinate vector.
One hit is generally represented by a vector of coordinates.
NparHit | specifies the dimension of this vector. (e.g. 3 for a spacepoint, 2 for a pixel, 1 for a strip) |
Definition at line 24 of file GFAbsRecoHit.cxx.
GFAbsRecoHit::GFAbsRecoHit | ( | ) |
Default constructor needed for compatibility with ROOT.
Definition at line 30 of file GFAbsRecoHit.cxx.
|
pure 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!
Implemented in GFDafHit, PndHypRecoHit, PndMdtRecoHit, PndGemRecoHit, PndHypRecoSPHit, PndSdsRecoHit, PndHitRecoHit, PndFtsRecoHit, and PndSttRecoHit.
|
pure virtual |
Get detector plane for a given track representation.
Virtual abstract method has to be implemented by inherting classes.
In general the detector plane can depend both on the detector/hit geometry as well as the track geometry. E.g. for a space point one usually chooses a plane that is perpendicular to the current track, since in that case no other plane is predefined.
There are several implementations for this method in the HitPolicies. In the most simple case (a planar detector) the method just returns a fixed (detector module specific) plane. This behaviour for example is implemented in PlanarHitPolicy.
Implemented in GFDafHit, GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, and GFRecoHitIfc< GFPlanarHitPolicy >.
Referenced by GFDaf::calcWeights(), GFKalman::getChi2Hit(), GFTrack::getResiduals(), and GFKalman::processHit().
|
pure virtual |
Get hit coordinates in a specific detector plane.
Virtual abstract method has to be implemented by inherting classes. Implementation involves transformation from raw coordinates in detector coordinate system to detector plane coordinate system.
Implemented in GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, GFRecoHitIfc< GFPlanarHitPolicy >, and GFDafHit.
Referenced by GFDaf::calcWeights(), and residualVector().
|
pure virtual |
Get hit covariances in a specific detector plane.
Virtual abstract method has to be implemented by inherting classes. Implementation involves transformation from raw coordinates in detector coordinate system to detector plane coordinate system.
Implemented in GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, GFRecoHitIfc< GFPlanarHitPolicy >, and GFDafHit.
Referenced by GFDaf::calcWeights(), GFKalman::getChi2Hit(), and GFKalman::processHit().
|
pure virtual |
Get transformation matrix. Transformation between hit coordinates and track representation coordinates.
This is a virtual abstract method which has to be implemented in the child classes.
In general there is a linear transformation between the coordinate system of the hit (which is defined by the detector plane) and the coordinates of the track representation in that plane. In the most simple case the track representation has 5 parameters (space + momentum) while a hit usually has less (one to three space coordinates).
The transformation matrix is then simply projecting out the space-components of the track representation.
Its dimensions are NxM. Where N is the number of dimensions of the hit in the detector plane (usually 2 or 1) and M is the dimension of the track representation.
In this method a hit has to define with which track representations it can work together. It should be the only point where this explicit coordination is necessary.
For example code see implementing classes below:
Implemented in GFDafHit, PndHypRecoHit, PndMdtRecoHit, PndGemRecoHit, PndSdsRecoHit, PndHypRecoSPHit, PndHitRecoHit, PndFtsRecoHit, and PndSttRecoHit.
Referenced by GFTools::getBiasedSmoothedCov(), GFTools::getBiasedSmoothedPos(), GFKalman::getChi2Hit(), GFTools::getSmoothedChiSqu(), GFTools::getSmoothedCov(), GFTools::getSmoothedPos(), GFKalman::processHit(), and residualVector().
|
inline |
|
virtual |
Reimplemented in GFDafHit, GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, and GFRecoHitIfc< GFPlanarHitPolicy >.
Definition at line 35 of file GFAbsRecoHit.cxx.
|
inline |
Get raw hit coordinates.
Definition at line 158 of file GFAbsRecoHit.h.
References fHitCoord.
Referenced by GFWirepointHitPolicy::checkPlane(), GFWireHitPolicy::checkPlane(), GFWirepointHitPolicy::detPlane(), GFWireHitPolicy::detPlane(), GFSpacepointHitPolicy::detPlane(), GFTools::getSmoothedChiSqu(), GFWirepointHitPolicy::hitCoord(), GFWireHitPolicy::hitCoord(), GFSpacepointHitPolicy::hitCoord(), and GFPlanarHitPolicy::hitCoord().
|
inline |
Get raw hit covariances.
Definition at line 153 of file GFAbsRecoHit.h.
References fHitCov.
Referenced by GFTools::getSmoothedChiSqu(), GFWirepointHitPolicy::hitCov(), GFWireHitPolicy::hitCov(), GFSpacepointHitPolicy::hitCov(), and GFPlanarHitPolicy::hitCov().
|
inlinevirtual |
Print raw hit coordinates.
Definition at line 207 of file GFAbsRecoHit.h.
References fHitCoord.
|
inlinevirtual |
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 getHitCoord(), and getHMatrix().
Referenced by GFKalman::getChi2Hit(), GFTrack::getResiduals(), and GFKalman::processHit().
|
protected |
Vector of raw coordinates of hit.
Definition at line 76 of file GFAbsRecoHit.h.
Referenced by GFDafHit::getHitCoord(), GFDafHit::getHitCov(), getRawHitCoord(), PndFtsRecoHit::PndFtsRecoHit(), PndGemRecoHit::PndGemRecoHit(), PndHitRecoHit::PndHitRecoHit(), PndHypRecoHit::PndHypRecoHit(), PndHypRecoSPHit::PndHypRecoSPHit(), PndMdtRecoHit::PndMdtRecoHit(), PndSdsRecoHit::PndSdsRecoHit(), PndSttRecoHit::PndSttRecoHit(), and Print().
|
protected |
Covariance of raw hit coordinates.
Definition at line 79 of file GFAbsRecoHit.h.
Referenced by GFDafHit::getHitCoord(), GFDafHit::getHitCov(), getRawHitCov(), PndFtsRecoHit::PndFtsRecoHit(), PndGemRecoHit::PndGemRecoHit(), PndHitRecoHit::PndHitRecoHit(), PndHypRecoHit::PndHypRecoHit(), PndHypRecoSPHit::PndHypRecoSPHit(), PndMdtRecoHit::PndMdtRecoHit(), PndSdsRecoHit::PndSdsRecoHit(), and PndSttRecoHit::PndSttRecoHit().
|
private |
Definition at line 82 of file GFAbsRecoHit.h.
Referenced by getNparHit().