CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTBHodoscopeRecInfoAlgo.h
Go to the documentation of this file.
1 #ifndef RecoTBCalo_EcalTBHodoscopeReconstructor_EcalTBHodoscopeRecInfoAlgo_HH
2 #define RecoTBCalo_EcalTBHodoscopeReconstructor_EcalTBHodoscopeRecInfoAlgo_HH
3 
7 
8 #include <vector>
9 #include <cmath>
10 
11 
13 
14  public:
16 
17  explicit EcalTBHodoscopeRecInfoAlgo(int fitMethod, const std::vector<double>& planeShift, const std::vector<double>& zPosition);
18 
20  {
21  if (myGeometry_)
22  delete myGeometry_;
23  };
24 
25  EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo& hodoscopeRawInfo) const;
26 
27  private:
29  class BeamTrack {
30  public:
31  float x;
32  float xS;
33  float xQ;
34 
35  bool operator<(BeamTrack &b2)
36  {
37  return ( fabs(xS) < fabs(b2.xS) );
38  }
39 
40  BeamTrack(float x0,float xs,float xq):x(x0),xS(xs),xQ(xq) {}
41 
43  private:
44  BeamTrack() {}
45  };
46 
47  //Methods taken from h4ana. They can change in a future version
48 
49  void clusterPos(float &x, float &xQuality,const int& ipl, const int& xclus, const int& wclus) const ;
50 
51  void fitHodo(float &x, float &xQuality,
52  const int& ipl, const int& nclus, const std::vector<int>& xclus, const std::vector<int>& wclus) const ;
53 
54  void fitLine(float &x, float &xSlope, float &xQuality,
55  const int& ipl1, const int& nclus1, const std::vector<int>& xclus1, const std::vector<int>& wclus1,
56  const int& ipl2, const int& nclus2, const std::vector<int>& xclus2, const std::vector<int>& wclus2) const;
57 
59 
60  std::vector<double> planeShift_;
61  std::vector<double> zPosition_;
62 
63  //for the moment mantaining it here
65 
66 };
67 
68 #endif
void fitHodo(float &x, float &xQuality, const int &ipl, const int &nclus, const std::vector< int > &xclus, const std::vector< int > &wclus) const
EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo &hodoscopeRawInfo) const
void fitLine(float &x, float &xSlope, float &xQuality, const int &ipl1, const int &nclus1, const std::vector< int > &xclus1, const std::vector< int > &wclus1, const int &ipl2, const int &nclus2, const std::vector< int > &xclus2, const std::vector< int > &wclus2) const
void clusterPos(float &x, float &xQuality, const int &ipl, const int &xclus, const int &wclus) const
EcalTBHodoscopeGeometry * myGeometry_