D0_2007_S7075677.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.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       ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00031                       71.0*GeV, 111.0*GeV, 0.2, true, true);
00032       addProjection(zfinder, "ZFinder");
00033 
00034       _h_yZ = bookHistogram1D(1, 1, 1);
00035     }
00036 
00037 
00038     /// Do the analysis
00039     void analyze(const Event & e) {
00040       const double weight = e.weight();
00041 
00042       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00043       if (zfinder.bosons().size() == 1) {
00044         const ParticleVector& el(zfinder.constituents());
00045         if (el[0].momentum().pT() > 25.0*GeV || el[1].momentum().pT() > 25.0*GeV) {
00046           double yZ = fabs(zfinder.bosons()[0].momentum().rapidity());
00047           _h_yZ->fill(yZ, weight);
00048         }
00049       }
00050       else {
00051         MSG_DEBUG("No unique lepton pair found.");
00052       }
00053     }
00054 
00055 
00056     // Finalize
00057     void finalize() {
00058       // Data seems to have been normalized for the avg of the two sides
00059       // (+ve & -ve rapidity) rather than the sum, hence the 0.5:
00060       normalize(_h_yZ, 0.5);
00061     }
00062 
00063     //@}
00064 
00065 
00066   private:
00067 
00068     /// @name Histograms
00069     //@{
00070     AIDA::IHistogram1D * _h_yZ;
00071     //@}
00072 
00073   };
00074 
00075 
00076 
00077   // The hook for the plugin system
00078   DECLARE_RIVET_PLUGIN(D0_2007_S7075677);
00079 
00080 }