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