source: HiSusy/trunk/hepmc/x86_64-slc5-gcc41-opt/include/HepMC/PythiaWrapper.h @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 1.5 KB
Line 
1//--------------------------------------------------------------------------
2#ifndef PYTHIA_WRAPPER_H
3#define PYTHIA_WRAPPER_H
4
5//////////////////////////////////////////////////////////////////////////
6// Matt.Dobbs@Cern.CH, November 2000
7// Just a link to whichever pythia version is current.
8//////////////////////////////////////////////////////////////////////////
9
10// This pre-compiler directive is included (2002-01-16) to allow compatibility
11// with MS Visual C++, which interfaces to fortran in a different manner.
12// For it to work you need to define the _WIN32 variable when compiling.
13#ifdef _WIN32 // Platform: Windows MS Visual C++
14#include "HepMC/PythiaWrapper6_4_WIN32.h"
15
16#else // Generic version, tested on Linux ecgs/gcc
17#include "HepMC/PythiaWrapper6_4.h"
18
19#endif // Platform
20
21#include <cmath>
22
23#include "HepMC/GenCrossSection.h"
24
25namespace HepMC {
26
27/// calculate the Pythia cross section and statistical error
28inline GenCrossSection getPythiaCrossSection() {
29
30  GenCrossSection xsec;
31  // xsec(0,2) contains the sum of differential cross sections in mb
32  // ngen(0,2) contains the combined number of generated events
33  // convert to pb (HepMC convention)
34  double xsecval = pyint5.xsec[2][0] * 1.0e9;
35  // statistical error
36  double xsecerr = xsecval / std::sqrt( (double)pyint5.ngen[2][0] );
37  // set and return cross section information
38  xsec.set_cross_section(xsecval, xsecerr);
39  return xsec;
40}
41
42
43
44} // HepMC
45
46#endif  // PYTHIA_WRAPPER_H
47//--------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.