ATLAS_2011_S9131140.cc

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