[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Thu Aug 6 14:30:02 BST 2015


details:   https://rivet.hepforge.org/hg/rivet/rev/2f7755ddabea
branches:  release-2-3-x
changeset: 4834:2f7755ddabea
user:      Chris Pollard <cspollard at gmail.com>
date:      Thu Aug 06 14:18:38 2015 +0100
description:
fixing +/- eta and rap histograms in MC_ParticleAnalysis

details:   https://rivet.hepforge.org/hg/rivet/rev/2b5de7651e2d
branches:  release-2-3-x
changeset: 4835:2b5de7651e2d
user:      Chris Pollard <cspollard at gmail.com>
date:      Thu Aug 06 14:20:49 2015 +0100
description:
fixing uninitialized histograms in MC_ParticleAnalysis

diffs (28 lines):

--- a/src/Analyses/MC_ParticleAnalysis.cc	Fri Jul 24 15:06:50 2015 +0100
+++ b/src/Analyses/MC_ParticleAnalysis.cc	Thu Aug 06 14:20:49 2015 +0100
@@ -56,6 +56,10 @@
     _h_multi_exclusive = bookHisto1D(_pname + "_multi_exclusive", _nparts+3, -0.5, _nparts+3-0.5);
     _h_multi_inclusive = bookHisto1D(_pname + "_multi_inclusive", _nparts+3, -0.5, _nparts+3-0.5);
     _h_multi_ratio = bookScatter2D(_pname + "_multi_ratio");
+
+    _h_multi_exclusive_prompt = bookHisto1D(_pname + "_multi_exclusive_prompt", _nparts+3, -0.5, _nparts+3-0.5);
+    _h_multi_inclusive_prompt = bookHisto1D(_pname + "_multi_inclusive_prompt", _nparts+3, -0.5, _nparts+3-0.5);
+    _h_multi_ratio_prompt = bookScatter2D(_pname + "_multi_ratio_prompt");
   }
 
 
@@ -73,12 +77,12 @@
       // Eta
       const double eta_i = particles[i].eta();
       _h_eta[i]->fill(eta_i, weight);
-      (eta_i > 0.0 ? _h_eta_plus : _h_eta_minus)[i]->fill(eta_i, weight);
+      (eta_i > 0.0 ? _h_eta_plus : _h_eta_minus)[i]->fill(fabs(eta_i), weight);
 
       // Rapidity
       const double rap_i = particles[i].rapidity();
       _h_rap[i]->fill(rap_i, weight);
-      (rap_i > 0.0 ? _h_rap_plus : _h_rap_minus)[i]->fill(rap_i, weight);
+      (rap_i > 0.0 ? _h_rap_plus : _h_rap_minus)[i]->fill(fabs(rap_i), weight);
 
       // Inter-particle properties
       for (size_t j = i+1; j < min(size_t(3),_nparts); ++j) {


More information about the Rivet-svn mailing list