hepmc - Diff between revs 427 and 432
Subversion Repositories:
| Rev 427 | Rev 432 | |||
|---|---|---|---|---|
| Line 5... | Line 5... | |||
| 5 | // | 5 | // | |
| 6 | // definitions needed by the pythia examples | 6 | // definitions needed by the pythia examples | |
| 7 | // | 7 | // | |
| 8 | ////////////////////////////////////////////////////////////////////////// | 8 | ////////////////////////////////////////////////////////////////////////// | |
| 9 | #include "HepMC/PythiaWrapper.h" | 9 | #include "HepMC/PythiaWrapper.h" | |
| 10 | #include "HepMC/GenCrossSection.h" | - | ||
| 11 | 10 | |||
| 12 | void initPythia(); | 11 | void initPythia(); | |
| 13 | - | |||
| 14 | - | |||
| 15 | /// calculate the Pythia cross section and statistical error | - | ||
| 16 | inline HepMC::GenCrossSection getPythiaCrossSection() { | - | ||
| 17 | - | |||
| 18 | HepMC::GenCrossSection xsec; | - | ||
| 19 | // xsec(0,2) contains the sum of differential cross sections in mb | - | ||
| 20 | // ngen(0,2) contains the combined number of generated events | - | ||
| 21 | // convert to pb (HepMC convention) | - | ||
| 22 | double xsecval = pyint5.xsec[2][0] * 1.0e9; | - | ||
| 23 | // statistical error | - | ||
| 24 | double xsecerr = xsecval / std::sqrt( pyint5.ngen[2][0] ); | - | ||
| 25 | // set and return cross section information | - | ||
| 26 | xsec.set_cross_section(xsecval, xsecerr); | - | ||
| 27 | return xsec; | - | ||
| 28 | } | - | ||
| 29 | 12 | |||
| 30 | #endif // PYTHIA_HELPER_H | 13 | #endif // PYTHIA_HELPER_H | |
