FairRoot/PandaRoot
Public Member Functions | Protected Attributes | Private Attributes | List of all members
GFAbsRecoHit Class Referenceabstract

Base Class for representing a Hit in GENFIT. More...

#include <GFAbsRecoHit.h>

Inheritance diagram for GFAbsRecoHit:
GFDafHit GFRecoHitIfc< HitPolicy > GFRecoHitIfc< GFPlanarHitPolicy > GFRecoHitIfc< GFSpacepointHitPolicy > PndFtsRecoHit PndSttRecoHit PndGemRecoHit PndHypRecoHit PndSdsRecoHit PndHitRecoHit PndHypRecoSPHit PndMdtRecoHit

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 GFDetPlanegetDetPlane (GFAbsTrackRep *)=0
 Get detector plane for a given track representation. More...
 
virtual GFAbsRecoHitclone ()=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
 

Detailed Description

Base Class for representing a Hit in GENFIT.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

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.

Constructor & Destructor Documentation

GFAbsRecoHit::~GFAbsRecoHit ( )
virtual

Definition at line 33 of file GFAbsRecoHit.cxx.

33 {;}
GFAbsRecoHit::GFAbsRecoHit ( int  NparHit)

Constructor specifying dimension of coordinate vector.

One hit is generally represented by a vector of coordinates.

Parameters
NparHitspecifies 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.

24  : fHitCoord(NparHit,1),
25  fHitCov(NparHit,NparHit),
26  fNparHit(NparHit)
27 {
28 }
TMatrixT< double > fHitCoord
Vector of raw coordinates of hit.
Definition: GFAbsRecoHit.h:76
TMatrixT< double > fHitCov
Covariance of raw hit coordinates.
Definition: GFAbsRecoHit.h:79
GFAbsRecoHit::GFAbsRecoHit ( )

Default constructor needed for compatibility with ROOT.

Definition at line 30 of file GFAbsRecoHit.cxx.

30  : fNparHit(-1) {
31 }

Member Function Documentation

virtual GFAbsRecoHit* GFAbsRecoHit::clone ( )
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.

virtual const GFDetPlane& GFAbsRecoHit::getDetPlane ( GFAbsTrackRep )
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().

virtual TMatrixT<double> GFAbsRecoHit::getHitCoord ( const GFDetPlane )
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.

See Also
getDetPlane

Implemented in GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, GFRecoHitIfc< GFPlanarHitPolicy >, and GFDafHit.

Referenced by GFDaf::calcWeights(), and residualVector().

virtual TMatrixT<double> GFAbsRecoHit::getHitCov ( const GFDetPlane )
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.

See Also
getGFDetPlane

Implemented in GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, GFRecoHitIfc< GFPlanarHitPolicy >, and GFDafHit.

Referenced by GFDaf::calcWeights(), GFKalman::getChi2Hit(), and GFKalman::processHit().

virtual TMatrixT<double> GFAbsRecoHit::getHMatrix ( const GFAbsTrackRep stateVector)
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().

int GFAbsRecoHit::getNparHit ( )
inline

Definition at line 211 of file GFAbsRecoHit.h.

References fNparHit.

211 {return fNparHit;}
const std::string & GFAbsRecoHit::getPolicyName ( )
virtual

Reimplemented in GFDafHit, GFRecoHitIfc< HitPolicy >, GFRecoHitIfc< GFSpacepointHitPolicy >, and GFRecoHitIfc< GFPlanarHitPolicy >.

Definition at line 35 of file GFAbsRecoHit.cxx.

35  {
36  std::cerr << "GFAbsRecoHit::getPolicyName() called for a reco hit, which wasnt derived from GFRecoHitIfc -> abort" << std::endl;
37  throw;
38 }
TMatrixT<double> GFAbsRecoHit::getRawHitCoord ( ) const
inline
TMatrixT<double> GFAbsRecoHit::getRawHitCov ( ) const
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().

153 {return fHitCov;}
TMatrixT< double > fHitCov
Covariance of raw hit coordinates.
Definition: GFAbsRecoHit.h:79
virtual void GFAbsRecoHit::Print ( )
inlinevirtual

Print raw hit coordinates.

Definition at line 207 of file GFAbsRecoHit.h.

References fHitCoord.

207 {fHitCoord.Print();}
TMatrixT< double > fHitCoord
Vector of raw coordinates of hit.
Definition: GFAbsRecoHit.h:76
virtual TMatrixT<double> GFAbsRecoHit::residualVector ( const GFAbsTrackRep stateVector,
const TMatrixT< double > &  state,
const GFDetPlane d 
)
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

Parameters
stateVectorpointer to track representation - used to synchronize with the track repesentation
stateparameter vector of the track representation
See Also
setHMatrix
getGFDetPlane

Definition at line 142 of file GFAbsRecoHit.h.

References getHitCoord(), and getHMatrix().

Referenced by GFKalman::getChi2Hit(), GFTrack::getResiduals(), and GFKalman::processHit().

144  {
145  TMatrixT<double> H = getHMatrix(stateVector);
146  return ( getHitCoord(d) - (H*state ));
147  }
virtual TMatrixT< double > getHMatrix(const GFAbsTrackRep *stateVector)=0
Get transformation matrix. Transformation between hit coordinates and track representation coordinate...
virtual TMatrixT< double > getHitCoord(const GFDetPlane &)=0
Get hit coordinates in a specific detector plane.

Member Data Documentation

TMatrixT<double> GFAbsRecoHit::fHitCoord
protected
TMatrixT<double> GFAbsRecoHit::fHitCov
protected
int GFAbsRecoHit::fNparHit
private

Definition at line 82 of file GFAbsRecoHit.h.

Referenced by getNparHit().


The documentation for this class was generated from the following files: