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