Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:51

0001 #ifndef DQMOffline_Trigger_HLTMuonMatchAndPlotContainer_H
0002 #define DQMOffline_Trigger_HLTMuonMatchAndPlotContainer_H
0003 
0004 /** \class HLTMuonMatchAndPlot
0005  *  Contanier class to handle vector of reconstructed muons matched to 
0006  *  HLT objects used to plot efficiencies.
0007  *
0008  *  Note that this is not a true EDAnalyzer; rather, the intent is that one
0009  *  EDAnalyzer would call an instance  of HLTMuonMatchAndPlotContainer
0010  *
0011  *  Documentation available on the CMS TWiki:
0012  *  https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLTOfflinePerformance
0013  *
0014  *  
0015  *  \author  C. Battilana
0016  */
0017 
0018 // Base Class Headers
0019 
0020 #include "FWCore/Framework/interface/Event.h"
0021 #include "FWCore/Framework/interface/MakerMacros.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 #include "FWCore/Framework/interface/ConsumesCollector.h"
0024 
0025 #include "DQMOffline/Trigger/interface/HLTMuonMatchAndPlot.h"
0026 
0027 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0028 #include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
0029 #include "DataFormats/Common/interface/TriggerResults.h"
0030 #include "DataFormats/MuonReco/interface/Muon.h"
0031 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0032 #include "DataFormats/VertexReco/interface/Vertex.h"
0033 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0034 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0035 #include "DataFormats/Math/interface/deltaR.h"
0036 
0037 #include <vector>
0038 #include <string>
0039 
0040 //////////////////////////////////////////////////////////////////////////////
0041 ///Container Class Definition (this is what is used by the DQM module) ///////
0042 
0043 class HLTMuonMatchAndPlotContainer {
0044 public:
0045   typedef dqm::legacy::DQMStore DQMStore;
0046   typedef dqm::legacy::MonitorElement MonitorElement;
0047 
0048   /// Constructor
0049   HLTMuonMatchAndPlotContainer(edm::ConsumesCollector &&, const edm::ParameterSet &);
0050 
0051   /// Destructor
0052   ~HLTMuonMatchAndPlotContainer() { plotters_.clear(); };
0053 
0054   /// Add a HLTMuonMatchAndPlot for a given path
0055   void addPlotter(const edm::ParameterSet &, std::string, std::string, bool);
0056 
0057   // Analyzer Methods
0058   void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
0059   void analyze(const edm::Event &, const edm::EventSetup &);
0060   void endRun(const edm::Run &, const edm::EventSetup &);
0061 
0062 private:
0063   std::vector<HLTMuonMatchAndPlot> plotters_;
0064 
0065   edm::EDGetTokenT<reco::BeamSpot> bsToken_;
0066   edm::EDGetTokenT<reco::MuonCollection> muonToken_;
0067   edm::EDGetTokenT<reco::VertexCollection> pvToken_;
0068 
0069   edm::EDGetTokenT<trigger::TriggerEvent> trigSummaryToken_;
0070   edm::EDGetTokenT<edm::TriggerResults> trigResultsToken_;
0071 };
0072 
0073 #endif