CMS 3D CMS Logo

EgHLTMonElemMgrHEP.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
2 #define DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
3 
4 
6 
7 namespace egHLT {
8  template<class T,typename varType> class MonElemMgrHEP : public MonElemManagerBase<T>{
9  private:
12 
13  public:
14  MonElemMgrHEP(DQMStore::IBooker &iBooker, const std::string& name,const std::string& title,int nrBins,float min,float max,varType (T::*varFunc)()const):
15  hep17_(iBooker, name+"_hep17","hep "+title,nrBins,min,max,varFunc),
16  hem17_(iBooker, name+"_hem17","hem "+title,nrBins,min,max,varFunc){}
17 
18  ~MonElemMgrHEP() override{}
19 
20  void fill(const T& obj,float weight) override;
21 
22  };
23 
24  template<class T,typename varType> void MonElemMgrHEP<T,varType>::fill(const T& obj,float weight)
25  {
26  if(obj.detEta()<3.0 && obj.detEta()>1.3 && obj.phi()< -0.52 && obj.phi()>-0.87) hep17_.fill(obj,weight);
27  if(obj.detEta()>-3.0 && obj.detEta()<-1.3 && obj.phi()< -0.52 && obj.phi() >-0.87) hem17_.fill(obj,weight);
28  }
29 
30 
31 
32 
33 
34  template<class T,typename varTypeX,typename varTypeY> class MonElemMgr2DHEP : public MonElemManagerBase<T>{
35 
36  private:
39 
40  public:
41  MonElemMgr2DHEP(DQMStore::IBooker &iBooker, const std::string& name,const std::string& title,int nrBinsX,double xMin,double xMax,int nrBinsY,double yMin,double yMax,
42  varTypeX (T::*varFuncX)()const,varTypeY (T::*varFuncY)()const):
43  hep17_(iBooker, name+"_hep17","Hep17 "+title,nrBinsX,xMin,xMax,nrBinsY,yMin,yMax,varFuncX,varFuncY),
44  hem17_(iBooker, name+"_hem17","Hem17 "+title,nrBinsX,xMin,xMax,nrBinsY,yMin,yMax,varFuncX,varFuncY){}
45 
47 
48  void fill(const T& obj,float weight);
49 
50  };
51 
52  template<class T,typename varTypeX,typename varTypeY> void MonElemMgr2DHEP<T,varTypeX,varTypeY>::fill(const T& obj,float weight)
53  {
54  if(obj.detEta()<3.0 && obj.detEta()>1.3 && obj.phi()< -0.52 && obj.phi()>-0.87) hep17_.fill(obj,weight);
55  if(obj.detEta()>-3.0 && obj.detEta()<-1.3 && obj.phi()< -0.52 && obj.phi() >-0.87) hem17_.fill(obj,weight);
56  }
57 }
58 #endif
59 
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)
void fill(const T &obj, float weight) override
MonElemManager2D< T, varTypeX, varTypeY > hep17_
MonElemManager< T, varType > hep17_
Definition: weight.py:1
MonElemManager2D< T, varTypeX, varTypeY > hem17_
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)
void fill(const T &obj, float weight) override
long double T