All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
genf::GFAbsRecoHit Class Referenceabstract

#include <GFAbsRecoHit.h>

Inheritance diagram for genf::GFAbsRecoHit:
genf::GFRecoHitIfc< HitPolicy > genf::PointHit

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_t > getHMatrix (const GFAbsTrackRep *stateVector)=0
 Get transformation matrix. Transformation between hit coordinates and track representation coordinates. More...
 
virtual TMatrixT< Double_t > getHMatrix (const GFAbsTrackRep *stateVector, const Double_t &, const Double_t &)=0
 
virtual TMatrixT< Double_t > residualVector (const GFAbsTrackRep *stateVector, const TMatrixT< Double_t > &state, const GFDetPlane &d)
 Calculate residual with respect to a track representation. More...
 
virtual TMatrixT< Double_t > residualVector (const GFAbsTrackRep *stateVector, const TMatrixT< Double_t > &state, const GFDetPlane &d, const GFDetPlane &dPrev, const double &mass)
 
TMatrixT< Double_t > getRawHitCov () const
 Get raw hit covariances. More...
 
TMatrixT< Double_t > getRawHitCoord () const
 Get raw hit coordinates. More...
 
virtual TMatrixT< Double_t > getHitCov (const GFDetPlane &)=0
 Get hit covariances in a specific detector plane. More...
 
virtual TMatrixT< Double_t > getHitCov (const GFDetPlane &, const GFDetPlane &, const TMatrixT< Double_t > &, const Double_t &)=0
 
virtual TMatrixT< Double_t > getHitCoord (const GFDetPlane &, const GFDetPlane &)=0
 Get hit coordinates in a specific detector plane. More...
 
virtual TMatrixT< Double_t > getHitCoord (const GFDetPlane &)=0
 
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 (std::ostream &out=std::cout) const
 Print raw hit coordinates. More...
 
virtual const std::string & getPolicyName ()
 
int getNparHit ()
 

Protected Attributes

TMatrixT< Double_t > fHitCoord
 Vector of raw coordinates of hit. More...
 
TMatrixT< Double_t > fHitCov
 Covariance of raw hit coordinates. More...
 

Private Member Functions

virtual void Print (Option_t *) const
 

Private Attributes

int fNparHit
 

Detailed Description

Definition at line 78 of file GFAbsRecoHit.h.

Constructor & Destructor Documentation

genf::GFAbsRecoHit::~GFAbsRecoHit ( )
virtual

Definition at line 33 of file GFAbsRecoHit.cxx.

33 {;}
genf::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_t > fHitCoord
Vector of raw coordinates of hit.
Definition: GFAbsRecoHit.h:81
TMatrixT< Double_t > fHitCov
Covariance of raw hit coordinates.
Definition: GFAbsRecoHit.h:84
genf::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* genf::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 genf::PointHit.

virtual const GFDetPlane& genf::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 genf::GFRecoHitIfc< HitPolicy >.

virtual TMatrixT<Double_t> genf::GFAbsRecoHit::getHitCoord ( const GFDetPlane ,
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 genf::GFRecoHitIfc< HitPolicy >.

virtual TMatrixT<Double_t> genf::GFAbsRecoHit::getHitCoord ( const GFDetPlane )
pure virtual
virtual TMatrixT<Double_t> genf::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 genf::GFRecoHitIfc< HitPolicy >.

virtual TMatrixT<Double_t> genf::GFAbsRecoHit::getHitCov ( const GFDetPlane ,
const GFDetPlane ,
const TMatrixT< Double_t > &  ,
const Double_t &   
)
pure virtual
virtual TMatrixT<Double_t> genf::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 genf::PointHit.

virtual TMatrixT<Double_t> genf::GFAbsRecoHit::getHMatrix ( const GFAbsTrackRep stateVector,
const Double_t &  ,
const Double_t &   
)
pure virtual

Implemented in genf::PointHit.

int genf::GFAbsRecoHit::getNparHit ( )
inline

Definition at line 239 of file GFAbsRecoHit.h.

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

Reimplemented in genf::GFRecoHitIfc< HitPolicy >.

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 }
BEGIN_PROLOG could also be cerr
TMatrixT<Double_t> genf::GFAbsRecoHit::getRawHitCoord ( ) const
inline

