CMS 3D CMS Logo

PdfAnalyzer.cc

Go to the documentation of this file.
00001 #include "GeneratorInterface/MadGraphInterface/interface/PdfAnalyzer.h"
00002 
00003 PdfAnalyzer::PdfAnalyzer(const edm::ParameterSet& iConfig) { }
00004 PdfAnalyzer::~PdfAnalyzer() { }
00005 void PdfAnalyzer::beginJob(const edm::EventSetup&) { }
00006 void PdfAnalyzer::endJob() { }
00007 
00008 void PdfAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
00009    using namespace edm; using namespace std;
00010 
00011    Handle<HepMCProduct> evt; iEvent.getByType(evt);
00012 
00013    const HepMC::GenEvent * genEvt = evt->GetEvent(); //   genEvt->print();
00014 
00015    // NOT STORED!
00016    HepMC::PdfInfo* pdfstuff = genEvt->pdf_info();
00017    if (pdfstuff != 0) cout << "Momentum of first incoming parton:  (id/flavour = " << pdfstuff->id1() << ")  " <<  pdfstuff->x1() << endl
00018         << "Momentum of second incoming parton: (id/flavour = " << pdfstuff->id2() << ")  " <<  pdfstuff->x2() << endl
00019         << "Scale = " << pdfstuff->scalePDF() << endl;
00020    else cout << "PDFstuff not set!" << endl;
00021 }
00022 

Generated on Tue Jun 9 17:37:08 2009 for CMSSW by  doxygen 1.5.4