[Rivet-svn] r2883 - trunk/src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Jan 21 18:46:20 GMT 2011


Author: buckley
Date: Fri Jan 21 18:46:20 2011
New Revision: 2883

Log:
Histo booking problem solved in ATLAS 2010 dijets -- still a problem in the finalize scaling

Modified:
   trunk/src/Analyses/ATLAS_2010_S8817804.cc

Modified: trunk/src/Analyses/ATLAS_2010_S8817804.cc
==============================================================================
--- trunk/src/Analyses/ATLAS_2010_S8817804.cc	Thu Jan 20 13:59:45 2011	(r2882)
+++ trunk/src/Analyses/ATLAS_2010_S8817804.cc	Fri Jan 21 18:46:20 2011	(r2883)
@@ -37,20 +37,19 @@
       double ybins[] = { 0.0, 0.3, 0.8, 1.2, 2.1, 2.8 };
       double massBinsForChi[] = { 340, 520, 800, 1200 };
 
+
+      size_t ptDsOffset(0), massDsOffset(10), chiDsOffset(20);
       for (size_t alg = 0; alg < 2; ++alg) {
-        int ptDsOffset = 1;
         for (size_t i = 0; i < 5; ++i) {
-          _pTHistos[alg].addHistogram(ybins[i], ybins[i+1], bookHistogram1D(i + ptDsOffset, 1, 1));
+          _pThistos[alg].addHistogram(ybins[i], ybins[i+1], bookHistogram1D(i + ptDsOffset, 1, 1));
         }
         ptDsOffset += 5;
 
-        int massDsOffset = 11;
         for (size_t i = 0; i < 5; ++i) {
           _massVsY[alg].addHistogram(ybins[i], ybins[i+1], bookHistogram1D(i + massDsOffset, 1, 1));
         }
         massDsOffset += 5;
 
-        int chiDsOffset = 21;
         for (size_t i = 0; i < 3; ++i) {
           _chiVsMass[alg].addHistogram(massBinsForChi[i], massBinsForChi[i+1], bookHistogram1D(i + chiDsOffset, 1, 1));
         }
@@ -64,31 +63,20 @@
       jetAr[AKT4] = applyProjection<FastJets>(evt, "AntiKT06").jetsByPt(30*GeV);
       jetAr[AKT6] = applyProjection<FastJets>(evt, "AntiKT04").jetsByPt(30*GeV);
 
-      cout << -1 << endl;
-
       // Identify the dijets
       for (size_t alg = 0; alg < 2; ++alg) {
-        cout << 0 << endl;
-
         vector<FourMomentum> leadjets;
         foreach (const Jet& jet, jetAr[alg]) {
-          cout << 0.1 << endl;
-          double pT = jet.momentum().pT();
-          double absy = fabs(jet.momentum().rapidity());
-          cout << 0.2 << endl;
-          _pTHistos[alg].fill(absy, pT/GeV, evt.weight());
-
-          cout << 0.3 << endl;
+          const double pT = jet.momentum().pT();
+          const double absy = fabs(jet.momentum().rapidity());
+          _pThistos[alg].fill(absy, pT/GeV, evt.weight());
 
           if (absy < 2.8 && leadjets.size() < 2) {
             if (leadjets.empty() && pT < 60*GeV) continue;
             leadjets.push_back(jet.momentum());
           }
-          cout << 0.4 << endl;
         }
 
-        cout << 1 << endl;
-
         // Veto if no acceptable dijet found
         if (leadjets.size() < 2) {
           MSG_DEBUG("Could not find two suitable leading jets");
@@ -96,12 +84,9 @@
         }
         _sumW += evt.weight();
 
-        cout << 2 << endl;
-
         const double rap1 = leadjets[0].rapidity();
         const double rap2 = leadjets[1].rapidity();
         const double mass = (leadjets[0] + leadjets[1]).mass();
-        //const double ymax = (fabs(rap1) > fabs(rap2)) ? fabs(rap1) : fabs(rap2);
         const double ymax = max(fabs(rap1), fabs(rap2));
         const double chi = exp(fabs(rap1 - rap2));
         if (fabs(rap1 + rap2) < 2.2) {
@@ -115,9 +100,13 @@
 
     void finalize() {
       for (size_t alg = 0; alg < 2; ++alg) {
-        _pTHistos[alg].scale(crossSectionPerEvent()/picobarn, this);
+        //cout << 0 << endl;
+        _pThistos[alg].scale(crossSectionPerEvent()/picobarn, this);
+        //cout << 1 << endl;
         _massVsY[alg].scale(crossSection()/_sumW/picobarn, this);
+        //cout << 2 << endl;
         _chiVsMass[alg].scale(crossSection()/_sumW/picobarn, this);
+        //cout << 3 << endl;
       }
     }
 
@@ -128,7 +117,7 @@
     double _sumW;
 
     /// The inclusive pT spectrum for akt6 and akt4 jets (array index is jet type from enum above)
-    BinnedHistogram<double> _pTHistos[2];
+    BinnedHistogram<double> _pThistos[2];
 
     /// The di-jet mass spectrum binned in rapidity for akt6 and akt4 jets (array index is jet type from enum above)
     BinnedHistogram<double> _massVsY[2];


More information about the Rivet-svn mailing list