CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/PhysicsTools/PatExamples/plugins/PatTriggerAnalyzer.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_PatExamples_PatTriggerAnalyzer_h
00002 #define PhysicsTools_PatExamples_PatTriggerAnalyzer_h
00003 
00004 #include <map>
00005 #include <string>
00006 
00007 #include "TH1D.h"
00008 #include "TH2D.h"
00009 
00010 #include "FWCore/Framework/interface/Event.h"
00011 #include "FWCore/Utilities/interface/InputTag.h"
00012 #include "FWCore/Framework/interface/EDAnalyzer.h"
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "DataFormats/PatCandidates/interface/Muon.h"
00016 #include "DataFormats/PatCandidates/interface/TriggerEvent.h"
00017 
00018 
00019 class PatTriggerAnalyzer : public edm::EDAnalyzer {
00020   
00021  public:
00023   explicit PatTriggerAnalyzer( const edm::ParameterSet & iConfig );
00025   ~PatTriggerAnalyzer();
00026   
00027  private:
00029   virtual void beginJob();
00031   virtual void analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup );
00033   virtual void endJob();
00034 
00036   edm::InputTag trigger_;
00038   edm::InputTag triggerEvent_;
00040   edm::InputTag muons_;
00042   std::string   muonMatch_;
00044   unsigned minID_;
00046   unsigned maxID_;
00047   
00049   std::map< std::string, TH1D* > histos1D_;
00050   std::map< std::string, TH2D* > histos2D_;
00051   
00053   std::map< unsigned, unsigned > sumN_;
00054   std::map< unsigned, double >   sumPt_;
00055 };
00056 
00057 #endif