ATLAS_2010_S8817804.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #include "Rivet/Analysis.hh"
00004 #include "Rivet/RivetAIDA.hh"
00005 #include "Rivet/Tools/BinnedHistogram.hh"
00006 #include "Rivet/Tools/Logging.hh"
00007 #include "Rivet/Projections/FastJets.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   /// @brief ATLAS inclusive jet pT spectrum, di-jet Mass and di-jet chi
00013   class ATLAS_2010_S8817804: public Analysis {
00014   public:
00015 
00016     ATLAS_2010_S8817804() : Analysis("ATLAS_2010_S8817804")
00017     {
00018       setBeams(PROTON, PROTON);
00019       setNeedsCrossSection(true);
00020     }
00021 
00022 
00023   private:
00024 
00025     enum Alg { AKT4=0, AKT6=1 };
00026 
00027 
00028   public:
00029 
00030     void init() {
00031       FinalState fs;
00032       addProjection(fs, "FinalState");
00033       addProjection(FastJets(fs, FastJets::ANTIKT, 0.6), "AntiKT06");
00034       addProjection(FastJets(fs, FastJets::ANTIKT, 0.4), "AntiKT04");
00035 
00036       double ybins[] = { 0.0, 0.3, 0.8, 1.2, 2.1, 2.8 };
00037       double massBinsForChi[] = { 340, 520, 800, 1200 };
00038 
00039 
00040       size_t ptDsOffset(0), massDsOffset(10), chiDsOffset(20);
00041       for (size_t alg = 0; alg < 2; ++alg) {
00042         for (size_t i = 0; i < 5; ++i) {
00043           _pThistos[alg].addHistogram(ybins[i], ybins[i+1], bookHistogram1D(i + 1 + ptDsOffset, 1, 1));
00044         }
00045         ptDsOffset += 5;
00046 
00047         for (size_t i = 0; i < 5; ++i) {
00048           _massVsY[alg].addHistogram(ybins[i], ybins[i+1], bookHistogram1D(i + 1 + massDsOffset, 1, 1));
00049         }
00050         massDsOffset += 5;
00051 
00052         for (size_t i = 0; i < 3; ++i) {
00053           _chiVsMass[alg].addHistogram(massBinsForChi[i], massBinsForChi[i+1], bookHistogram1D(i + 1 + chiDsOffset, 1, 1));
00054         }
00055         chiDsOffset += 3;
00056       }
00057     }
00058 
00059 
00060     void analyze(const Event& evt) {
00061       Jets jetAr[2];
00062       jetAr[AKT4] = applyProjection<FastJets>(evt, "AntiKT06").jetsByPt(30*GeV);
00063       jetAr[AKT6] = applyProjection<FastJets>(evt, "AntiKT04").jetsByPt(30*GeV);
00064 
00065       // Identify the dijets
00066       for (size_t alg = 0; alg < 2; ++alg) {
00067         vector<FourMomentum> leadjets;
00068         foreach (const Jet& jet, jetAr[alg]) {
00069           const double pT = jet.momentum().pT();
00070           const double absy = fabs(jet.momentum().rapidity());
00071           _pThistos[alg].fill(absy, pT/GeV, evt.weight());
00072 
00073           if (absy < 2.8 && leadjets.size() < 2) {
00074             if (leadjets.empty() && pT < 60*GeV) continue;
00075             leadjets.push_back(jet.momentum());
00076           }
00077         }
00078 
00079         // Veto if no acceptable dijet found
00080         if (leadjets.size() < 2) {
00081           MSG_DEBUG("Could not find two suitable leading jets");
00082           continue;
00083         }
00084 
00085         const double rap1 = leadjets[0].rapidity();
00086         const double rap2 = leadjets[1].rapidity();
00087         const double mass = (leadjets[0] + leadjets[1]).mass();
00088         const double ymax = max(fabs(rap1), fabs(rap2));
00089         const double chi = exp(fabs(rap1 - rap2));
00090         if (fabs(rap1 + rap2) < 2.2) {
00091           _chiVsMass[alg].fill(mass/GeV, chi, evt.weight());
00092         }
00093         _massVsY[alg].fill(ymax, mass/GeV, evt.weight());
00094 
00095       }
00096     }
00097 
00098 
00099     void finalize() {
00100       for (size_t alg = 0; alg < 2; ++alg) {
00101         // factor 0.5 needed because it is differential in dy and not d|y|
00102         _pThistos[alg].scale(0.5*crossSectionPerEvent()/picobarn, this);
00103         _massVsY[alg].scale(crossSectionPerEvent()/picobarn, this);
00104         _chiVsMass[alg].scale(crossSectionPerEvent()/picobarn, this);
00105       }
00106     }
00107 
00108 
00109   private:
00110 
00111     /// The inclusive pT spectrum for akt6 and akt4 jets (array index is jet type from enum above)
00112     BinnedHistogram<double> _pThistos[2];
00113 
00114     /// The di-jet mass spectrum binned in rapidity for akt6 and akt4 jets (array index is jet type from enum above)
00115     BinnedHistogram<double> _massVsY[2];
00116 
00117     /// The di-jet chi distribution binned in mass for akt6 and akt4 jets (array index is jet type from enum above)
00118     BinnedHistogram<double> _chiVsMass[2];
00119 
00120   };
00121 
00122 
00123   AnalysisBuilder<ATLAS_2010_S8817804> plugin_ATLAS_2010_S8817804;
00124 
00125 }