[Rivet-svn] r1862 - trunk/src

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Oct 5 11:37:31 BST 2009


Author: fsiegert
Date: Mon Oct  5 11:37:31 2009
New Revision: 1862

Log:
For backwards compatibility: AnalysisHandler should extract cross
section also by itself, in case it is used as a library (and not via
bin/rivet).

Modified:
   trunk/src/AnalysisHandler.cc

Modified: trunk/src/AnalysisHandler.cc
==============================================================================
--- trunk/src/AnalysisHandler.cc	Mon Oct  5 00:35:03 2009	(r1861)
+++ trunk/src/AnalysisHandler.cc	Mon Oct  5 11:37:31 2009	(r1862)
@@ -57,6 +57,13 @@
     Event event(ge);
     _numEvents++;
     _sumOfWeights += event.weight();
+    #ifdef HEPMC_HAS_CROSS_SECTION
+    if (ge.cross_section()) {
+      /// @todo Use xs error?
+      const double xs = ge.cross_section()->cross_section();
+      setCrossSection(xs);
+    }
+    #endif
     foreach (Analysis* a, _analyses) {
       getLog() << Log::DEBUG << "About to run analysis " << a->name() << endl;
       a->analyze(event);


More information about the Rivet-svn mailing list