[Rivet-svn] r3356 - trunk/src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Sep 14 15:09:31 BST 2011


Author: fsiegert
Date: Wed Sep 14 15:09:30 2011
New Revision: 3356

Log:
Guard against nan/inf if no events passed cuts.

Modified:
   trunk/src/Analyses/ATLAS_2011_S9126244.cc

Modified: trunk/src/Analyses/ATLAS_2011_S9126244.cc
==============================================================================
--- trunk/src/Analyses/ATLAS_2011_S9126244.cc	Wed Sep 14 14:58:52 2011	(r3355)
+++ trunk/src/Analyses/ATLAS_2011_S9126244.cc	Wed Sep 14 15:09:30 2011	(r3356)
@@ -376,6 +376,7 @@
         // Calculate the efficiency uncertainty
         double efficiency = vetoPtWeightSum/totalWeightSum;
         double efficiencyError = std::sqrt(efficiency*(1.0-efficiency)/totalWeightSum);
+        if (totalWeightSum==0.) efficiency = efficiencyError = 0.;
 
         xCoord->setValue(m_q0BinEdges[x+1]);
         xCoord->setErrorPlus(2.5);


More information about the Rivet-svn mailing list