#include <SimpleJetDump.h>
Public Member Functions | |
SimpleJetDump (const edm::ParameterSet &) | |
Private Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &) |
void | beginJob () |
void | endJob () |
Private Attributes | |
std::string | CaloJetAlg |
int | evtCount |
std::string | GenJetAlg |
Definition at line 13 of file SimpleJetDump.h.
SimpleJetDump::SimpleJetDump | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 26 of file SimpleJetDump.cc.
: CaloJetAlg( cfg.getParameter<string>( "CaloJetAlg" ) ), GenJetAlg( cfg.getParameter<string>( "GenJetAlg" ) ) { }
void SimpleJetDump::analyze | ( | const edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 36 of file SimpleJetDump.cc.
References CaloJetAlg, gather_cfg::cout, evtCount, GenJetAlg, edm::Event::getByLabel(), and metsig::jet.
{ int jetInd; Handle<CaloJetCollection> caloJets; Handle<GenJetCollection> genJets; //Find the CaloTowers in leading CaloJets evt.getByLabel( CaloJetAlg, caloJets ); evt.getByLabel( GenJetAlg, genJets ); cout << endl << "Evt: "<<evtCount <<", Num Calo Jets=" <<caloJets->end() - caloJets->begin() << ", Num Gen Jets=" <<genJets->end() - genJets->begin() <<endl; cout <<" *********************************************************" <<endl; jetInd = 0; for( CaloJetCollection::const_iterator jet = caloJets->begin(); jet != caloJets->end(); ++ jet ) { cout <<"Calo Jet: "<<jetInd<<", pt="<<jet->pt()<<", eta="<<jet->eta()<<", phi="<<jet->phi() <<endl; jetInd++; } cout <<" *********************************************************" <<endl; jetInd = 0; for( GenJetCollection::const_iterator jet = genJets->begin(); jet != genJets->end(); ++ jet ) { cout <<"Gen Jet: "<<jetInd<<", pt="<<jet->pt()<<", eta="<<jet->eta()<<", phi="<<jet->phi() <<endl; jetInd++; } evtCount++; cout <<" *********************************************************" <<endl; }
void SimpleJetDump::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 32 of file SimpleJetDump.cc.
References evtCount.
{ evtCount = 0; }
void SimpleJetDump::endJob | ( | void | ) | [private, virtual] |
std::string SimpleJetDump::CaloJetAlg [private] |
Definition at line 21 of file SimpleJetDump.h.
Referenced by analyze().
int SimpleJetDump::evtCount [private] |
Definition at line 23 of file SimpleJetDump.h.
Referenced by analyze(), and beginJob().
std::string SimpleJetDump::GenJetAlg [private] |
Definition at line 21 of file SimpleJetDump.h.
Referenced by analyze().