Get raw hit coordinates.

Definition at line 183 of file GFAbsRecoHit.h.

183 {return fHitCoord;}
TMatrixT< Double_t > fHitCoord
Vector of raw coordinates of hit.
Definition: GFAbsRecoHit.h:81
TMatrixT<Double_t> genf::GFAbsRecoHit::getRawHitCov ( ) const
inline

Get raw hit covariances.

Definition at line 178 of file GFAbsRecoHit.h.

178 {return fHitCov;}
TMatrixT< Double_t > fHitCov
Covariance of raw hit coordinates.
Definition: GFAbsRecoHit.h:84
virtual void genf::GFAbsRecoHit::Print ( std::ostream &  out = std::cout) const
inlinevirtual

Print raw hit coordinates.

Definition at line 234 of file GFAbsRecoHit.h.

235  { PrintROOTobject(out, fHitCoord); }
TMatrixT< Double_t > fHitCoord
Vector of raw coordinates of hit.
Definition: GFAbsRecoHit.h:81
void PrintROOTobject(std::ostream &, const ROOTOBJ &)
Small utility functions which print some ROOT objects into an output stream.
Definition: GFException.h:127
virtual void genf::GFAbsRecoHit::Print ( Option_t *  ) const
inlineprivatevirtual

Definition at line 245 of file GFAbsRecoHit.h.

246  { throw std::logic_error(std::string(__func__) + "::Print(Option_t*) not available"); }
virtual TMatrixT<Double_t> genf::GFAbsRecoHit::residualVector ( const GFAbsTrackRep stateVector,
const TMatrixT< Double_t > &  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 148 of file GFAbsRecoHit.h.

150  {
151  std::cout << "GFAbsRecoHit::residualVector(3args) Not correctly Using theta -- multiple scattering -- information !!! Fix this if you really want to use getChi2Hit" << std::endl;
152  TMatrixT<Double_t> H = getHMatrix(stateVector);
153  return ( getHitCoord(d) - (H*state ));
154  }
virtual TMatrixT< Double_t > getHitCoord(const GFDetPlane &, const GFDetPlane &)=0
Get hit coordinates in a specific detector plane.
virtual TMatrixT< Double_t > getHMatrix(const GFAbsTrackRep *stateVector)=0
Get transformation matrix. Transformation between hit coordinates and track representation coordinate...
BEGIN_PROLOG could also be cout
virtual TMatrixT<Double_t> genf::GFAbsRecoHit::residualVector ( const GFAbsTrackRep stateVector,
const TMatrixT< Double_t > &  state,
const GFDetPlane d,
const GFDetPlane dPrev,
const double &  mass 
)
inlinevirtual

Definition at line 156 of file GFAbsRecoHit.h.

162  {
163  Double_t dist = (d.getO()-dPrev.getO()).Mag();
164  // Double_t mass = 0.104; // close enough for muons, pions, I think.
165  Double_t mom = fabs(1.0/state[0][0]);
166  Double_t beta = mom/sqrt(mass*mass+mom*mom);
167  if (std::isnan(dist) || dist<0.2) dist=0.2; // don't allow 0s here.
168  if (std::isnan(beta) || beta<0.04) beta=0.04;
169 
170  TMatrixT<Double_t> H = getHMatrix(stateVector,beta,dist);
171  return ( getHitCoord(d,dPrev) - (H*state ));
172  }
virtual TMatrixT< Double_t > getHitCoord(const GFDetPlane &, const GFDetPlane &)=0
Get hit coordinates in a specific detector plane.
virtual TMatrixT< Double_t > getHMatrix(const GFAbsTrackRep *stateVector)=0
Get transformation matrix. Transformation between hit coordinates and track representation coordinate...
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
float mass
Definition: dedx.py:47

Member Data Documentation

TMatrixT<Double_t> genf::GFAbsRecoHit::fHitCoord
protected

Vector of raw coordinates of hit.

Definition at line 81 of file GFAbsRecoHit.h.

TMatrixT<Double_t> genf::GFAbsRecoHit::fHitCov
protected

Covariance of raw hit coordinates.

Definition at line 84 of file GFAbsRecoHit.h.

int genf::GFAbsRecoHit::fNparHit
private

Definition at line 87 of file GFAbsRecoHit.h.


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