Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DTNoiseAnalysisTest_H
0002 #define DTNoiseAnalysisTest_H
0003 
0004 /** \class DTNoiseAnalysisTest
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 "DQMServices/Core/interface/DQMStore.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0019 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0020 
0021 #include <iostream>
0022 #include <string>
0023 #include <map>
0024 
0025 class DTGeometry;
0026 class DTChamberId;
0027 class DTSuperLayerId;
0028 
0029 class DTNoiseAnalysisTest : public DQMEDHarvester {
0030 public:
0031   /// Constructor
0032   DTNoiseAnalysisTest(const edm::ParameterSet& ps);
0033 
0034   /// Destructor
0035   ~DTNoiseAnalysisTest() override;
0036 
0037 protected:
0038   /// BeginRun
0039   void beginRun(edm::Run const& run, edm::EventSetup const& context) override;
0040 
0041   /// book the summary histograms
0042 
0043   void bookHistos(DQMStore::IBooker&);
0044 
0045   /// DQM Client Diagnostic
0046   void dqmEndLuminosityBlock(DQMStore::IBooker&,
0047                              DQMStore::IGetter&,
0048                              edm::LuminosityBlock const&,
0049                              edm::EventSetup const&) override;
0050 
0051   void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;
0052 
0053 private:
0054   /// Get the ME name
0055   std::string getMEName(const DTChamberId& chID);
0056   std::string getSynchNoiseMEName(int wheelId) const;
0057 
0058   int nevents;
0059   int nMinEvts;
0060 
0061   bool bookingdone;
0062 
0063   // the dt geometry
0064   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0065   const DTGeometry* muonGeom;
0066 
0067   // paramaters from cfg
0068   int noisyCellDef;
0069 
0070   // wheel summary histograms
0071   std::map<int, MonitorElement*> noiseHistos;
0072   std::map<int, MonitorElement*> noisyCellHistos;
0073   MonitorElement* summaryNoiseHisto;
0074   MonitorElement* threshChannelsHisto;
0075   MonitorElement* summarySynchNoiseHisto;
0076   MonitorElement* glbSummarySynchNoiseHisto;
0077 
0078   bool doSynchNoise;
0079   bool detailedAnalysis;
0080   double maxSynchNoiseRate;
0081 };
0082 
0083 #endif