EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFRecoHitIfc.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFRecoHitIfc.h
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
23 #ifndef GFRECOHITIFC_H
24 #define GFRECOHITIFC_H
25 
26 
27 #include "TMatrixT.h"
28 
29 #include "GFAbsRecoHit.h"
30 #include "GFDetPlane.h"
31 
32 
59 template<class HitPolicy>
60 class GFRecoHitIfc : public GFAbsRecoHit{
61  protected:
62  HitPolicy fPolicy;
63 
64  public:
65 
68  GFRecoHitIfc(int dim) : GFAbsRecoHit(dim){;}
69  virtual ~GFRecoHitIfc(){;}
70 
80  virtual const GFDetPlane& getDetPlane(GFAbsTrackRep* rep){return fPolicy.detPlane(this,rep);}
81 
86  virtual void getMeasurement(const GFAbsTrackRep* rep,const GFDetPlane& pl,const TMatrixT<double>& statePred,const TMatrixT<double>& covPred,TMatrixT<double>& m, TMatrixT<double>& V){
87  static_cast<void>(rep);
88  static_cast<void>(statePred);
89  static_cast<void>(covPred);
90  TMatrixT<double> mTemp = fPolicy.hitCoord(this,pl);
91  TMatrixT<double> VTemp = fPolicy.hitCov(this,pl);
92  m.ResizeTo(mTemp);
93  V.ResizeTo(VTemp);
94  m = mTemp;
95  V = VTemp;
96 }
97 
98  const std::string& getPolicyName(){return fPolicy.getName();}
99 
100  public:
102 
103 };
104 
105 #endif
106 
107