rivet is hosted by Hepforge, IPPP Durham
CDF_2000_S4155203.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 CDF Run I Z \f$ p_\perp \f$ in Drell-Yan events
00011   /// @author Hendrik Hoeth
00012   class CDF_2000_S4155203 : public Analysis {
00013   public:
00014 
00015     /// Constructor
00016     CDF_2000_S4155203()
00017       : Analysis("CDF_2000_S4155203")
00018     {    }
00019 
00020 
00021     /// @name Analysis methods
00022     //@{
00023 
00024     void init() {
00025       // Set up projections
00026       FinalState fs;
00027       ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00028                       66.0*GeV, 116.0*GeV, 0.0, false, false);
00029       addProjection(zfinder, "ZFinder");
00030 
00031       // Book histogram
00032       _hist_zpt = bookHisto1D(1, 1, 1);
00033     }
00034 
00035 
00036     /// Do the analysis
00037     void analyze(const Event& e) {
00038       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00039       if (zfinder.bosons().size() != 1) {
00040         MSG_DEBUG("Num e+ e- pairs found = " << zfinder.bosons().size());
00041         vetoEvent;
00042       }
00043 
00044       FourMomentum pZ = zfinder.bosons()[0].momentum();
00045       if (pZ.mass2() < 0) {
00046         MSG_DEBUG("Negative Z mass**2 = " << pZ.mass2()/GeV2 << "!");
00047         vetoEvent;
00048       }
00049 
00050       MSG_DEBUG("Dilepton mass = " << pZ.mass()/GeV << " GeV");
00051       MSG_DEBUG("Dilepton pT   = " << pZ.pT()/GeV << " GeV");
00052       _hist_zpt->fill(pZ.pT()/GeV, e.weight());
00053     }
00054 
00055 
00056     void finalize() {
00057       scale(_hist_zpt, crossSection()/picobarn/sumOfWeights());
00058     }
00059 
00060     //@}
00061 
00062 
00063   private:
00064 
00065     Histo1DPtr _hist_zpt;
00066 
00067   };
00068 
00069 
00070 
00071   // The hook for the plugin system
00072   DECLARE_RIVET_PLUGIN(CDF_2000_S4155203);
00073 
00074 }