[Rivet-svn] rivet: Add init-time setting of a single weight-vector index fro...

Rivet Mercurial rivet at projects.hepforge.org
Thu May 31 15:15:02 BST 2018


details:   https://rivet.hepforge.org/hg/rivet/rev/68a7e147f6d4
branches:  release-2-6-x
changeset: 6323:68a7e147f6d4
user:      Andy Buckley <andy at insectnation.org>
date:      Thu May 31 14:40:20 2018 +0100
description:
Add init-time setting of a single weight-vector index from the RIVET_WEIGHT_INDEX environment variable. To be removed in v3, but really we should have done this years ago... and we don't know how long the handover will be.

diffs (truncated from 82 to 50 lines):

--- a/ChangeLog	Fri May 25 22:26:28 2018 +0100
+++ b/ChangeLog	Thu May 31 14:40:20 2018 +0100
@@ -1,3 +1,10 @@
+2018-05-31  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Add init-time setting of a single weight-vector index from the
+	RIVET_WEIGHT_INDEX environment variable. To be removed in v3, but
+	really we should have done this years ago... and we don't know how
+	long the handover will be.
+
 2018-05-22  Neil Warrack  <neil.warrack at cern.ch>
 
 	* Include 'unphysical' photon parents in PartonicTops' veto of prompt leptons from photon conversions.
--- a/analyses/pluginCMS/CMS_2016_I1491953.cc	Fri May 25 22:26:28 2018 +0100
+++ b/analyses/pluginCMS/CMS_2016_I1491953.cc	Thu May 31 14:40:20 2018 +0100
@@ -104,15 +104,15 @@
     void analyze(const Event& event) {
 
       const double weight = event.weight();
-      const WFinder& wfinder_mu = applyProjection<WFinder>(event, "WFinder_mu");
+      const WFinder& wfinder_mu = apply<WFinder>(event, "WFinder_mu");
       if (wfinder_mu.bosons().size() != 1) vetoEvent;
 
       //const FourMomentum& lepton0 = wfinder_mu.constituentLeptons()[0].momentum();
       //const FourMomentum& neutrino = wfinder_mu.constituentNeutrinos()[0].momentum();
       //double WmT = sqrt( 2 * lepton0.pT() * neutrino.pT() * (1 - cos(deltaPhi(lepton0, neutrino))) );
 
-      const FourMomentum lepton0 = wfinder_mu.constituentLepton().momentum();
-      const FourMomentum neutrino = wfinder_mu.constituentNeutrino().momentum();
+      const FourMomentum& lepton0 = wfinder_mu.constituentLepton().momentum();
+      const FourMomentum& neutrino = wfinder_mu.constituentNeutrino().momentum();
       double WmT = wfinder_mu.mT();
 
       if (WmT < 50.0*GeV) vetoEvent;
@@ -121,7 +121,7 @@
       // Select final jets, ordered by decreasing pT
       vector<FourMomentum> finaljet_list;
       double HT = 0.0;
-      const Jets jListAll = applyProjection<FastJets>(event, "Jets").jetsByPt(30.0*GeV);
+      const Jets jListAll = apply<FastJets>(event, "Jets").jetsByPt(30.0*GeV);
       for (const Jet& j : jListAll) {
         if (j.abseta() < 2.4 && j.pT() > 30.0*GeV && deltaR(lepton0, j) > 0.5) {
           finaljet_list.push_back(j.momentum());
--- a/bin/rivet	Fri May 25 22:26:28 2018 +0100
+++ b/bin/rivet	Thu May 31 14:40:20 2018 +0100
@@ -15,9 +15,9 @@
 
 
 ENVIRONMENT:
- * RIVET_ANALYSIS_PATH: list of paths to be searched for plugin


More information about the Rivet-svn mailing list