D0_2008_S6879055.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/ZFinder.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   /// @brief D0 measurement of the ratio \f$ \sigma(Z/\gamma^* + n \text{ jets})/\sigma(Z/\gamma^*) \f$
00012   class D0_2008_S6879055 : public Analysis {
00013   public:
00014 
00015     /// Default constructor.
00016     D0_2008_S6879055() : Analysis("D0_2008_S6879055")
00017     {
00018     }
00019 
00020 
00021     /// @name Analysis methods
00022     //@{
00023 
00024     // Book histograms
00025     void init() {
00026       ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00027                       40.0*GeV, 200.0*GeV, 0.2, true, true);
00028       addProjection(zfinder, "ZFinder");
00029 
00030       FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
00031       addProjection(conefinder, "ConeFinder");
00032 
00033       _crossSectionRatio = bookHistogram1D(1, 1, 1);
00034       _pTjet1 = bookHistogram1D(2, 1, 1);
00035       _pTjet2 = bookHistogram1D(3, 1, 1);
00036       _pTjet3 = bookHistogram1D(4, 1, 1);
00037     }
00038 
00039 
00040 
00041     /// Do the analysis
00042     void analyze(const Event& event) {
00043       const double weight = event.weight();
00044 
00045 
00046 
00047       const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00048       if (zfinder.bosons().size()!=1) {
00049         vetoEvent;
00050       }
00051 
00052       FourMomentum e0 = zfinder.constituents()[0].momentum();
00053       FourMomentum e1 = zfinder.constituents()[1].momentum();
00054       const double e0eta = e0.eta();
00055       const double e0phi = e0.phi();
00056       const double e1eta = e1.eta();
00057       const double e1phi = e1.phi();
00058 
00059       vector<FourMomentum> finaljet_list;
00060       foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
00061         const double jeta = j.momentum().eta();
00062         const double jphi = j.momentum().phi();
00063         if (fabs(jeta) < 2.5) {
00064           if (deltaR(e0eta, e0phi, jeta, jphi) > 0.4 &&
00065               deltaR(e1eta, e1phi, jeta, jphi) > 0.4) {
00066             finaljet_list.push_back(j.momentum());
00067           }
00068         }
00069       }
00070 
00071       // For normalisation of crossSection data (includes events with no jets passing cuts)
00072       _crossSectionRatio->fill(0, weight);
00073 
00074       // Fill jet pT and multiplicities
00075       if (finaljet_list.size() >= 1) {
00076         _crossSectionRatio->fill(1, weight);
00077         _pTjet1->fill(finaljet_list[0].pT(), weight);
00078       }
00079       if (finaljet_list.size() >= 2) {
00080         _crossSectionRatio->fill(2, weight);
00081         _pTjet2->fill(finaljet_list[1].pT(), weight);
00082       }
00083       if (finaljet_list.size() >= 3) {
00084         _crossSectionRatio->fill(3, weight);
00085         _pTjet3->fill(finaljet_list[2].pT(), weight);
00086       }
00087       if (finaljet_list.size() >= 4) {
00088         _crossSectionRatio->fill(4, weight);
00089       }
00090     }
00091 
00092 
00093 
00094     /// Finalize
00095     void finalize() {
00096       // Now divide by the inclusive result
00097       _crossSectionRatio->scale(1.0/_crossSectionRatio->binHeight(0));
00098 
00099       // Normalise jet pTs to integrals of data
00100       // NB. There is no other way to do this, because these quantities are not
00101       // detector-corrected
00102       normalize(_pTjet1, 10439.0); // fixed norm OK
00103       normalize(_pTjet2, 1461.5); // fixed norm OK
00104       normalize(_pTjet3, 217.0); // fixed norm OK
00105     }
00106 
00107     //@}
00108 
00109 
00110   private:
00111 
00112     /// @name Histograms
00113     //@{
00114     AIDA::IHistogram1D * _crossSectionRatio;
00115     AIDA::IHistogram1D * _pTjet1;
00116     AIDA::IHistogram1D * _pTjet2;
00117     AIDA::IHistogram1D * _pTjet3;
00118     //@}
00119 
00120   };
00121 
00122 
00123 
00124   // The hook for the plugin system
00125   DECLARE_RIVET_PLUGIN(D0_2008_S6879055);
00126 
00127 }