rivet is hosted by Hepforge, IPPP Durham
D0_2007_S7075677.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ZFinder.hh"
00004 
00005 namespace Rivet {
00006 
00007 
00008   /// @brief Measurement of D0 Run II Z \f$ p_\perp \f$ diff cross-section shape
00009   /// @author Andy Buckley
00010   /// @author Gavin Hesketh
00011   /// @author Frank Siegert
00012   class D0_2007_S7075677 : public Analysis {
00013 
00014   public:
00015 
00016     /// Default constructor.
00017     D0_2007_S7075677() : Analysis("D0_2007_S7075677")
00018     {
00019       // Run II Z rapidity
00020     }
00021 
00022 
00023     /// @name Analysis methods
00024     //@{
00025 
00026     /// Book histograms
00027     void init() {
00028       FinalState fs;
00029       ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, PID::ELECTRON,
00030                       71.0*GeV, 111.0*GeV, 0.2, true, true);
00031       addProjection(zfinder, "ZFinder");
00032 
00033       _h_yZ = bookHisto1D(1, 1, 1);
00034     }
00035 
00036 
00037     /// Do the analysis
00038     void analyze(const Event & e) {
00039       const double weight = e.weight();
00040 
00041       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00042       if (zfinder.bosons().size() == 1) {
00043         const Particles& el(zfinder.constituents());
00044         if (el[0].pT() > 25.0*GeV || el[1].pT() > 25.0*GeV) {
00045           double yZ = fabs(zfinder.bosons()[0].rapidity());
00046           _h_yZ->fill(yZ, weight);
00047         }
00048       }
00049       else {
00050         MSG_DEBUG("No unique lepton pair found.");
00051       }
00052     }
00053 
00054 
00055     // Finalize
00056     void finalize() {
00057       // Data seems to have been normalized for the avg of the two sides
00058       // (+ve & -ve rapidity) rather than the sum, hence the 0.5:
00059       normalize(_h_yZ, 0.5);
00060     }
00061 
00062     //@}
00063 
00064 
00065   private:
00066 
00067     /// @name Histograms
00068     //@{
00069     Histo1DPtr _h_yZ;
00070     //@}
00071 
00072   };
00073 
00074 
00075 
00076   // The hook for the plugin system
00077   DECLARE_RIVET_PLUGIN(D0_2007_S7075677);
00078 
00079 }