Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:03

0001 #ifndef DTChamberEfficiencyClient_H
0002 #define DTChamberEfficiencyClient_H
0003 
0004 /** \class DTChamberEfficiencyClient
0005  * *
0006  *  DQM Test Client
0007  *
0008  *  \author  M. Pelliccioni - INFN Torino
0009  *
0010  *  threadsafe version (//-) oct/nov 2014 - WATWanAbdullah ncpp-um-my
0011  *
0012  *   
0013  */
0014 
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/LuminosityBlock.h"
0022 
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "FWCore/ServiceRegistry/interface/Service.h"
0025 
0026 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0027 
0028 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0029 
0030 #include <memory>
0031 #include <iostream>
0032 #include <fstream>
0033 #include <string>
0034 #include <vector>
0035 #include <map>
0036 
0037 class DTGeometry;
0038 class DTChamberId;
0039 class DTLayerId;
0040 
0041 class DTChamberEfficiencyClient : public DQMEDHarvester {
0042 public:
0043   /// Constructor
0044   DTChamberEfficiencyClient(const edm::ParameterSet &ps);
0045 
0046   /// Destructor
0047   ~DTChamberEfficiencyClient() override;
0048 
0049 protected:
0050   void beginRun(const edm::Run &, const edm::EventSetup &) override;
0051   void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
0052 
0053   /// book the report summary
0054 
0055   void bookHistos(DQMStore::IBooker &);
0056   void dqmEndLuminosityBlock(DQMStore::IBooker &,
0057                              DQMStore::IGetter &,
0058                              edm::LuminosityBlock const &,
0059                              edm::EventSetup const &) override;
0060 
0061 private:
0062   unsigned int nLumiSegs;
0063   int prescaleFactor;
0064 
0065   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0066   const DTGeometry *muonGeom;
0067 
0068   //an histogram of efficiency for each wheel, for each quality scenario
0069   MonitorElement *summaryHistos[5][2];
0070   MonitorElement *globalEffSummary;
0071 
0072   MonitorElement *globalEffDistr;
0073   std::map<int, MonitorElement *> EffDistrPerWh;
0074 };
0075 
0076 #endif