#include <PhysicsTools/StarterKit/plugins/PatAnalyzerKit.cc>
Public Member Functions | |
PatAnalyzerKit (const edm::ParameterSet &) | |
virtual | ~PatAnalyzerKit () |
Protected Member Functions | |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Protected Attributes | |
edm::Handle< std::vector < pat::Electron > > | electronHandle_ |
pat::PatKitHelper | helper_ |
edm::Handle< std::vector < pat::Jet > > | jetHandle_ |
edm::Handle< std::vector < pat::MET > > | METHandle_ |
edm::Handle< std::vector < pat::Muon > > | muonHandle_ |
edm::Handle< std::vector < pat::Photon > > | photonHandle_ |
edm::Handle< std::vector < pat::Tau > > | tauHandle_ |
int | verboseLevel_ |
This is an ED analyzer which creates and fills a bunch of histograms of various physics quantities. However, in order to make this also work in FWLite, most of the actual work is performed by another object called PhysicsHistograms, to which this ED analyzer delegates most of the work, except the interactions with EDM and Framework, like:
Definition at line 78 of file PatAnalyzerKit.h.
PatAnalyzerKit::PatAnalyzerKit | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 10 of file PatAnalyzerKit.cc.
References pat::PatKitHelper::bookHistos(), and helper_.
00011 : 00012 verboseLevel_(0), 00013 helper_(iConfig) 00014 { 00015 helper_.bookHistos(this); 00016 }
PatAnalyzerKit::~PatAnalyzerKit | ( | ) | [virtual] |
void PatAnalyzerKit::beginJob | ( | const edm::EventSetup & | ) | [protected, virtual] |
void PatAnalyzerKit::produce | ( | edm::Event & | evt, | |
const edm::EventSetup & | es | |||
) | [protected, virtual] |
Implements edm::EDProducer.
Definition at line 30 of file PatAnalyzerKit.cc.
References GenMuonPlsPt100GeV_cfg::cout, electronHandle_, lat::endl(), pat::PatKitHelper::fillHistograms(), pat::PatKitHelper::getHandles(), helper_, jetHandle_, METHandle_, muonHandle_, photonHandle_, std, tauHandle_, and verboseLevel_.
00031 { 00032 using namespace edm; 00033 using namespace std; 00034 00035 if ( verboseLevel_ > 10 ) 00036 std::cout << "PatAnalyzerKit:: in analyze()." << std::endl; 00037 00038 // -------------------------------------------------- 00039 // Step 1: Retrieve objects from data stream 00040 // -------------------------------------------------- 00041 helper_.getHandles( evt, 00042 muonHandle_, 00043 electronHandle_, 00044 tauHandle_, 00045 jetHandle_, 00046 METHandle_, 00047 photonHandle_); 00048 00049 00050 00051 // -------------------------------------------------- 00052 // Step 2: invoke PhysicsHistograms to deal with all this. 00053 // 00054 // Note that each handle will dereference into a vector<>, 00055 // however the fillCollection() method takes a reference, 00056 // so the collections are not copied... 00057 // -------------------------------------------------- 00058 if ( verboseLevel_ > 10 ) 00059 std::cout << "PatAnalyzerKit::analyze: calling fillCollection()." << std::endl; 00060 helper_.fillHistograms( evt, 00061 muonHandle_, 00062 electronHandle_, 00063 tauHandle_, 00064 jetHandle_, 00065 METHandle_, 00066 photonHandle_); 00067 }
edm::Handle<std::vector<pat::Electron> > PatAnalyzerKit::electronHandle_ [protected] |
pat::PatKitHelper PatAnalyzerKit::helper_ [protected] |
edm::Handle<std::vector<pat::Jet> > PatAnalyzerKit::jetHandle_ [protected] |
edm::Handle<std::vector<pat::MET> > PatAnalyzerKit::METHandle_ [protected] |
edm::Handle<std::vector<pat::Muon> > PatAnalyzerKit::muonHandle_ [protected] |
edm::Handle<std::vector<pat::Photon> > PatAnalyzerKit::photonHandle_ [protected] |
edm::Handle<std::vector<pat::Tau> > PatAnalyzerKit::tauHandle_ [protected] |
int PatAnalyzerKit::verboseLevel_ [protected] |