FairRoot/PandaRoot
Public Member Functions | Protected Attributes | List of all members
GFRecoHitIfc< HitPolicy > Class Template Referenceabstract

RecoHit interface template class. Provides comfortable interface to create RecoHits. More...

#include <GFRecoHitIfc.h>

Inheritance diagram for GFRecoHitIfc< HitPolicy >:
GFAbsRecoHit PndFtsRecoHit PndSttRecoHit

Public Member Functions

 GFRecoHitIfc (int dim)
 Constructor specifying dimension of hit coordinate vector. More...
 
virtual ~GFRecoHitIfc ()
 
virtual const GFDetPlanegetDetPlane (GFAbsTrackRep *rep)
 Returns the detector plane object for this hit and a given track representation. More...
 
virtual TMatrixT< double > getHitCoord (const GFDetPlane &plane)
 Get hit coordinates in a specific detector plane. More...
 
virtual TMatrixT< double > getHitCov (const GFDetPlane &plane)
 Get hit covariances in a specific detector plane. More...
 
const std::string & getPolicyName ()
 
 ClassDef (GFRecoHitIfc, 1)
 
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 GFAbsRecoHitclone ()=0
 Get clone of this object. More...
 
virtual void Print ()
 Print raw hit coordinates. More...
 
int getNparHit ()
 

Protected Attributes

HitPolicy fPolicy
 
TMatrixT< double > fHitCoord
 Vector of raw coordinates of hit. More...
 
TMatrixT< double > fHitCov
 Covariance of raw hit coordinates. More...
 

Detailed Description

template<class HitPolicy>
class GFRecoHitIfc< HitPolicy >

RecoHit interface template class. Provides comfortable interface to create RecoHits.

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

This class defines a comfortable interface to create hit classes in genfit. It is a template class. The template parameter is used to specify a certain basic type of hit:

To create a hit for a detector simply inherit from one of the options above and fill in your data. For details look at the respective HitPolicy documentations. You can also directly inherit from GFAbsRecoHit though this is not recommended. If a new hit geometry is needed one should think about implementing a new HitPolicy for this type of hit.

See Also
PlanarHitPolicy
SpacepointHitPolicy
WirepointHitPolicy

Implementation details: The actual implementations of the methods declared here can be found in the HitPolicy objects.

Definition at line 60 of file GFRecoHitIfc.h.

Constructor & Destructor Documentation

template<class HitPolicy>
GFRecoHitIfc< HitPolicy >::GFRecoHitIfc ( int  dim)
inline

Constructor specifying dimension of hit coordinate vector.

Definition at line 68 of file GFRecoHitIfc.h.

68 : GFAbsRecoHit(dim){;}
GFAbsRecoHit()
Default constructor needed for compatibility with ROOT.
template<class HitPolicy>
virtual GFRecoHitIfc< HitPolicy >::~GFRecoHitIfc ( )
inlinevirtual

Definition at line 69 of file GFRecoHitIfc.h.

69 {;}

Member Function Documentation

template<class HitPolicy>
GFRecoHitIfc< HitPolicy >::ClassDef ( GFRecoHitIfc< HitPolicy >  ,
 
)
virtual GFAbsRecoHit* GFAbsRecoHit::clone ( )
pure virtualinherited

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.

template<class HitPolicy>
virtual const GFDetPlane& GFRecoHitIfc< HitPolicy >::getDetPlane ( GFAbsTrackRep rep)
inlinevirtual

Returns the detector plane object for this hit and a given track representation.

The actutal code for this method depends on the hit geometry and is implemented in the HitPolicy

See Also
PlanarHitPolicy
SpacepointHitPolicy
WirepointHitPolicy

Implements GFAbsRecoHit.

Definition at line 80 of file GFRecoHitIfc.h.

80 {return fPolicy.detPlane(this,rep);}
HitPolicy fPolicy
Definition: GFRecoHitIfc.h:62
template<class HitPolicy>
virtual TMatrixT<double> GFRecoHitIfc< HitPolicy >::getHitCoord ( const GFDetPlane plane)
inlinevirtual

Get hit coordinates in a specific detector plane.

Implementation in the HitPolicy

Implements GFAbsRecoHit.

Definition at line 86 of file GFRecoHitIfc.h.

87  {return fPolicy.hitCoord(this,plane);}
HitPolicy fPolicy
Definition: GFRecoHitIfc.h:62
template<class HitPolicy>
virtual TMatrixT<double> GFRecoHitIfc< HitPolicy >::getHitCov ( const GFDetPlane plane)
inlinevirtual

Get hit covariances in a specific detector plane.

Implementation in the HitPolicy

Implements GFAbsRecoHit.

Definition at line 93 of file GFRecoHitIfc.h.

94  {return fPolicy.hitCov(this,plane);}
HitPolicy fPolicy
Definition: GFRecoHitIfc.h:62
virtual TMatrixT<double> GFAbsRecoHit::getHMatrix ( const GFAbsTrackRep stateVector)
pure virtualinherited

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 GFAbsRecoHit::residualVector().

int GFAbsRecoHit::getNparHit ( )
inlineinherited

Definition at line 211 of file GFAbsRecoHit.h.

References GFAbsRecoHit::fNparHit.

211 {return fNparHit;}
template<class HitPolicy>
const std::string& GFRecoHitIfc< HitPolicy >::getPolicyName ( )
inlinevirtual

Reimplemented from GFAbsRecoHit.

Definition at line 96 of file GFRecoHitIfc.h.

96 {return fPolicy.getName();}
HitPolicy fPolicy
Definition: GFRecoHitIfc.h:62
TMatrixT<double> GFAbsRecoHit::getRawHitCoord ( ) const
inlineinherited
TMatrixT<double> GFAbsRecoHit::getRawHitCov ( ) const
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().

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

Print raw hit coordinates.

Definition at line 207 of file GFAbsRecoHit.h.

References GFAbsRecoHit::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 
)
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

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 GFAbsRecoHit::getHitCoord(), and GFAbsRecoHit::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
protectedinherited
TMatrixT<double> GFAbsRecoHit::fHitCov
protectedinherited
template<class HitPolicy>
HitPolicy GFRecoHitIfc< HitPolicy >::fPolicy
protected

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