[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Tue Nov 28 21:15:02 GMT 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/e882f7d1fe58
branches:  
changeset: 6158:e882f7d1fe58
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Nov 28 20:31:38 2017 +0000
description:
Fix to Python version check for >= 2.7.10 (patch submitted to GNU)

details:   https://rivet.hepforge.org/hg/rivet/rev/0328418ef551
branches:  
changeset: 6159:0328418ef551
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Nov 28 20:59:19 2017 +0000
description:
Providing neater & more YODA-consistent sumW and sumW2 methods on AnalysisHandler.

details:   https://rivet.hepforge.org/hg/rivet/rev/5b895eaa9b3a
branches:  
changeset: 6160:5b895eaa9b3a
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Nov 28 21:02:34 2017 +0000
description:
Providing neater & more YODA-consistent sumW and sumW2 methods on Analysis

diffs (truncated from 199 to 50 lines):

--- a/ChangeLog	Sat Nov 25 13:07:26 2017 +0000
+++ b/ChangeLog	Tue Nov 28 21:02:34 2017 +0000
@@ -1,3 +1,9 @@
+2017-11-28  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Providing neater & more YODA-consistent sumW and sumW2 methods on AnalysisHandler and Analysis.
+
+	* Fix to Python version check for >= 2.7.10 (patch submitted to GNU)
+
 2017-11-17  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Various improvements to DISKinematics, DISLepton, and the ZEUS 2001 analysis.
--- a/include/Rivet/Analysis.hh	Sat Nov 25 13:07:26 2017 +0000
+++ b/include/Rivet/Analysis.hh	Tue Nov 28 21:02:34 2017 +0000
@@ -314,13 +314,22 @@
     /// hasn't been set.
     double crossSectionPerEvent() const;
 
-    /// Get the number of events seen (via the analysis handler). Use in the
-    /// finalize phase only.
+    /// @brief Get the number of events seen (via the analysis handler).
+    ///
+    /// @note Use in the finalize phase only.
     size_t numEvents() const;
 
-    /// Get the sum of event weights seen (via the analysis handler). Use in the
-    /// finalize phase only.
-    double sumOfWeights() const;
+    /// @brief Get the sum of event weights seen (via the analysis handler).
+    ///
+    /// @note Use in the finalize phase only.
+    double sumW() const;
+    /// Alias
+    double sumOfWeights() const { return sumW(); }
+
+    /// @brief Get the sum of squared event weights seen (via the analysis handler).
+    ///
+    /// @note Use in the finalize phase only.
+    double sumW2() const;
 
 
   protected:
--- a/include/Rivet/AnalysisHandler.hh	Sat Nov 25 13:07:26 2017 +0000
+++ b/include/Rivet/AnalysisHandler.hh	Tue Nov 28 21:02:34 2017 +0000
@@ -54,38 +54,51 @@
     //@{
 
     /// Get the name of this run.
-    string runName() const;
+    string runName() const { return _runname; }


More information about the Rivet-svn mailing list