FairRoot/PandaRoot
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
GFSpacepointHitPolicy Class Reference

Policy class implementing a space point hit geometry. More...

#include <GFSpacepointHitPolicy.h>

Inheritance diagram for GFSpacepointHitPolicy:

Public Member Functions

 GFSpacepointHitPolicy ()
 
const GFDetPlanedetPlane (GFAbsRecoHit *, GFAbsTrackRep *)
 Get detector plane perpendicular to track. More...
 
TMatrixT< double > hitCoord (GFAbsRecoHit *, const GFDetPlane &)
 Hit coordinates in detector plane. More...
 
TMatrixT< double > hitCov (GFAbsRecoHit *, const GFDetPlane &)
 Hit covariances in detector plane. More...
 
virtual ~GFSpacepointHitPolicy ()
 
const std::string & getName ()
 
 ClassDef (GFSpacepointHitPolicy, 1)
 

Private Attributes

GFDetPlane fPlane
 

Static Private Attributes

static const std::string fPolicyName = "GFSpacepointHitPolicy"
 

Detailed Description

Policy class implementing a space point hit geometry.

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

RecoHits for detectors measuring 3D space points should inherit from RecoHitIfc<GFSpacepointHitPolicy>.

For a space point the detector plane has to be defined with respect to a track representation. GFSpacepointHitPolicy implements a scheme where the detectorplane is chosen perpendicular to the track. In a track fit only 2 of the three coordinates of a space point are independent (the track is a one-dimensional object). Therefore the 3D data of the hit is used to define a proper detector plane into which the hit coordinates are then projected.

Definition at line 52 of file GFSpacepointHitPolicy.h.

Constructor & Destructor Documentation

GFSpacepointHitPolicy::GFSpacepointHitPolicy ( )
inline

Definition at line 56 of file GFSpacepointHitPolicy.h.

56 {;}
virtual GFSpacepointHitPolicy::~GFSpacepointHitPolicy ( )
inlinevirtual

Definition at line 75 of file GFSpacepointHitPolicy.h.

75 {;}

Member Function Documentation

GFSpacepointHitPolicy::ClassDef ( GFSpacepointHitPolicy  ,
 
)
const GFDetPlane & GFSpacepointHitPolicy::detPlane ( GFAbsRecoHit hit,
GFAbsTrackRep rep 
)

Get detector plane perpendicular to track.

The detector plane is contructed from the position of the hit and the track representation. For this the track is extrapolated to the point of closest approach to the hit.

Definition at line 89 of file GFSpacepointHitPolicy.cxx.

References GFAbsTrackRep::extrapolateToPoint(), fPlane, GFAbsRecoHit::getRawHitCoord(), point, GFDetPlane::setNormal(), and GFDetPlane::setO().

90 {
91  TMatrixT<double> rawcoord = hit->getRawHitCoord();
92  TVector3 point(rawcoord[0][0],rawcoord[1][0],rawcoord[2][0]);
93 
94  TVector3 poca,dirInPoca;
95  rep->extrapolateToPoint(point,poca,dirInPoca);
96 
97  fPlane.setO(point);
98  fPlane.setNormal(dirInPoca);
99 
100  return fPlane;
101 }
void setO(const TVector3 &o)
Definition: GFDetPlane.cxx:92
void setNormal(TVector3 n)
Definition: GFDetPlane.cxx:156
TMatrixT< double > getRawHitCoord() const
Get raw hit coordinates.
Definition: GFAbsRecoHit.h:158
TClonesArray * point
Definition: anaLmdDigi.C:29
virtual void extrapolateToPoint(const TVector3 &point, TVector3 &poca, TVector3 &normVec)
This method is to extrapolate the track to point of closest approach to a point in space...
const std::string& GFSpacepointHitPolicy::getName ( )
inline

Definition at line 77 of file GFSpacepointHitPolicy.h.

References fPolicyName.

77 {return fPolicyName;}
static const std::string fPolicyName
TMatrixT< double > GFSpacepointHitPolicy::hitCoord ( GFAbsRecoHit hit,
const GFDetPlane plane 
)

Hit coordinates in detector plane.

Definition at line 30 of file GFSpacepointHitPolicy.cxx.

References GFDetPlane::getO(), GFAbsRecoHit::getRawHitCoord(), GFDetPlane::getU(), and GFDetPlane::getV().

31 {
32  TMatrixT<double> returnMat(2,1);
33 
34  TMatrixT<double> _D(3,1);
35  TVector3 _U;
36  TVector3 _V;
37 
38  _D[0][0] = (plane.getO())[0];
39  _D[1][0] = (plane.getO())[1];
40  _D[2][0] = (plane.getO())[2];
41 
42  _D *= -1.;
43  _D += hit->getRawHitCoord();
44  //now the vector _D points from the origin of the plane to the hit point
45 
46 
47  _U = plane.getU();
48  _V = plane.getV();
49 
50 
51  returnMat[0][0] = _D[0][0] * _U[0] + _D[1][0] * _U[1] + _D[2][0] * _U[2];
52  returnMat[1][0] = _D[0][0] * _V[0] + _D[1][0] * _V[1] + _D[2][0] * _V[2];
53  //std::cout << "hitCoord="<<std::endl;
54  //returnMat.Print();
55  return returnMat;
56 }
TVector3 getV() const
Definition: GFDetPlane.h:77
TMatrixT< double > getRawHitCoord() const
Get raw hit coordinates.
Definition: GFAbsRecoHit.h:158
TVector3 getU() const
Definition: GFDetPlane.h:76
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > GFSpacepointHitPolicy::hitCov ( GFAbsRecoHit hit,
const GFDetPlane plane 
)

Hit covariances in detector plane.

Definition at line 59 of file GFSpacepointHitPolicy.cxx.

References GFAbsRecoHit::getRawHitCov(), GFDetPlane::getU(), and GFDetPlane::getV().

60 {
61  TVector3 _U;
62  TVector3 _V;
63 
64  _U = plane.getU();
65  _V = plane.getV();
66 
67  TMatrixT<double> rawCov = hit->getRawHitCov();
68 
69  TMatrixT<double> jac(3,2);
70 
71  // jac = dF_i/dx_j = s_unitvec * t_untivec, with s=u,v and t=x,y,z
72  jac[0][0] = _U[0];
73  jac[1][0] = _U[1];
74  jac[2][0] = _U[2];
75  jac[0][1] = _V[0];
76  jac[1][1] = _V[1];
77  jac[2][1] = _V[2];
78 
79  TMatrixT<double> jac_orig = jac;
80  TMatrixT<double> jac_t = jac.T();
81 
82  TMatrixT<double> result=jac_t * (rawCov * jac_orig);
83  //std::cout << "hitCov="<<std::endl;
84  //result.Print();
85  return result;
86 }
TVector3 getV() const
Definition: GFDetPlane.h:77
TVector3 getU() const
Definition: GFDetPlane.h:76
TMatrixT< double > getRawHitCov() const
Get raw hit covariances.
Definition: GFAbsRecoHit.h:153

Member Data Documentation

GFDetPlane GFSpacepointHitPolicy::fPlane
private

Definition at line 82 of file GFSpacepointHitPolicy.h.

Referenced by detPlane().

const std::string GFSpacepointHitPolicy::fPolicyName = "GFSpacepointHitPolicy"
staticprivate

Definition at line 79 of file GFSpacepointHitPolicy.h.

Referenced by getName().


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