rivet is hosted by Hepforge, IPPP Durham
ATLAS_2011_S9131140.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   using namespace Cuts;
00008 
00009 
00010   /// @brief ATLAS Z pT in Drell-Yan events at 7 TeV
00011   /// @author Elena Yatsenko, Judith Katzy
00012   class ATLAS_2011_S9131140 : public Analysis {
00013   public:
00014 
00015     /// Constructor
00016     ATLAS_2011_S9131140()
00017       : Analysis("ATLAS_2011_S9131140")
00018     {
00019       _sumw_el_bare = 0;
00020       _sumw_el_dressed = 0;
00021       _sumw_mu_bare = 0;
00022       _sumw_mu_dressed = 0;
00023     }
00024 
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     void init() {
00030 
00031       // Set up projections
00032       FinalState fs;
00033       Cut cut = etaIn(-2.4,2.4) & (pT >= 20.0*GeV);
00034 
00035       ZFinder zfinder_dressed_el(fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::CLUSTERNODECAY);
00036       addProjection(zfinder_dressed_el, "ZFinder_dressed_el");
00037       ZFinder zfinder_bare_el(fs, cut, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, ZFinder::NOCLUSTER);
00038       addProjection(zfinder_bare_el, "ZFinder_bare_el");
00039       ZFinder zfinder_dressed_mu(fs, cut, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::CLUSTERNODECAY);
00040       addProjection(zfinder_dressed_mu, "ZFinder_dressed_mu");
00041       ZFinder zfinder_bare_mu(fs, cut, PID::MUON, 66.0*GeV, 116.0*GeV, 0.0, ZFinder::NOCLUSTER);
00042       addProjection(zfinder_bare_mu, "ZFinder_bare_mu");
00043 
00044       // Book histograms
00045       _hist_zpt_el_dressed     = bookHisto1D(1, 1, 2);  // electron "dressed"
00046       _hist_zpt_el_bare        = bookHisto1D(1, 1, 3);  // electron "bare"
00047       _hist_zpt_mu_dressed     = bookHisto1D(2, 1, 2);  // muon "dressed"
00048       _hist_zpt_mu_bare        = bookHisto1D(2, 1, 3);  // muon "bare"
00049     }
00050 
00051 
00052     /// Do the analysis
00053     void analyze(const Event& evt) {
00054       const double weight = evt.weight();
00055 
00056       const ZFinder& zfinder_dressed_el = applyProjection<ZFinder>(evt, "ZFinder_dressed_el");
00057       if (!zfinder_dressed_el.bosons().empty()) {
00058         _sumw_el_dressed += weight;
00059         const FourMomentum pZ = zfinder_dressed_el.bosons()[0].momentum();
00060         _hist_zpt_el_dressed->fill(pZ.pT()/GeV, weight);
00061       }
00062 
00063       const ZFinder& zfinder_bare_el = applyProjection<ZFinder>(evt, "ZFinder_bare_el");
00064       if (!zfinder_bare_el.bosons().empty()) {
00065         _sumw_el_bare += weight;
00066         const FourMomentum pZ = zfinder_bare_el.bosons()[0].momentum();
00067         _hist_zpt_el_bare->fill(pZ.pT()/GeV, weight);
00068       }
00069 
00070       const ZFinder& zfinder_dressed_mu = applyProjection<ZFinder>(evt, "ZFinder_dressed_mu");
00071       if (!zfinder_dressed_mu.bosons().empty()) {
00072         _sumw_mu_dressed += weight;
00073         const FourMomentum pZ = zfinder_dressed_mu.bosons()[0].momentum();
00074         _hist_zpt_mu_dressed->fill(pZ.pT()/GeV, weight);
00075       }
00076 
00077       const ZFinder& zfinder_bare_mu = applyProjection<ZFinder>(evt, "ZFinder_bare_mu");
00078       if (!zfinder_bare_mu.bosons().empty()) {
00079         _sumw_mu_bare += weight;
00080         const FourMomentum pZ = zfinder_bare_mu.bosons()[0].momentum();
00081         _hist_zpt_mu_bare->fill(pZ.pT()/GeV, weight);
00082       }
00083 
00084     }
00085 
00086 
00087     void finalize() {
00088       if (_sumw_el_dressed != 0) scale(_hist_zpt_el_dressed, 1/_sumw_el_dressed);
00089       if (_sumw_el_bare    != 0) scale(_hist_zpt_el_bare,    1/_sumw_el_bare);
00090       if (_sumw_mu_dressed != 0) scale(_hist_zpt_mu_dressed, 1/_sumw_mu_dressed);
00091       if (_sumw_mu_bare    != 0) scale(_hist_zpt_mu_bare,    1/_sumw_mu_bare);
00092     }
00093 
00094     //@}
00095 
00096 
00097     private:
00098 
00099     double _sumw_el_bare, _sumw_el_dressed;
00100     double _sumw_mu_bare, _sumw_mu_dressed;
00101 
00102     Histo1DPtr _hist_zpt_el_dressed;
00103     Histo1DPtr _hist_zpt_el_bare;
00104     Histo1DPtr _hist_zpt_mu_dressed;
00105     Histo1DPtr _hist_zpt_mu_bare;
00106   };
00107 
00108 
00109   // Hook for the plugin system
00110   DECLARE_RIVET_PLUGIN(ATLAS_2011_S9131140);
00111 
00112 }