[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Thu Apr 28 14:00:01 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/b89d707f5096
branches:  release-2-4-x
changeset: 5176:b89d707f5096
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Apr 28 13:03:13 2016 +0100
description:
Tidying

details:   https://rivet.hepforge.org/hg/rivet/rev/76f0494e9753
branches:  release-2-4-x
changeset: 5177:76f0494e9753
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Apr 28 13:39:59 2016 +0100
description:
More stylistic tidying of crappy localised util class

details:   https://rivet.hepforge.org/hg/rivet/rev/84f58d6a5b3d
branches:  release-2-4-x
changeset: 5178:84f58d6a5b3d
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Apr 28 13:47:54 2016 +0100
description:
Split the implementations of EventShape functions into a separate unnamed namespace at the bottom of the analysis source file

diffs (truncated from 1002 to 50 lines):

--- a/src/Analyses/CMS_2014_I1305624.cc	Wed Apr 27 17:14:19 2016 +0100
+++ b/src/Analyses/CMS_2014_I1305624.cc	Thu Apr 28 13:47:54 2016 +0100
@@ -6,185 +6,306 @@
 namespace Rivet {
 
 
-  // Helper class (why a class?) etc. for event shape calculations in hidden namespace; analysis at bottom of file
   namespace {
 
+    /// Number of event shape variables
+    /// @todo Move into the EventShape class
+    const int NEVTVAR = 5;
 
-    const int NEVTVAR = 5; // Number of event shape variables
-    const int NJETPTMN = 5; // Threshold of leading pt
+    /// Number of leading jet pT thresholds
+    /// @todo Move into the analysis class
+    const int NJETPTMN = 5;
+    /// Leading jet pT thresholds
+    /// @todo Move into the analysis class
     const double LEADINGPTTHRESHOLD[NJETPTMN] = { 110.0, 170.0, 250.0, 320.0, 390.0 };
 
 
-    /// @todo Improve/remove this junk
+    // Helpers for event shape calculations in hidden namespace; implementation at bottom of file
+    /// @todo Why a class? Improve/remove this junk
     class EventShape {
     public:
 
-      // Constructor from vectors of four-vectors as input objects in the event to calculate the event shapes
+      /// Constructor from vectors of four-vectors as input objects in the event to calculate the event shapes
       EventShape(const vector<double>& px_vector, const vector<double>& py_vector, const vector<double>& pz_vector,
-                 const vector<double>& e_vector, double eta_central, int rapidity, int nmn);
+                 const vector<double>& e_vector, double eta_central, int irap, int nmn)
+        : _object_px(px_vector), _object_py(py_vector), _object_pz(pz_vector),
+          _object_e(e_vector), _eta_c(eta_central), _irap(irap), _nmnjet(nmn)
+      {   }
 
-      // Destructor
-      /// @todo Not needed: remove
-      ~EventShape() {}
+      /// @brief Returns the values of the five event shapes
+      ///
+      /// Event shape indices:
+      /// 0. central transverse thrust
+      /// 1. central total jet broadening
+      /// 2. central total jet mass
+      /// 3. central total transverse jet mass
+      /// 4. central three-jet resolution threshold
+      vector<double> getEventShapes() {


More information about the Rivet-svn mailing list