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(FinalState(), ELECTRON, 66.0*GeV, 116.0*GeV, 0.2);
00032       addProjection(zfinder, "ZFinder");
00033 
00034       // Book histogram
00035       _hist_zpt = bookHistogram1D(1, 1, 1);
00036     }
00037 
00038 
00039     /// Do the analysis
00040     void analyze(const Event& e) {
00041       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00042       if (zfinder.particles().size() != 1) {
00043         getLog() << Log::DEBUG << "Num e+ e- pairs found = " << zfinder.particles().size() << endl;
00044         vetoEvent;
00045       }
00046 
00047       FourMomentum pZ = zfinder.particles()[0].momentum();
00048       if (pZ.mass2() < 0) {
00049         getLog() << Log::DEBUG << "Negative Z mass**2 = " << pZ.mass2()/GeV2 << "!" << endl;
00050         vetoEvent;
00051       }
00052 
00053       getLog() << Log::DEBUG << "Dilepton mass = " << pZ.mass()/GeV << " GeV"  << endl;
00054       getLog() << Log::DEBUG << "Dilepton pT   = " << pZ.pT()/GeV << " GeV" << endl;
00055       _hist_zpt->fill(pZ.pT()/GeV, e.weight());
00056     }
00057 
00058 
00059     void finalize() {
00060       scale(_hist_zpt, crossSection()/picobarn/sumOfWeights());
00061     }
00062 
00063     //@}
00064 
00065 
00066   private:
00067 
00068     AIDA::IHistogram1D *_hist_zpt;
00069 
00070   };
00071 
00072 
00073 
00074   // This global object acts as a hook for the plugin system
00075   AnalysisBuilder<CDF_2000_S4155203> plugin_CDF_2000_S4155203;
00076 
00077 }