[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed May 17 21:15:01 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/c03d7176c56c
branches:  release-2-5-x
changeset: 5785:c03d7176c56c
user:      Andy Buckley <andy at insectnation.org>
date:      Wed May 17 21:09:25 2017 +0100
description:
Tweak const arrays and constructors (just code-cosmetics)

details:   https://rivet.hepforge.org/hg/rivet/rev/f1ac315e1c39
branches:  release-2-5-x
changeset: 5786:f1ac315e1c39
user:      Andy Buckley <andy at insectnation.org>
date:      Wed May 17 21:10:07 2017 +0100
description:
Protect FastJets Jet-building/tagging logic against unavailability of FJ CS area info

diffs (truncated from 82 to 50 lines):

--- a/src/Analyses/ATLAS_2017_I1509919.cc	Wed May 17 10:39:43 2017 -0700
+++ b/src/Analyses/ATLAS_2017_I1509919.cc	Wed May 17 21:10:07 2017 +0100
@@ -10,8 +10,7 @@
   public:
 
     // Constructor
-    // DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2017_I1509919);
-    ATLAS_2017_I1509919() : Analysis("ATLAS_2017_I1509919"), PTCUTS{ 1., 5., 10. } {  }
+    DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2017_I1509919);
 
 
     // Pre-run histogram and projection booking
@@ -246,7 +245,7 @@
     }
 
     const static size_t NCUTS = 3;
-    const double PTCUTS[NCUTS]; // = { 1., 5., 10. };
+    const vector<double> PTCUTS = { 1., 5., 10. };
 
 
     /// @name Histograms
--- a/src/Analyses/ATLAS_2017_I1591327.cc	Wed May 17 10:39:43 2017 -0700
+++ b/src/Analyses/ATLAS_2017_I1591327.cc	Wed May 17 21:10:07 2017 +0100
@@ -12,9 +12,7 @@
   public:
 
     // Constructor
-    ATLAS_2017_I1591327()
-      : Analysis("ATLAS_2017_I1591327"), ETA_BINS{0.0, 1.5, 3.0}
-    {
+    ATLAS_2017_I1591327() : Analysis("ATLAS_2017_I1591327") {
       setNeedsCrossSection(true);
     }
 
@@ -177,7 +175,7 @@
 
     fastjet::AreaDefinition* _area_def;
 
-    const vector<double> ETA_BINS;
+    const vector<double> ETA_BINS = {0.0, 1.5, 3.0};
     vector<double> _ptDensity, _sigma, _Njets;
 
   };
--- a/src/Projections/FastJets.cc	Wed May 17 10:39:43 2017 -0700
+++ b/src/Projections/FastJets.cc	Wed May 17 21:10:07 2017 +0100
@@ -105,20 +105,20 @@
     vector<Particle> constituents, tags;
     constituents.reserve(pjconstituents.size());
 
-    for (const fastjet::PseudoJet& p : pjconstituents) {


More information about the Rivet-svn mailing list