[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Thu Apr 26 16:30:01 BST 2018


details:   https://rivet.hepforge.org/hg/rivet/rev/f41e774f015c
branches:  release-2-6-x
changeset: 6278:f41e774f015c
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Apr 26 16:27:22 2018 +0100
description:
Add DirectFinalState and IndirectFinalState alias headers, for forward compatibility. 'Prompt' is confusing.

details:   https://rivet.hepforge.org/hg/rivet/rev/05153a337cba
branches:  release-2-6-x
changeset: 6279:05153a337cba
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Apr 26 16:27:57 2018 +0100
description:
Add normalize() methods to Cutflow and Cutflows.

diffs (truncated from 63 to 50 lines):

--- a/ChangeLog	Wed Apr 25 10:03:23 2018 +0100
+++ b/ChangeLog	Thu Apr 26 16:27:57 2018 +0100
@@ -1,3 +1,9 @@
+2018-04-26  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Add normalize() methods to Cutflow and Cutflows.
+
+	* Add DirectFinalState and IndirectFinalState alias headers, for forward compatibility. 'Prompt' is confusing.
+
 2018-04-24  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Add initializer_list overload for binIndex. Needed for other util functions operating on vectors.
--- a/include/Rivet/Projections/NonPromptFinalState.hh	Wed Apr 25 10:03:23 2018 +0100
+++ b/include/Rivet/Projections/NonPromptFinalState.hh	Thu Apr 26 16:27:57 2018 +0100
@@ -49,7 +49,7 @@
 
   };
 
+
 }
 
-
 #endif
--- a/include/Rivet/Projections/PromptFinalState.hh	Wed Apr 25 10:03:23 2018 +0100
+++ b/include/Rivet/Projections/PromptFinalState.hh	Thu Apr 26 16:27:57 2018 +0100
@@ -62,10 +62,6 @@
   };
 
 
-  /// Alias with a more correct name
-  using DirectFinalState = PromptFinalState;
-
 }
 
-
 #endif
--- a/include/Rivet/Tools/Cutflow.hh	Wed Apr 25 10:03:23 2018 +0100
+++ b/include/Rivet/Tools/Cutflow.hh	Thu Apr 26 16:27:57 2018 +0100
@@ -86,6 +86,11 @@
       for (double& x : counts) x *= factor;
     }
 
+    /// Scale the cutflow weights so that the weight count after cut @a icut is @a norm
+    void normalize(double norm, size_t icut=0) {
+      scale(norm/counts[icut]);
+    }
+
     /// Create a string representation
     string str() const {
       stringstream ss;


More information about the Rivet-svn mailing list