LCOV - code coverage report
Current view: top level - TEvtGen/HepMC - HerwigWrapper.cc (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 5 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //--------------------------------------------------------------------------
       2             : //
       3             : // HerwigWrapper.cc
       4             : // Author:  Lynn Garren
       5             : //
       6             : // ----------------------------------------------------------------------
       7             : 
       8             : #ifdef _WIN32 // Platform: Windows MS Visual C++
       9             : 
      10             : //  Sorry, there is NO version currently available for Vusual C++.
      11             : 
      12             : #else 
      13             : 
      14             : #include <cmath>
      15             : 
      16             : #include "HepMC/HerwigWrapper.h"
      17             : #include "HepMC/GenCrossSection.h"
      18             : 
      19             : // declare the struct here to keep the shared library happy
      20             : struct hwgev hwevnt_;
      21             : 
      22             : namespace HepMC {
      23             : 
      24             : GenCrossSection getHerwigCrossSection(int ngen) {
      25             : 
      26           0 :   HepMC::GenCrossSection xsec;
      27             :   // set cross section information and convert to pb (HepMC convention)
      28           0 :   double xsecval = hwevnt.AVWGT * 1000.0;
      29             :   // statistical error
      30             :   // Herwig has a better calculation of the error, 
      31             :   // but that information does not appear to be saved anywhere
      32           0 :   double xsecerr = xsecval / std::sqrt((double)ngen);
      33             :   // set and return cross section information
      34           0 :   xsec.set_cross_section(xsecval, xsecerr);
      35             :   return xsec;
      36           0 : }
      37             : 
      38             : } // HepMC
      39             : 
      40             : #endif //Platform

Generated by: LCOV version 1.11