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     /// @name Construction
00015     //@{
00016 
00017     /// Constructor
00018     D0_2010_S8671338() : Analysis("D0_2010_S8671338")
00019     {    }
00020 
00021     //@}
00022 
00023 
00024     ///@name Analysis methods
00025     //@{
00026 
00027     /// Add projections and book histograms
00028     void init() {
00029       FinalState fs;
00030       ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true);
00031       addProjection(zfinder, "ZFinder");
00032 
00033       _h_Z_pT_normalised = bookHisto1D(1, 1, 1);
00034       _h_Z_pT_xs = bookHisto1D(2, 1, 1);
00035     }
00036 
00037 
00038     // Do the analysis
00039     void analyze(const Event& e) {
00040       const double weight = e.weight();
00041       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00042       if (zfinder.bosons().size()==1) {
00043         double ZpT = zfinder.bosons()[0].pT()/GeV;
00044         _h_Z_pT_normalised->fill(ZpT, weight);
00045         _h_Z_pT_xs->fill(ZpT, weight);
00046       }
00047     }
00048 
00049 
00050     /// Finalize
00051     void finalize() {
00052       normalize(_h_Z_pT_normalised, 1.0);
00053       scale(_h_Z_pT_xs, crossSectionPerEvent());
00054     }
00055 
00056     //@}
00057 
00058 
00059   private:
00060 
00061     /// @name Histogram
00062     Histo1DPtr _h_Z_pT_normalised;
00063     Histo1DPtr _h_Z_pT_xs;
00064 
00065   };
00066 
00067 
00068 
00069   // The hook for the plugin system
00070   DECLARE_RIVET_PLUGIN(D0_2010_S8671338);
00071 
00072 }