|
[Rivet-svn] r3131 - in trunk: . src/Coreblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Jun 6 22:20:54 BST 2011
Author: hoeth Date: Mon Jun 6 22:20:54 2011 New Revision: 3131 Log: Allow for negative cross-sections. NLO tools need this. Modified: trunk/ChangeLog trunk/src/Core/AnalysisHandler.cc trunk/src/Core/Run.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Mon Jun 6 01:36:13 2011 (r3130) +++ trunk/ChangeLog Mon Jun 6 22:20:54 2011 (r3131) @@ -1,3 +1,7 @@ +2011-06-06 Hendrik Hoeth <hendrik.hoeth at cern.ch> + + * Allow for negative cross-sections. NLO tools need this. + 2011-06-04 Hendrik Hoeth <hendrik.hoeth at cern.ch> * Add support for goodness-of-fit calculations to make-plots. Modified: trunk/src/Core/AnalysisHandler.cc ============================================================================== --- trunk/src/Core/AnalysisHandler.cc Mon Jun 6 01:36:13 2011 (r3130) +++ trunk/src/Core/AnalysisHandler.cc Mon Jun 6 22:20:54 2011 (r3131) @@ -383,7 +383,7 @@ bool AnalysisHandler::hasCrossSection() const { - return (crossSection() >= 0); + return (!std::isnan(crossSection())); } Modified: trunk/src/Core/Run.cc ============================================================================== --- trunk/src/Core/Run.cc Mon Jun 6 01:36:13 2011 (r3130) +++ trunk/src/Core/Run.cc Mon Jun 6 22:20:54 2011 (r3131) @@ -10,7 +10,7 @@ Run::Run(AnalysisHandler& ah) - : _ah(ah), _fileweight(1.0), _xs(-1.0) + : _ah(ah), _fileweight(1.0), _xs(NAN) { } @@ -107,7 +107,7 @@ bool Run::processEvent() { // Set cross-section if found in event and not from command line #ifdef HEPMC_HAS_CROSS_SECTION - if (_xs < 0.0 && _evt->cross_section()) { + if (std::isnan(_xs) && _evt->cross_section()) { const double xs = _evt->cross_section()->cross_section(); //< in pb Log::getLog("Rivet.Run") << Log::DEBUG << "Setting cross-section = " << xs << " pb" << endl;
More information about the Rivet-svn mailing list |