Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:17

0001 #ifndef DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
0002 #define DQMOFFLINE_TRIGGER_EGHLTMONELEMMGRHEP
0003 
0004 #include "DQMOffline/Trigger/interface/EgHLTMonElemManager.h"
0005 
0006 namespace egHLT {
0007   template <class T, typename varType>
0008   class MonElemMgrHEP : public MonElemManagerBase<T> {
0009   private:
0010     MonElemManager<T, varType> hep17_;
0011     MonElemManager<T, varType> hem17_;
0012 
0013   public:
0014     MonElemMgrHEP(DQMStore::IBooker& iBooker,
0015                   const std::string& name,
0016                   const std::string& title,
0017                   int nrBins,
0018                   float min,
0019                   float max,
0020                   varType (T::*varFunc)() const)
0021         : hep17_(iBooker, name + "_hep17", "hep " + title, nrBins, min, max, varFunc),
0022           hem17_(iBooker, name + "_hem17", "hem " + title, nrBins, min, max, varFunc) {}
0023 
0024     ~MonElemMgrHEP() override {}
0025 
0026     void fill(const T& obj, float weight) override;
0027   };
0028 
0029   template <class T, typename varType>
0030   void MonElemMgrHEP<T, varType>::fill(const T& obj, float weight) {
0031     if (obj.detEta() < 3.0 && obj.detEta() > 1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
0032       hep17_.fill(obj, weight);
0033     if (obj.detEta() > -3.0 && obj.detEta() < -1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
0034       hem17_.fill(obj, weight);
0035   }
0036 
0037   template <class T, typename varTypeX, typename varTypeY>
0038   class MonElemMgr2DHEP : public MonElemManagerBase<T> {
0039   private:
0040     MonElemManager2D<T, varTypeX, varTypeY> hep17_;
0041     MonElemManager2D<T, varTypeX, varTypeY> hem17_;
0042 
0043   public:
0044     MonElemMgr2DHEP(DQMStore::IBooker& iBooker,
0045                     const std::string& name,
0046                     const std::string& title,
0047                     int nrBinsX,
0048                     double xMin,
0049                     double xMax,
0050                     int nrBinsY,
0051                     double yMin,
0052                     double yMax,
0053                     varTypeX (T::*varFuncX)() const,
0054                     varTypeY (T::*varFuncY)() const)
0055         : hep17_(
0056               iBooker, name + "_hep17", "Hep17 " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY),
0057           hem17_(
0058               iBooker, name + "_hem17", "Hem17 " + title, nrBinsX, xMin, xMax, nrBinsY, yMin, yMax, varFuncX, varFuncY) {
0059     }
0060 
0061     ~MonElemMgr2DHEP() {}
0062 
0063     void fill(const T& obj, float weight);
0064   };
0065 
0066   template <class T, typename varTypeX, typename varTypeY>
0067   void MonElemMgr2DHEP<T, varTypeX, varTypeY>::fill(const T& obj, float weight) {
0068     if (obj.detEta() < 3.0 && obj.detEta() > 1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
0069       hep17_.fill(obj, weight);
0070     if (obj.detEta() > -3.0 && obj.detEta() < -1.3 && obj.phi() < -0.52 && obj.phi() > -0.87)
0071       hem17_.fill(obj, weight);
0072   }
0073 }  // namespace egHLT
0074 #endif