HepMC Reference Documentation

HepMC

PythiaHelper.h

Go to the documentation of this file.
00001 #ifndef PYTHIA_HELPER_H
00002 #define PYTHIA_HELPER_H
00004 // garren@fnal.gov, April 2007
00005 //
00006 // definitions needed by the pythia examples
00007 //
00009 #include "HepMC/PythiaWrapper.h"
00010 #include "HepMC/GenCrossSection.h"
00011 
00012 void initPythia();
00013 
00014 
00016 inline HepMC::GenCrossSection getPythiaCrossSection() {
00017 
00018   HepMC::GenCrossSection xsec;
00019   // xsec(0,2) contains the sum of differential cross sections in mb
00020   // ngen(0,2) contains the combined number of generated events
00021   // convert to pb (HepMC convention)
00022   double xsecval = pyint5.xsec[2][0] * 1.0e9;
00023   // statistical error
00024   double xsecerr = xsecval / std::sqrt( pyint5.ngen[2][0] );
00025   // set and return cross section information
00026   xsec.set_cross_section(xsecval, xsecerr);
00027   return xsec;
00028 }
00029 
00030 #endif  // PYTHIA_HELPER_H

Generated on Thu Jan 7 13:10:16 2010 for HepMC by  doxygen 1.4.7