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 
00009   /// @brief Measurement of Z(->muon muon) pT differential cross-section
00010   /// @author Flavia Dias
00011   class D0_2010_S8671338 : public Analysis {
00012   public:
00013 
00014     /// Constructor
00015     D0_2010_S8671338()
00016       : Analysis("D0_2010_S8671338")
00017     {    }
00018 
00019 
00020     ///@name Analysis methods
00021     //@{
00022 
00023     /// Add projections and book histograms
00024     void init() {
00025       ZFinder zfinder(FinalState(), -1.7, 1.7, 15*GeV, PID::MUON, 65*GeV, 115*GeV,
00026                       0.2, ZFinder::NOCLUSTER, ZFinder::TRACK);
00027       addProjection(zfinder, "ZFinder");
00028 
00029       _h_Z_pT_normalised = bookHisto1D(1, 1, 1);
00030       _h_Z_pT_xs = bookHisto1D(2, 1, 1);
00031     }
00032 
00033 
00034     // Do the analysis
00035     void analyze(const Event& e) {
00036       const double weight = e.weight();
00037       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00038       if (zfinder.bosons().size()==1) {
00039         double ZpT = zfinder.bosons()[0].pT()/GeV;
00040         _h_Z_pT_normalised->fill(ZpT, weight);
00041         _h_Z_pT_xs->fill(ZpT, weight);
00042       }
00043     }
00044 
00045 
00046     /// Finalize
00047     void finalize() {
00048       normalize(_h_Z_pT_normalised);
00049       normalize(_h_Z_pT_xs, crossSection());
00050     }
00051 
00052     //@}
00053 
00054 
00055   private:
00056 
00057     /// @name Histogram
00058     Histo1DPtr _h_Z_pT_normalised;
00059     Histo1DPtr _h_Z_pT_xs;
00060 
00061   };
00062 
00063 
00064 
00065   // The hook for the plugin system
00066   DECLARE_RIVET_PLUGIN(D0_2010_S8671338);
00067 
00068 }