Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-31 23:13:56

0001 #ifndef DTSegmentAnalysisTest_H
0002 #define DTSegmentAnalysisTest_H
0003 
0004 /** \class DTSegmentAnalysisTest
0005  * *
0006  *  DQM Test Client
0007  *
0008  *  \author  G. Mila - 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 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0026 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0027 
0028 #include <memory>
0029 #include <iostream>
0030 #include <fstream>
0031 #include <string>
0032 #include <vector>
0033 #include <map>
0034 
0035 class DTGeometry;
0036 class DTChamberId;
0037 class DTSuperLayerId;
0038 
0039 class DTSegmentAnalysisTest : public DQMEDHarvester {
0040 public:
0041   /// Constructor
0042   DTSegmentAnalysisTest(const edm::ParameterSet &ps);
0043 
0044   /// Destructor
0045   ~DTSegmentAnalysisTest() override;
0046 
0047   void beginRun(const edm::Run &, const edm::EventSetup &) override;
0048 
0049   void bookHistos(DQMStore::IBooker &);
0050 
0051   /// Get the ME name
0052   std::string getMEName(const DTChamberId &chID, std::string histoTag);
0053 
0054   /// Perform client diagnostic operations
0055   void performClientDiagnostic(DQMStore::IGetter &);
0056 
0057 protected:
0058   void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
0059   void dqmEndLuminosityBlock(DQMStore::IBooker &,
0060                              DQMStore::IGetter &,
0061                              edm::LuminosityBlock const &,
0062                              edm::EventSetup const &) override;
0063 
0064   void dqmBeginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &);
0065 
0066 private:
0067   int nLSs;
0068   unsigned int nLumiSegs;
0069   // switch on for detailed analysis
0070   bool detailedAnalysis;
0071   int nMinEvts;
0072 
0073   int maxPhiHit;
0074   int maxPhiZHit;
0075 
0076   bool runOnline;
0077 
0078   bool bookingdone;
0079 
0080   edm::ParameterSet parameters;
0081   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0082   const DTGeometry *muonGeom;
0083 
0084   // the histograms
0085   std::map<std::pair<int, int>, MonitorElement *> chi2Histos;
0086   std::map<std::pair<int, int>, MonitorElement *> segmRecHitHistos;
0087   std::map<int, MonitorElement *> summaryHistos;
0088   // top folder for the histograms in DQMStore
0089   std::string topHistoFolder;
0090 };
0091 
0092 #endif