CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EgHLTMonElemMgrHEP.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
2 #define DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
3 
5 
6 namespace egHLT {
7  template <class T, typename varType>
8  class MonElemMgrHEP : public MonElemManagerBase<T> {
9  private:
12 
13  public:
15  const std::string& name,
16  const std::string& title,
17  int nrBins,
18  float min,
19  float max,
20  varType (T::*varFunc)() const)
21  : hep17_(iBooker, name + "_hep17", "hep " + title, nrBins, min, max, varFunc),
22  hem17_(iBooker, name + "_hem17", "hem " + title, nrBins, min, max, varFunc) {}
23 
24  ~MonElemMgrHEP() override {}
25 
26  void fill(const T& obj, float weight) override;
27  };
28 
29  template <class T, typename varType>
31  if (obj.detEta() < 3.0 && obj.detEta() > 1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
32  hep17_.fill(obj, weight);
33  if (obj.detEta() > -3.0 && obj.detEta() < -1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
34  hem17_.fill(obj, weight);
35  }
36 
37  template <class T, typename varTypeX, typename varTypeY>
38  class MonElemMgr2DHEP : public MonElemManagerBase<T> {
39  private:
42 
43  public:
45  const std::string& name,
46  const std::string& title,
47  int nrBinsX,
48  double xMin,
49  double xMax,
50  int nrBinsY,
51  double yMin,
52  double yMax,
53  varTypeX (T::*varFuncX)() const,
54  varTypeY (T::*varFuncY)() const)
55  : hep17_(
56  iBooker, name + "_hep17", "Hep17 " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY),
57  hem17_(
58  iBooker, name + "_hem17", "Hem17 " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY) {
59  }
60 
62 
63  void fill(const T& obj, float weight);
64  };
65 
66  template <class T, typename varTypeX, typename varTypeY>
68  if (obj.detEta() < 3.0 && obj.detEta() > 1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
69  hep17_.fill(obj, weight);
70  if (obj.detEta() > -3.0 && obj.detEta() < -1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
71  hem17_.fill(obj, weight);
72  }
73 } // namespace egHLT
74 #endif
MonElemManager2D< T, varTypeX, varTypeY > hep17_
MonElemManager< T, varType > hem17_
MonElemMgr2DHEP(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, int nrBinsX, double xMin, double xMax, int nrBinsY, double yMin, double yMax, varTypeX(T::*varFuncX)() const, varTypeY(T::*varFuncY)() const)
MonElemManager< T, varType > hep17_
MonElemMgrHEP(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, int nrBins, float min, float max, varType(T::*varFunc)() const)
void fill(const T &obj, float weight) override
T min(T a, T b)
Definition: MathUtil.h:58
void fill(const T &obj, float weight)
int weight
Definition: histoStyle.py:51
MonElemManager2D< T, varTypeX, varTypeY > hem17_
long double T