[Rivet-svn] rivet: Introduce rivet_shared_ptr to fix semantics of ...Ptr obj...

Rivet Mercurial rivet at projects.hepforge.org
Thu Sep 14 18:15:02 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/457728861f63
branches:  multiweights-fixptrs
changeset: 6019:457728861f63
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Thu Sep 14 17:54:19 2017 +0100
description:
Introduce rivet_shared_ptr to fix semantics of ...Ptr objects. They should now behave as a pointer would.

diffs (truncated from 1418 to 50 lines):

--- a/analyses/pluginATLAS/ATLAS_2014_I1279489.cc	Wed Sep 13 09:50:05 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,396 +0,0 @@
-// -*- C++ -*-
-#include "Rivet/Analysis.hh"
-#include "Rivet/Projections/FinalState.hh"
-#include "Rivet/Projections/IdentifiedFinalState.hh"
-#include "Rivet/Projections/VetoedFinalState.hh"
-#include "Rivet/Projections/FastJets.hh"
-#include "Rivet/Projections/DressedLeptons.hh"
-
-namespace Rivet {
-
-
-  struct Plots {
-    string label;
-
-    Histo1DPtr h_dy;
-    Histo1DPtr h_mjj;
-    Histo1DPtr h_njets;
-    Histo1DPtr h_dphijj;
-    Histo1DPtr h_ptbal;
-
-    Histo1DPtr h_jetveto_mjj_veto;
-    Histo1DPtr h_jetveto_mjj_inc;
-    Histo1DPtr h_jetveto_dy_veto;
-    Histo1DPtr h_jetveto_dy_inc;
-
-    Histo1DPtr h_ptbaleff_mjj_veto;
-    Histo1DPtr h_ptbaleff_mjj_inc;
-    Histo1DPtr h_ptbaleff_dy_veto;
-    Histo1DPtr h_ptbaleff_dy_inc;
-
-    Profile1DPtr p_avgnjets_dy;
-    Profile1DPtr p_avgnjets_mjj;
-  };
-
-
-  struct Variables {
-
-    Variables(const vector<const Jet*>& jets, const Particle* lep1, const Particle* lep2) {
-      FourMomentum j1 = jets.at(0)->momentum();
-      FourMomentum j2 = jets.at(1)->momentum();
-      jet1pt = j1.pT();
-      jet2pt = j2.pT();
-      assert(jet1pt > jet2pt);
-
-      zpt = (lep1->mom() + lep2->mom()).pT();
-
-      deltay = fabs(j1.rapidity() - j2.rapidity());


More information about the Rivet-svn mailing list