Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-25 23:39:58

0001 #ifndef SiPixelPhase1Summary_SiPixelPhase1Summary_h
0002 #define SiPixelPhase1Summary_SiPixelPhase1Summary_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SiPixelPhase1Summary
0006 // Class  :     SiPixelPhase1Summary
0007 //
0008 /**
0009 
0010  Description: Summary map generation for the Phase 1 pixel
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Duncan Leggat
0018 //         Created:  2nd December 2016
0019 //
0020 
0021 //#include <memory>
0022 
0023 // user include files
0024 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0025 #include "DQMServices/Core/interface/DQMStore.h"
0026 #include "DataFormats/Common/interface/Handle.h"
0027 #include "FWCore/Framework/interface/ESHandle.h"
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/Framework/interface/EventSetup.h"
0030 #include "FWCore/Framework/interface/Frameworkfwd.h"
0031 #include "FWCore/Framework/interface/LuminosityBlock.h"
0032 #include "FWCore/Framework/interface/MakerMacros.h"
0033 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0034 
0035 class SiPixelPhase1Summary : public DQMEDHarvester {
0036 public:
0037   explicit SiPixelPhase1Summary(const edm::ParameterSet& conf);
0038   ~SiPixelPhase1Summary() override;
0039 
0040   //       virtual void analyze(const edm::Event&, const edm::EventSetup&);
0041   //void dqmBeginRun(const edm::Run&, edm::EventSetup const&) ;
0042   //virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0043 protected:
0044   void beginRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
0045 
0046   void dqmEndLuminosityBlock(DQMStore::IBooker& iBooker,
0047                              DQMStore::IGetter& iGetter,
0048                              edm::LuminosityBlock const& lumiSeg,
0049                              edm::EventSetup const& c) override;
0050   //(edm::LuminosityBlock const&, edm::EventSetup const&) override;
0051   void dqmEndJob(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter) override;
0052   //       virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
0053 
0054   std::string topFolderName_;
0055   bool runOnEndLumi_;
0056   bool runOnEndJob_;
0057 
0058 private:
0059   enum trendPlots { offline, fpix, bpix, layer1, layer2, layer3, layer4, ring1, ring2 };
0060   edm::ParameterSet conf_;
0061   edm::InputTag src_;
0062   bool firstLumi;
0063 
0064   std::map<std::string, MonitorElement*> summaryMap_;
0065   MonitorElement* deadROCSummary;
0066   MonitorElement* reportSummary;  //Float value of the average of the ins in the grand summary
0067 
0068   std::map<std::string, std::string> summaryPlotName_;
0069 
0070   //The dead and innefficient roc trend plot
0071   std::map<trendPlots, MonitorElement*> deadROCTrends_;
0072   std::map<trendPlots, MonitorElement*> ineffROCTrends_;
0073 
0074   //Error thresholds for the dead ROC plots
0075   std::vector<double> deadRocThresholds_;
0076   std::vector<double> deadRocWarnThresholds_;
0077 
0078   //book the summary plots
0079   void bookSummaries(DQMStore::IBooker& iBooker);
0080 
0081   //Book trend plots
0082   void bookTrendPlots(DQMStore::IBooker& iBooker);
0083 
0084   void fillSummaries(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter);
0085 
0086   void fillTrendPlots(DQMStore::IBooker& iBooker, DQMStore::IGetter& iGetter, int lumiSeg = 0);
0087 };
0088 
0089 #endif