[Rivet-svn] rivet: If-logic bugfix in CMS 0L analysis

Rivet Mercurial rivet at projects.hepforge.org
Tue Feb 21 00:00:02 GMT 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/1ee8e564b2a8
branches:  release-2-5-x
changeset: 5696:1ee8e564b2a8
user:      Andy Buckley <andy at insectnation.org>
date:      Mon Feb 20 23:53:59 2017 +0000
description:
If-logic bugfix in CMS 0L analysis

diffs (34 lines):

--- a/include/Rivet/Tools/Cutflow.hh	Sat Feb 18 13:52:05 2017 +0000
+++ b/include/Rivet/Tools/Cutflow.hh	Mon Feb 20 23:53:59 2017 +0000
@@ -24,11 +24,11 @@
       counts[0] += weight;
     }
 
-    /// @brief Fill the @a {icut}'th post-cut counter
+    /// @brief Fill the @a {icut}'th post-cut counter, starting at icut=1 for first cut
     ///
     /// @note Returns the cut result to allow 'side-effect' cut-flow filling in an if-statement
-    bool fill(size_t icut, bool cutresult, double weight=1.) {
-      if (cutresult) counts[icut+1] += weight;
+    bool fill(size_t icut, bool cutresult=true, double weight=1.) {
+      if (cutresult) counts[icut] += weight;
       return cutresult;
     }
 
--- a/src/Analyses/CMS_2016_PAS_SUS_16_14.cc	Sat Feb 18 13:52:05 2017 +0000
+++ b/src/Analyses/CMS_2016_PAS_SUS_16_14.cc	Mon Feb 20 23:53:59 2017 +0000
@@ -153,11 +153,11 @@
       int iht = 0;
       if (htmiss < 350*GeV) {
         iht = ht < 500 ? 1 : ht < 1000 ? 2 : 3;
-      } if (htmiss < 500*GeV && ht > 350*GeV) {
+      } else if (htmiss < 500*GeV && ht > 350*GeV) {
         iht = ht < 500 ? 4 : ht < 1000 ? 5 : 6;
-      } if (htmiss < 750*GeV && ht > 500*GeV) {
+      } else if (htmiss < 750*GeV && ht > 500*GeV) {
         iht = ht < 1000 ? 7 : 8;
-      } if (ht > 750*GeV) {
+      } else if (ht > 750*GeV) {
         iht = ht < 1500 ? 9 : 10;
       }
       if (iht == 0) vetoEvent;


More information about the Rivet-svn mailing list