CMS 3D CMS Logo

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 
12 public:
14 
16  const std::vector<double>& planeShift,
17  const std::vector<double>& zPosition);
18 
20  if (myGeometry_)
21  delete myGeometry_;
22  };
23 
24  EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo& hodoscopeRawInfo) const;
25 
26 private:
28  class BeamTrack {
29  public:
30  float x;
31  float xS;
32  float xQ;
33 
34  bool operator<(BeamTrack& b2) { return (fabs(xS) < fabs(b2.xS)); }
35 
36  BeamTrack(float x0, float xs, float xq) : x(x0), xS(xs), xQ(xq) {}
37 
39 
40  private:
41  BeamTrack() {}
42  };
43 
44  //Methods taken from h4ana. They can change in a future version
45 
46  void clusterPos(float& x, float& xQuality, const int& ipl, const int& xclus, const int& wclus) const;
47 
48  void fitHodo(float& x,
49  float& xQuality,
50  const int& ipl,
51  const int& nclus,
52  const std::vector<int>& xclus,
53  const std::vector<int>& wclus) const;
54 
55  void fitLine(float& x,
56  float& xSlope,
57  float& xQuality,
58  const int& ipl1,
59  const int& nclus1,
60  const std::vector<int>& xclus1,
61  const std::vector<int>& wclus1,
62  const int& ipl2,
63  const int& nclus2,
64  const std::vector<int>& xclus2,
65  const std::vector<int>& wclus2) const;
66 
68 
69  std::vector<double> planeShift_;
70  std::vector<double> zPosition_;
71 
72  //for the moment mantaining it here
74 };
75 
76 #endif
EcalTBHodoscopeRecInfoAlgo::BeamTrack::BeamTrack
BeamTrack()
Definition: EcalTBHodoscopeRecInfoAlgo.h:41
EcalTBHodoscopeGeometry.h
EcalTBHodoscopeRecInfoAlgo::BeamTrack
Class to hold track information.
Definition: EcalTBHodoscopeRecInfoAlgo.h:28
EcalTBHodoscopeRecInfoAlgo::clusterPos
void clusterPos(float &x, float &xQuality, const int &ipl, const int &xclus, const int &wclus) const
Definition: EcalTBHodoscopeRecInfoAlgo.cc:13
EcalTBHodoscopeRawInfo.h
EcalTBHodoscopeGeometry
Definition: EcalTBHodoscopeGeometry.h:9
EcalTBHodoscopeRecInfoAlgo
Definition: EcalTBHodoscopeRecInfoAlgo.h:11
ecal2004TBHodoscopeReconstructor_cfi.planeShift
planeShift
Definition: ecal2004TBHodoscopeReconstructor_cfi.py:8
DDAxes::x
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
EcalTBHodoscopeRecInfoAlgo::BeamTrack::operator<
bool operator<(BeamTrack &b2)
Definition: EcalTBHodoscopeRecInfoAlgo.h:34
ecal2004TBHodoscopeReconstructor_cfi.zPosition
zPosition
Definition: ecal2004TBHodoscopeReconstructor_cfi.py:9
EcalTBHodoscopeRecInfoAlgo::myGeometry_
EcalTBHodoscopeGeometry * myGeometry_
Definition: EcalTBHodoscopeRecInfoAlgo.h:73
ecal2004TBHodoscopeReconstructor_cfi.fitMethod
fitMethod
Definition: ecal2004TBHodoscopeReconstructor_cfi.py:5
EcalTBHodoscopeRecInfo
Definition: EcalTBHodoscopeRecInfo.h:12
EcalTBHodoscopeRecInfoAlgo::planeShift_
std::vector< double > planeShift_
Definition: EcalTBHodoscopeRecInfoAlgo.h:69
EcalTBHodoscopeRecInfoAlgo::fitLine
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
Definition: EcalTBHodoscopeRecInfoAlgo.cc:47
EcalTBHodoscopeRecInfoAlgo::fitMethod_
int fitMethod_
Definition: EcalTBHodoscopeRecInfoAlgo.h:67
EcalTBHodoscopeRecInfo.h
EcalTBHodoscopeRawInfo
Definition: EcalTBHodoscopeRawInfo.h:13
EcalTBHodoscopeRecInfoAlgo::BeamTrack::xQ
float xQ
Definition: EcalTBHodoscopeRecInfoAlgo.h:32
EcalTBHodoscopeRecInfoAlgo::fitHodo
void fitHodo(float &x, float &xQuality, const int &ipl, const int &nclus, const std::vector< int > &xclus, const std::vector< int > &wclus) const
Definition: EcalTBHodoscopeRecInfoAlgo.cc:31
EcalTBHodoscopeRecInfoAlgo::reconstruct
EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo &hodoscopeRawInfo) const
Definition: EcalTBHodoscopeRecInfoAlgo.cc:97
EcalTBHodoscopeRecInfoAlgo::BeamTrack::xS
float xS
Definition: EcalTBHodoscopeRecInfoAlgo.h:31
EcalTBHodoscopeRecInfoAlgo::EcalTBHodoscopeRecInfoAlgo
EcalTBHodoscopeRecInfoAlgo()
EcalTBHodoscopeRecInfoAlgo::BeamTrack::x
float x
Definition: EcalTBHodoscopeRecInfoAlgo.h:30
EcalTBHodoscopeRecInfoAlgo::BeamTrack::BeamTrack
BeamTrack(float x0, float xs, float xq)
Definition: EcalTBHodoscopeRecInfoAlgo.h:36
EcalTBHodoscopeRecInfoAlgo::BeamTrack::~BeamTrack
~BeamTrack()
Definition: EcalTBHodoscopeRecInfoAlgo.h:38
EcalTBHodoscopeRecInfoAlgo::~EcalTBHodoscopeRecInfoAlgo
~EcalTBHodoscopeRecInfoAlgo()
Definition: EcalTBHodoscopeRecInfoAlgo.h:19
EcalTBHodoscopeRecInfoAlgo::zPosition_
std::vector< double > zPosition_
Definition: EcalTBHodoscopeRecInfoAlgo.h:70