CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SimpleJetDump Class Reference

#include <SimpleJetDump.h>

Inheritance diagram for SimpleJetDump:
edm::EDAnalyzer edm::EDConsumerBase

List of all members.

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

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.

                                                       :  
  CaloJetAlg( cfg.getParameter<string>( "CaloJetAlg" ) ),
  GenJetAlg( cfg.getParameter<string>( "GenJetAlg" ) )  
  {
}

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, FamosSequences_cff::caloJets, 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]

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file SimpleJetDump.cc.

                           {


}

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