rivet is hosted by Hepforge, IPPP Durham
CDF_2007_S7057202.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetYODA.hh"
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   /// @brief CDF inclusive jet cross-section using the \f$ k_\perp \f$ algorithm
00012   class CDF_2007_S7057202 : public Analysis {
00013   public:
00014 
00015     CDF_2007_S7057202()
00016       : Analysis("CDF_2007_S7057202")
00017     {    }
00018 
00019 
00020     void init() {
00021       // Set up projections
00022       const FinalState fs;
00023       addProjection(FastJets(fs, FastJets::KT, 0.5), "JetsD05");
00024       addProjection(FastJets(fs, FastJets::KT, 0.7), "JetsD07");
00025       addProjection(FastJets(fs, FastJets::KT, 1.0), "JetsD10");
00026 
00027       // Book histos
00028       _binnedHistosD07.addHistogram(  0, 0.1, bookHisto1D(1, 1, 1));
00029       _binnedHistosD07.addHistogram(0.1, 0.7, bookHisto1D(2, 1, 1));
00030       _binnedHistosD07.addHistogram(0.7, 1.1, bookHisto1D(3, 1, 1));
00031       _binnedHistosD07.addHistogram(1.1, 1.6, bookHisto1D(4, 1, 1));
00032       _binnedHistosD07.addHistogram(1.6, 2.1, bookHisto1D(5, 1, 1));
00033       _histoD05 = bookHisto1D(6, 1, 1);
00034       _histoD10 = bookHisto1D(7, 1, 1);
00035     }
00036 
00037 
00038     void analyze(const Event& event) {
00039       const double weight = event.weight();
00040 
00041       foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD07").jets(54.0*GeV)) {
00042         double y = fabs(jet.momentum().rapidity());
00043         _binnedHistosD07.fill(y, jet.momentum().pT(), weight);
00044       }
00045 
00046       foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD05").jets(54.0*GeV)) {
00047         double y = fabs(jet.momentum().rapidity());
00048         if (y >= 0.1 && y < 0.7) _histoD05->fill(jet.momentum().pT(), weight);
00049       }
00050 
00051       foreach (const Jet& jet, applyProjection<JetAlg>(event, "JetsD10").jets(54.0*GeV)) {
00052         double y = fabs(jet.momentum().rapidity());
00053         if (y >= 0.1 && y < 0.7) _histoD10->fill(jet.momentum().pT(), weight);
00054       }
00055     }
00056 
00057 
00058     // Normalise histograms to cross-section
00059     void finalize() {
00060       const double xSec = crossSectionPerEvent()/nanobarn;
00061 
00062       scale(_histoD05, xSec);
00063       scale(_histoD10, xSec);
00064       // scale to xSec/yBinWidth and take into account the double yBinWidth due
00065       // to the absolute value of y
00066       _binnedHistosD07.scale(xSec/2.0, this);
00067     }
00068 
00069   private:
00070 
00071     BinnedHistogram<double> _binnedHistosD07;
00072 
00073     // Single histogram for the \f$R=0.5\f$ \f$k_\perp\f$ jets
00074     Histo1DPtr _histoD05;
00075 
00076     // Single histogram for the \f$R=1.0\f$ \f$k_\perp\f$ jets
00077     Histo1DPtr _histoD10;
00078     //@}
00079 
00080   };
00081 
00082 
00083 
00084   // The hook for the plugin system
00085   DECLARE_RIVET_PLUGIN(CDF_2007_S7057202);
00086 
00087 }