[Rivet-svn] r2843 - in trunk: . src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Dec 10 00:30:55 GMT 2010


Author: buckley
Date: Fri Dec 10 00:30:54 2010
New Revision: 2843

Log:
Protecting analysis from use of unbooked histograms at 63 GeV

Modified:
   trunk/ChangeLog
   trunk/src/Analyses/UA1_1990_S2044935.cc

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Thu Dec  9 19:09:35 2010	(r2842)
+++ trunk/ChangeLog	Fri Dec 10 00:30:54 2010	(r2843)
@@ -1,3 +1,7 @@
+2010-12-10  Andy Buckley  <andy at insectnation.org>
+
+	* Fixing unbooked-histo segfault in UA1_1990_S2044935 at 63 GeV.
+
 2010-12-08  Hendrik Hoeth <hendrik.hoeth at cern.ch>
 
 	* Fixes in ATLAS_2010_CONF_083, declaring it validated

Modified: trunk/src/Analyses/UA1_1990_S2044935.cc
==============================================================================
--- trunk/src/Analyses/UA1_1990_S2044935.cc	Thu Dec  9 19:09:35 2010	(r2842)
+++ trunk/src/Analyses/UA1_1990_S2044935.cc	Fri Dec 10 00:30:54 2010	(r2843)
@@ -72,7 +72,7 @@
         if (inRange(eta, -5.5, -1.5)) n_minus++;
         else if (inRange(eta, 1.5, 5.5)) n_plus++;
       }
-      getLog() << Log::DEBUG << "Trigger -: " << n_minus << ", Trigger +: " << n_plus << endl;
+      MSG_DEBUG("Trigger -: " << n_minus << ", Trigger +: " << n_plus);
       if (n_plus == 0 || n_minus == 0) vetoEvent;
       const double weight = event.weight();
       _sumwTrig += weight;
@@ -84,9 +84,11 @@
       const unsigned int nch = cfs.size();
 
       // Event level histos
-      _hist_Nch->fill(nch, weight);
-      _hist_Et->fill(Et60/GeV, weight);
-      _hist_Etavg->fill(nch, Et25/GeV, weight);
+      if (!fuzzyEquals(sqrtS()/GeV, 63, 1E-3)) {
+        _hist_Nch->fill(nch, weight);
+        _hist_Et->fill(Et60/GeV, weight);
+        _hist_Etavg->fill(nch, Et25/GeV, weight);
+      }
 
       // Particle/track level histos
       const double deta = 2 * 5.0;
@@ -121,7 +123,7 @@
 
     void finalize() {
       if (_sumwTrig <= 0) {
-        getLog() << Log::WARN << "No events passed the trigger!" << endl;
+        MSG_WARNING("No events passed the trigger!");
         return;
       }
       const double xsec = crossSectionPerEvent();
@@ -129,7 +131,7 @@
       scale(_hist_Esigd3p, xsec/millibarn);
       scale(_hist_Et, xsec/millibarn);
       if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) {
-        // NB. Ref data is normalised to a fixed value. Note silly AIDA binHeight forgets the bin width.
+        // NB. Ref data is normalised to a fixed value not reproducible from MC. Note silly AIDA binHeight forgets the bin width.
         const double scale08 = 0.933e5/(_hist_Esigd3p08->binHeight(0)/_hist_Esigd3p08->axis().binWidth(0));
         scale(_hist_Esigd3p08, scale08);
         const double scale40 = 1.369e5/(_hist_Esigd3p40->binHeight(0)/_hist_Esigd3p40->axis().binWidth(0));


More information about the Rivet-svn mailing list