rivet is hosted by Hepforge, IPPP Durham
D0_2010_S8671338.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/ZFinder.hh"
00005 
00006 namespace Rivet {
00007 
00008   using namespace Cuts;
00009 
00010 
00011   /// @brief Measurement of Z(->muon muon) pT differential cross-section
00012   /// @author Flavia Dias
00013   class D0_2010_S8671338 : public Analysis {
00014   public:
00015 
00016     /// Constructor
00017     D0_2010_S8671338()
00018       : Analysis("D0_2010_S8671338")
00019     {    }
00020 
00021 
00022     ///@name Analysis methods
00023     //@{
00024 
00025     /// Add projections and book histograms
00026     void init() {
00027       Cut cut = etaIn(-1.7,1.7) & (pT >= 15.0*GeV);
00028       ZFinder zfinder(FinalState(), cut, PID::MUON, 65*GeV, 115*GeV,
00029                       0.2, ZFinder::NOCLUSTER, ZFinder::TRACK);
00030       addProjection(zfinder, "ZFinder");
00031 
00032       _h_Z_pT_normalised = bookHisto1D(1, 1, 1);
00033       _h_Z_pT_xs = bookHisto1D(2, 1, 1);
00034     }
00035 
00036 
00037     // Do the analysis
00038     void analyze(const Event& e) {
00039       const double weight = e.weight();
00040       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00041       if (zfinder.bosons().size()==1) {
00042         double ZpT = zfinder.bosons()[0].pT()/GeV;
00043         _h_Z_pT_normalised->fill(ZpT, weight);
00044         _h_Z_pT_xs->fill(ZpT, weight);
00045       }
00046     }
00047 
00048 
00049     /// Finalize
00050     void finalize() {
00051       normalize(_h_Z_pT_normalised);
00052       scale(_h_Z_pT_xs, crossSection()/sumOfWeights());
00053     }
00054 
00055     //@}
00056 
00057 
00058   private:
00059 
00060     /// @name Histogram
00061     Histo1DPtr _h_Z_pT_normalised;
00062     Histo1DPtr _h_Z_pT_xs;
00063 
00064   };
00065 
00066 
00067 
00068   // The hook for the plugin system
00069   DECLARE_RIVET_PLUGIN(D0_2010_S8671338);
00070 
00071 }