#include <IOMC/HepMGProductAnalyzer/src/HepMGProductAnalyzer.cc>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
HepMGProductAnalyzer (const edm::ParameterSet &) | |
void | printTable (HepMC::GenEvent *event) |
~HepMGProductAnalyzer () | |
Private Attributes | |
std::string | label_ |
This version has an additional method to print a table of particles and their decay products.
Definition at line 36 of file HepMGProductAnalyzer.h.
HepMGProductAnalyzer::HepMGProductAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 4 of file HepMGProductAnalyzer.cc.
00004 : label_(iConfig.getUntrackedParameter("moduleLabel",std::string("source"))) {}
HepMGProductAnalyzer::~HepMGProductAnalyzer | ( | ) |
void HepMGProductAnalyzer::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 8 of file HepMGProductAnalyzer.cc.
References edm::Event::getByLabel(), and label_.
00008 { 00009 edm::Handle<edm::HepMCProduct> evt; 00010 // iEvent.getByType(evt); 00011 iEvent.getByLabel(label_,evt); 00012 00013 //Print out the HepMCProduct 00014 evt->GetEvent()->print(); 00015 00016 //To print out status code, pdg, mass, etc table uncomment below 00017 // HepMC::GenEvent * myGenEvent = new HepMC::GenEvent(*(evt->GetEvent())); 00018 // this->printTable(myGenEvent); 00019 }
void HepMGProductAnalyzer::printTable | ( | HepMC::GenEvent * | event | ) |
Definition at line 21 of file HepMGProductAnalyzer.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00021 { 00022 // this method is outdated, use print() method of GenEvent instead 00023 std::cout<<std::endl; 00024 std::cout<<"Barcode: Pgd: Status: Mother:"<<std::endl; 00025 /* 00026 for ( HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin(); 00027 p != myGenEvent->particles_end(); ++p) { 00028 std::cout<<" "<<(*p)->barcode()<<" "<<(*p)->pdg_id()<<" "<<(*p)->status()<<" "<<(*p)->Mother()<<std::endl; 00029 } 00030 */ 00031 }
std::string HepMGProductAnalyzer::label_ [private] |