CMS 3D CMS Logo

SimpleJetDump Class Reference

#include <RecoJets/JetAnalyzers/interface/SimpleJetDump.h>

Inheritance diagram for SimpleJetDump:

edm::EDAnalyzer

List of all members.

Public Member Functions

 SimpleJetDump (const edm::ParameterSet &)

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
void beginJob (const edm::EventSetup &)
void endJob ()

Private Attributes

std::string CaloJetAlg
int evtCount
std::string GenJetAlg


Detailed Description

Definition at line 13 of file SimpleJetDump.h.


Constructor & Destructor Documentation

SimpleJetDump::SimpleJetDump ( const edm::ParameterSet cfg  ) 

Definition at line 26 of file SimpleJetDump.cc.

00026                                                        :  
00027   CaloJetAlg( cfg.getParameter<string>( "CaloJetAlg" ) ),
00028   GenJetAlg( cfg.getParameter<string>( "GenJetAlg" ) )  
00029   {
00030 }


Member Function Documentation

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, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), evtCount, GenJetAlg, edm::Event::getByLabel(), and metsig::jet.

00036                                                                     {
00037 
00038   int jetInd;
00039   Handle<CaloJetCollection> caloJets;
00040   Handle<GenJetCollection> genJets;
00041    
00042   //Find the CaloTowers in leading CaloJets
00043   evt.getByLabel( CaloJetAlg, caloJets );
00044   evt.getByLabel( GenJetAlg, genJets );
00045     
00046   cout << endl << "Evt: "<<evtCount <<", Num Calo Jets=" <<caloJets->end() - caloJets->begin() << ", Num Gen Jets=" <<genJets->end() - genJets->begin() <<endl;
00047   cout <<"   *********************************************************" <<endl;
00048   jetInd = 0;
00049   for( CaloJetCollection::const_iterator jet = caloJets->begin(); jet != caloJets->end(); ++ jet ) {
00050     cout <<"Calo Jet: "<<jetInd<<", pt="<<jet->pt()<<", eta="<<jet->eta()<<", phi="<<jet->phi() <<endl;
00051     jetInd++;
00052   }
00053   cout <<"   *********************************************************" <<endl;
00054   jetInd = 0;
00055   for( GenJetCollection::const_iterator jet = genJets->begin(); jet != genJets->end(); ++ jet ) {
00056     cout <<"Gen Jet: "<<jetInd<<", pt="<<jet->pt()<<", eta="<<jet->eta()<<", phi="<<jet->phi() <<endl;
00057     jetInd++;
00058   }
00059   evtCount++;    
00060   cout <<"   *********************************************************" <<endl;
00061 
00062 }

void SimpleJetDump::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 32 of file SimpleJetDump.cc.

References evtCount.

00032                                                  {
00033   evtCount = 0;
00034 }

void SimpleJetDump::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file SimpleJetDump.cc.

00064                            {
00065 
00066 
00067 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:39 2009 for CMSSW by  doxygen 1.5.4