CDF_2000_S4155203.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // CDF Z pT analysis
00003 
00004 #include "Rivet/Analysis.hh"
00005 #include "Rivet/RivetAIDA.hh"
00006 #include "Rivet/Tools/Logging.hh"
00007 #include "Rivet/Projections/ZFinder.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   /// @brief CDF Run I Z \f$ p_\perp \f$ in Drell-Yan events
00013   /// @author Hendrik Hoeth
00014   class CDF_2000_S4155203 : public Analysis {
00015   public:
00016 
00017     /// Constructor
00018     CDF_2000_S4155203()
00019       : Analysis("CDF_2000_S4155203")
00020     {
00021       setBeams(PROTON, ANTIPROTON);
00022       setNeedsCrossSection(true);
00023     }
00024 
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     void init() {
00030       // Set up projections
00031       ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00032                       66.0*GeV, 116.0*GeV, 0.0, false, false);
00033       addProjection(zfinder, "ZFinder");
00034 
00035       // Book histogram
00036       _hist_zpt = bookHistogram1D(1, 1, 1);
00037     }
00038 
00039 
00040     /// Do the analysis
00041     void analyze(const Event& e) {
00042       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00043       if (zfinder.bosons().size() != 1) {
00044         MSG_DEBUG("Num e+ e- pairs found = " << zfinder.bosons().size());
00045         vetoEvent;
00046       }
00047 
00048       FourMomentum pZ = zfinder.bosons()[0].momentum();
00049       if (pZ.mass2() < 0) {
00050         MSG_DEBUG("Negative Z mass**2 = " << pZ.mass2()/GeV2 << "!");
00051         vetoEvent;
00052       }
00053 
00054       MSG_DEBUG("Dilepton mass = " << pZ.mass()/GeV << " GeV");
00055       MSG_DEBUG("Dilepton pT   = " << pZ.pT()/GeV << " GeV");
00056       _hist_zpt->fill(pZ.pT()/GeV, e.weight());
00057     }
00058 
00059 
00060     void finalize() {
00061       scale(_hist_zpt, crossSection()/picobarn/sumOfWeights());
00062     }
00063 
00064     //@}
00065 
00066 
00067   private:
00068 
00069     AIDA::IHistogram1D *_hist_zpt;
00070 
00071   };
00072 
00073 
00074 
00075   // This global object acts as a hook for the plugin system
00076   AnalysisBuilder<CDF_2000_S4155203> plugin_CDF_2000_S4155203;
00077 
00078 }