1 //--------------------------------------------------------------------------
6 // ----------------------------------------------------------------------
8 #ifdef _WIN32 // Platform: Windows MS Visual C++
10 // Sorry, there is NO version currently available for Vusual C++.
16 #include "HepMC/HerwigWrapper.h"
17 #include "HepMC/GenCrossSection.h"
19 // declare the struct here to keep the shared library happy
24 GenCrossSection getHerwigCrossSection(int ngen) {
26 HepMC::GenCrossSection xsec;
27 // set cross section information and convert to pb (HepMC convention)
28 double xsecval = hwevnt.AVWGT * 1000.0;
30 // Herwig has a better calculation of the error,
31 // but that information does not appear to be saved anywhere
32 double xsecerr = xsecval / std::sqrt((double)ngen);
33 // set and return cross section information
34 xsec.set_cross_section(xsecval, xsecerr);