[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed Oct 4 12:45:01 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/3f239450ceff
branches:  multiweight
changeset: 6079:3f239450ceff
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Oct 04 12:22:59 2017 +0100
description:
Cleaner error messages for YODA catch

details:   https://rivet.hepforge.org/hg/rivet/rev/c2669e3351d4
branches:  multiweight
changeset: 6080:c2669e3351d4
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Oct 04 12:34:22 2017 +0100
description:
Fix CMS_2013_I1261026 for low stats runs

diffs (truncated from 115 to 50 lines):

--- a/analyses/pluginCMS/CMS_2013_I1261026.cc	Wed Oct 04 12:15:19 2017 +0100
+++ b/analyses/pluginCMS/CMS_2013_I1261026.cc	Wed Oct 04 12:34:22 2017 +0100
@@ -102,22 +102,43 @@
     void finalize() {
       for (size_t i = 0; i < 5; ++i) {
         // All trk mean pT vs Nch
+        try {
         _h_AllTrkMeanPt->fill(_multBinCent[i], _th_AllTrkSpectrum[i].xMean(), getMeanError(_th_AllTrkSpectrum[i]));
-
+	}
+	catch (const YODA::LowStatsError &) {
+		;
+	}
         // Soft trk mean pT vs Nch
+        try {
         _h_SoftTrkMeanPt->fill(_multBinCent[i], _th_SoftTrkSpectrum[i].xMean(), getMeanError(_th_SoftTrkSpectrum[i]));
-
+	}
+	catch (const YODA::LowStatsError &) {
+		;
+	}
         // Intrajet trk mean pT vs Nch
+        try {
         _h_IntrajetTrkMeanPt->fill(_multBinCent[i], _th_JetTrkSpectrum[i].xMean(), getMeanError(_th_JetTrkSpectrum[i]));
-
+	}
+	catch (const YODA::LowStatsError &) {
+		;
+	}
         // Intrajet leader trk mean pT vs Nch
+        try {
         _h_IntrajetLeaderTrkMeanPt->fill(_multBinCent[i], _th_JetLTrkSpectrum[i].xMean(), getMeanError(_th_JetLTrkSpectrum[i]));
-
+	}
+	catch (const YODA::LowStatsError &) {
+		;
+	}
         // Jet mean pT vs Nch
+        try {
         const double sem = (_h_JetSpectrum[i]->xStdDev())/(sqrt(_h_JetSpectrum[i]->sumW())) / _h_JetSpectrum[i]->xMean();
         _h_MeanJetPt->fill(_multBinCent[i], _h_JetSpectrum[i]->xMean(), sem);
-
+	}
+	catch (const YODA::LowStatsError &) {
+		;
+	}
         // Jet rates
+        if (_passedEv[i] > 0) {
 	double avJetRate5  = _jetCounter5GeV[i]  / _passedEv[i];
         double avJetRate30 = _jetCounter30GeV[i] / _passedEv[i];


More information about the Rivet-svn mailing list