CMS 3D CMS Logo

EgHLTMonElemMgrEBEE.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTMONELEMMGREBEE
2 #define DQMOFFLINE_TRIGGER_EGHLTMONELEMMGREBEE
3 
4 //struct: MonElemMgrEBEE (Monitor Element Manger Barrel and Endcap)
5 //
6 //author: Sam Harper (July 2008)
7 //
8 //WARNING: interface is NOT final, please dont use this class for now without clearing it with me
9 // as I will change it and possibly break all your code
10 //
11 //aim: a monitor element which seperates transparently the objects into barrel and endcap
12 //
13 //implimentation: class simply has two MonElemMangers, one for endcap electrons, one for barrel electrons
14 // and fills them approprately. It assumes that the class passed in has a detEta function
15 // and uses 1.5 as the barrel,endcap descriminate
16 //
17 //
18 
19 #include <cmath>
20 
22 
23 namespace egHLT {
24  template <class T, typename varType>
25  class MonElemMgrEBEE : public MonElemManagerBase<T> {
26  private:
29 
30  public:
32  const std::string& name,
33  const std::string& title,
34  int nrBins,
35  float min,
36  float max,
37  varType (T::*varFunc)() const)
38  : barrel_(iBooker, name + "_eb", "Barrel " + title, nrBins, min, max, varFunc),
39  endcap_(iBooker, name + "_ee", "Endcap " + title, nrBins, min, max, varFunc) {}
40 
41  ~MonElemMgrEBEE() override = default;
42 
43  void fill(const T& obj, float weight) override;
44  };
45 
46  template <class T, typename varType>
48  if (std::fabs(obj.detEta()) < 1.5)
49  barrel_.fill(obj, weight);
50  else
51  endcap_.fill(obj, weight);
52  }
53 
54  template <class T, typename varTypeX, typename varTypeY>
56  private:
59 
60  public:
62  const std::string& name,
63  const std::string& title,
64  int nrBinsX,
65  double xMin,
66  double xMax,
67  int nrBinsY,
68  double yMin,
69  double yMax,
70  varTypeX (T::*varFuncX)() const,
71  varTypeY (T::*varFuncY)() const)
72  : barrel_(
73  iBooker, name + "_eb", "Barrel " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY),
74  endcap_(
75  iBooker, name + "_ee", "Endcap " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY) {}
76 
77  ~MonElemMgr2DEBEE() = default;
78 
79  void fill(const T& obj, float weight);
80  };
81 
82  template <class T, typename varTypeX, typename varTypeY>
84  if (fabs(obj.detEta()) < 1.5)
85  barrel_.fill(obj, weight);
86  else
87  endcap_.fill(obj, weight);
88  }
89 } // namespace egHLT
90 #endif
egHLT::MonElemMgr2DEBEE::fill
void fill(const T &obj, float weight)
Definition: EgHLTMonElemMgrEBEE.h:83
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
egHLT::MonElemMgrEBEE::~MonElemMgrEBEE
~MonElemMgrEBEE() override=default
egHLT::MonElemMgrEBEE
Definition: EgHLTMonElemMgrEBEE.h:25
min
T min(T a, T b)
Definition: MathUtil.h:58
egHLT::MonElemMgr2DEBEE::barrel_
MonElemManager2D< T, varTypeX, varTypeY > barrel_
Definition: EgHLTMonElemMgrEBEE.h:57
photonAnalyzer_cfi.yMin
yMin
Definition: photonAnalyzer_cfi.py:86
photonAnalyzer_cfi.xMin
xMin
Definition: photonAnalyzer_cfi.py:82
egHLT::MonElemMgr2DEBEE::endcap_
MonElemManager2D< T, varTypeX, varTypeY > endcap_
Definition: EgHLTMonElemMgrEBEE.h:58
egHLT::MonElemManager
Definition: EgHLTMonElemManager.h:101
egHLT::MonElemManagerBase
Definition: EgHLTMonElemManager.h:33
egHLT::MonElemMgrEBEE::fill
void fill(const T &obj, float weight) override
Definition: EgHLTMonElemMgrEBEE.h:47
multiplicitycorr_cfi.yMax
yMax
Definition: multiplicitycorr_cfi.py:6
dumpRecoGeometry_cfg.varType
varType
Definition: dumpRecoGeometry_cfg.py:8
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
egHLT::MonElemMgrEBEE::endcap_
MonElemManager< T, varType > endcap_
Definition: EgHLTMonElemMgrEBEE.h:28
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
egHLT::MonElemMgrEBEE::MonElemMgrEBEE
MonElemMgrEBEE(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, int nrBins, float min, float max, varType(T::*varFunc)() const)
Definition: EgHLTMonElemMgrEBEE.h:31
egHLT::MonElemMgr2DEBEE::~MonElemMgr2DEBEE
~MonElemMgr2DEBEE()=default
egHLT::MonElemManager2D
Definition: EgHLTMonElemManager.h:134
egHLT::MonElemManager2D::fill
void fill(const T &obj, float weight) override
Definition: EgHLTMonElemManager.h:165
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
egHLT::MonElemManager::fill
void fill(const T &obj, float weight) override
Definition: EgHLTMonElemManager.h:125
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
multiplicitycorr_cfi.xMax
xMax
Definition: multiplicitycorr_cfi.py:5
dqm::implementation::IBooker
Definition: DQMStore.h:43
egHLT::MonElemMgrEBEE::barrel_
MonElemManager< T, varType > barrel_
Definition: EgHLTMonElemMgrEBEE.h:27
egHLT
Definition: EgHLTBinData.h:10
egHLT::MonElemMgr2DEBEE
Definition: EgHLTMonElemMgrEBEE.h:55
EgHLTMonElemManager.h
weight
Definition: weight.py:1
egHLT::MonElemMgr2DEBEE::MonElemMgr2DEBEE
MonElemMgr2DEBEE(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)
Definition: EgHLTMonElemMgrEBEE.h:61