rivet is hosted by Hepforge, IPPP Durham
CDF_2008_S7828950.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/Projections/FastJets.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   /// @brief CDF Run II inclusive jet cross-section using the Midpoint algorithm.
00010   ///
00011   /// The analysis includes 1.1fb^-1 of CDF data and is the first with a
00012   /// cone algorithm to include the forward region of the detector.
00013   /// arXiv:0807.2204 to be published in PRD
00014   class CDF_2008_S7828950 : public Analysis {
00015   public:
00016 
00017     /// Constructor
00018     CDF_2008_S7828950()
00019       : Analysis("CDF_2008_S7828950")
00020     {    }
00021 
00022 
00023     /// @name Analysis methods
00024     //@{
00025 
00026     // Book histos and set counters for number of events passed in each one
00027     void init() {
00028       const FinalState fs;
00029       addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7), "JetsM07");
00030 
00031       _binnedHistosR07.addHistogram(  0, 0.1, bookHisto1D(1, 1, 1));
00032       _binnedHistosR07.addHistogram(0.1, 0.7, bookHisto1D(2, 1, 1));
00033       _binnedHistosR07.addHistogram(0.7, 1.1, bookHisto1D(3, 1, 1));
00034       _binnedHistosR07.addHistogram(1.1, 1.6, bookHisto1D(4, 1, 1));
00035       _binnedHistosR07.addHistogram(1.6, 2.1, bookHisto1D(5, 1, 1));
00036 
00037     }
00038 
00039 
00040     // Do the analysis
00041     void analyze(const Event& event) {
00042       const double weight = event.weight();
00043       foreach (const Jet& jet, applyProjection<FastJets>(event, "JetsM07").jets(62.0*GeV)) {
00044         _binnedHistosR07.fill(fabs(jet.rapidity()), jet.pT(), weight);
00045       }
00046     }
00047 
00048 
00049     // Normalise histograms to cross-section
00050     void finalize() {
00051       _binnedHistosR07.scale(crossSection()/nanobarn/sumOfWeights()/2.0, this);
00052     }
00053 
00054     //@}
00055 
00056 
00057   private:
00058 
00059     /// Histograms in different eta regions
00060     BinnedHistogram<double> _binnedHistosR07;
00061 
00062   };
00063 
00064 
00065 
00066   // The hook for the plugin system
00067   DECLARE_RIVET_PLUGIN(CDF_2008_S7828950);
00068 
00069 }