Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:19

0001 // -*- c++ -*-
0002 // Offline DQM For Tau HLT
0003 #ifndef DQMOffline_Trigger_HLTTauDQMOfflineSource_h
0004 #define DQMOffline_Trigger_HLTTauDQMOfflineSource_h
0005 
0006 #include "FWCore/Framework/interface/EDAnalyzer.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "DataFormats/Common/interface/Handle.h"
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "DataFormats/Common/interface/TriggerResults.h"
0012 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0013 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0014 
0015 //Plotters
0016 #include "DQMOffline/Trigger/interface/HistoWrapper.h"
0017 #include "DQMOffline/Trigger/interface/HLTTauDQML1Plotter.h"
0018 #include "DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h"
0019 #include "DQMOffline/Trigger/interface/HLTTauDQMPathSummaryPlotter.h"
0020 #include "DQMOffline/Trigger/interface/HLTTauDQMTagAndProbePlotter.h"
0021 
0022 #include "CommonTools/TriggerUtils/interface/GenericTriggerEventFlag.h"
0023 
0024 #include <regex>
0025 
0026 //
0027 // class declaration
0028 //
0029 
0030 class HLTTauDQMOfflineSource : public DQMEDAnalyzer {
0031 public:
0032   HLTTauDQMOfflineSource(const edm::ParameterSet&);
0033   ~HLTTauDQMOfflineSource() override;
0034 
0035 protected:
0036   void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
0037   void bookHistograms(DQMStore::IBooker& iBooker, const edm::Run& r, const edm::EventSetup& c) override;
0038   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0039 
0040 private:
0041   std::string hltProcessName_;
0042   edm::InputTag triggerResultsSrc_;
0043   edm::EDGetTokenT<edm::TriggerResults> triggerResultsToken_;
0044   edm::InputTag triggerEventSrc_;
0045   edm::EDGetTokenT<trigger::TriggerEvent> triggerEventToken_;
0046 
0047   // For path plotters
0048   const std::string pathRegex_;
0049   const int nPtBins_, nEtaBins_, nPhiBins_;
0050   const double ptMax_, highPtMax_, l1MatchDr_, hltMatchDr_;
0051   const std::string dqmBaseFolder_;
0052 
0053   HistoWrapper* iWrapper;
0054 
0055   HLTConfigProvider HLTCP_;
0056 
0057   //Reference
0058   bool doRefAnalysis_;
0059   struct RefObject {
0060     int objID;
0061     edm::EDGetTokenT<LVColl> token;
0062   };
0063   std::vector<RefObject> refObjects_;
0064   bool tagAndProbe_;
0065   std::vector<edm::ParameterSet> tagAndProbePaths;
0066 
0067   //DQM Prescaler
0068   int counterEvt_;         //counter
0069   const int prescaleEvt_;  //every n events
0070 
0071   // Plotters
0072   std::unique_ptr<HLTTauDQML1Plotter> l1Plotter_;
0073   std::vector<HLTTauDQMPathPlotter> pathPlotters_;
0074   std::unique_ptr<HLTTauDQMPathSummaryPlotter> pathSummaryPlotter_;
0075   std::vector<std::unique_ptr<HLTTauDQMTagAndProbePlotter> > tagandprobePlotters_;
0076 };
0077 
0078 #endif