Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:54:13

0001 #ifndef DTTriggerEfficiencyTest_H
0002 #define DTTriggerEfficiencyTest_H
0003 
0004 /** \class DTTriggerEfficiencyTest
0005  * *
0006  *  DQM Test Client
0007  *
0008  *  \author  C. Battilana - CIEMAT
0009  *
0010  *  threadsafe version (//-) oct/nov 2014 - WATWanAbdullah -ncpp-um-my
0011  *
0012  *   
0013  */
0014 
0015 #include "DQM/DTMonitorClient/src/DTLocalTriggerBaseTest.h"
0016 
0017 #include <string>
0018 
0019 class DTTrigGeomUtils;
0020 
0021 class DTTriggerEfficiencyTest : public DTLocalTriggerBaseTest {
0022 public:
0023   /// Constructor
0024   DTTriggerEfficiencyTest(const edm::ParameterSet& ps);
0025 
0026   /// Destructor
0027   ~DTTriggerEfficiencyTest() override;
0028 
0029 protected:
0030   /// Compute 1D/2D efficiency plots
0031   void makeEfficiencyME(TH2F* numerator,
0032                         TH2F* denominator,
0033                         MonitorElement* result2DWh,
0034                         MonitorElement* result1DWh,
0035                         MonitorElement* result1D);
0036 
0037   /// Compute 2D efficiency plots
0038   void makeEfficiencyME(TH2F* numerator, TH2F* denominator, MonitorElement* result2DWh);
0039 
0040   /// Book the new MEs (global)
0041   void bookHistos(DQMStore::IBooker& ibooker, std::string hTag, std::string folder);
0042 
0043   /// Book the new MEs (for each wheel)
0044   void bookWheelHistos(DQMStore::IBooker& ibooker, int wheel, std::string hTag, std::string folder);
0045 
0046   /// Book the new MEs (for each chamber)
0047   void bookChambHistos(DQMStore::IBooker& ibooker, DTChamberId chambId, std::string htype, std::string folder = "");
0048 
0049   /// Get the ME name (by wheel)
0050   std::string getMEName(std::string histoTag, std::string folder, int wh);
0051 
0052   /// BeginRun
0053   void beginRun(const edm::Run& r, const edm::EventSetup& c) override;
0054 
0055   /// DQM Client Diagnostic
0056   void runClientDiagnostic(DQMStore::IBooker&, DQMStore::IGetter&) override;
0057   void Bookings(DQMStore::IBooker&, DQMStore::IGetter&);
0058 
0059 private:
0060   std::map<std::string, MonitorElement*> globalEffDistr;
0061   std::map<int, std::map<std::string, MonitorElement*> > EffDistrPerWh;
0062   std::map<uint32_t, std::map<std::string, MonitorElement*> > chambME;
0063   DTTrigGeomUtils* trigGeomUtils;
0064   bool detailedPlots;
0065 
0066   bool bookingdone;
0067 };
0068 
0069 #endif