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