ATLAS_2011_I925932.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // ATLAS W pT analysis
00003 
00004 #include "Rivet/Analysis.hh"
00005 #include "Rivet/RivetAIDA.hh"
00006 #include "Rivet/Tools/Logging.hh"
00007 #include "Rivet/Projections/WFinder.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   class ATLAS_2011_I925932 : public Analysis {
00013   public:
00014 
00015     /// Constructor
00016     ATLAS_2011_I925932() : Analysis("ATLAS_2011_I925932") {  }
00017 
00018 
00019     /// @name Analysis methods
00020     //@{
00021 
00022     void init() {
00023       // Set up projections
00024       WFinder wfinder_dressed_el(-2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false);
00025       addProjection(wfinder_dressed_el, "WFinder_dressed_el");
00026       WFinder wfinder_bare_el(-2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false);
00027       addProjection(wfinder_bare_el, "WFinder_bare_el");
00028       WFinder wfinder_dressed_mu(-2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false);
00029       addProjection(wfinder_dressed_mu, "WFinder_dressed_mu");
00030       WFinder wfinder_bare_mu(-2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false);
00031       addProjection(wfinder_bare_mu, "WFinder_bare_mu");
00032 
00033       // Counters
00034       _sumW_e_dressed = 0;
00035       _sumW_e_bare = 0;
00036       _sumW_mu_dressed = 0;
00037       _sumW_mu_bare = 0;
00038 
00039       // Book histograms
00040       _hist_wpt_dressed_el  = bookHistogram1D(1, 1, 1);
00041       _hist_wpt_bare_el     = bookHistogram1D(1, 1, 2);
00042       _hist_wpt_dressed_mu  = bookHistogram1D(2, 1, 1);
00043       _hist_wpt_bare_mu     = bookHistogram1D(2, 1, 2);
00044     }
00045 
00046 
00047     inline double calcMT(const FourMomentum& a, const FourMomentum& b) {
00048       return sqrt(2.0 * a.pT() * b.pT() * (1.0 - cos(a.phi() - b.phi())) );
00049     }
00050 
00051 
00052     /// Do the analysis
00053     void analyze(const Event& event) {
00054 
00055       const WFinder& wfinder_dressed_el = applyProjection<WFinder>(event, "WFinder_dressed_el");
00056       const WFinder& wfinder_bare_el    = applyProjection<WFinder>(event, "WFinder_bare_el");
00057       const WFinder& wfinder_dressed_mu = applyProjection<WFinder>(event, "WFinder_dressed_mu");
00058       const WFinder& wfinder_bare_mu    = applyProjection<WFinder>(event, "WFinder_bare_mu");
00059 
00060       if (wfinder_dressed_el.particles().empty() && wfinder_bare_el.particles().empty() &&
00061           wfinder_dressed_mu.particles().empty() && wfinder_bare_mu.particles().empty()) {
00062         MSG_DEBUG("No W bosons found");
00063         vetoEvent;
00064       }
00065 
00066       // "Dressed" electron
00067       if (!wfinder_dressed_el.particles().empty()) {
00068         const FourMomentum el = wfinder_dressed_el.constituentLeptons()[0].momentum();
00069         const FourMomentum nu = wfinder_dressed_el.constituentNeutrinos()[0].momentum();
00070         if (calcMT(el, nu) > 40.0*GeV && nu.pT() > 25.0*GeV) {
00071           _sumW_e_dressed += event.weight();
00072           _hist_wpt_dressed_el->fill(wfinder_dressed_el.bosons()[0].momentum().pT()/GeV, event.weight());
00073         }
00074       }
00075 
00076       // "Bare" electron
00077       if (!wfinder_bare_el.particles().empty()) {
00078         const FourMomentum el = wfinder_bare_el.constituentLeptons()[0].momentum();
00079         const FourMomentum nu = wfinder_bare_el.constituentNeutrinos()[0].momentum();
00080         if (calcMT(el, nu) > 40.0*GeV && nu.pT() > 25.0*GeV) {
00081           _sumW_e_bare += event.weight();
00082           _hist_wpt_bare_el->fill(wfinder_bare_el.bosons()[0].momentum().pT()/GeV, event.weight());
00083         }
00084       }
00085 
00086       // "Dressed" muon
00087       if (!wfinder_dressed_mu.particles().empty()) {
00088         const FourMomentum mu = wfinder_dressed_mu.constituentLeptons()[0].momentum();
00089         const FourMomentum nu = wfinder_dressed_mu.constituentNeutrinos()[0].momentum();
00090         if (calcMT(mu, nu) > 40.0*GeV && nu.pT() > 25.0*GeV) {
00091           _sumW_mu_dressed += event.weight();
00092           _hist_wpt_dressed_mu->fill(wfinder_dressed_mu.bosons()[0].momentum().pT()/GeV, event.weight());
00093         }
00094       }
00095 
00096       // "Bare" muon
00097       if (!wfinder_bare_mu.particles().empty()) {
00098         const FourMomentum mu = wfinder_bare_mu.constituentLeptons()[0].momentum();
00099         const FourMomentum nu = wfinder_bare_mu.constituentNeutrinos()[0].momentum();
00100         if (calcMT(mu, nu) > 40.0*GeV && nu.pT() > 25.0*GeV) {
00101           _sumW_mu_bare += event.weight();
00102           _hist_wpt_bare_mu->fill(wfinder_bare_mu.bosons()[0].momentum().pT()/GeV, event.weight());
00103         }
00104       }
00105 
00106     }
00107 
00108 
00109     // Normalize histos
00110     void finalize() {
00111       scale(_hist_wpt_dressed_el, 1/_sumW_e_dressed);
00112       scale(_hist_wpt_bare_el, 1/_sumW_e_bare);
00113       scale(_hist_wpt_dressed_mu, 1/_sumW_mu_dressed);
00114       scale(_hist_wpt_bare_mu, 1/_sumW_mu_bare);
00115     }
00116 
00117     //@}
00118 
00119 
00120   private:
00121 
00122     double _sumW_e_dressed, _sumW_e_bare, _sumW_mu_dressed, _sumW_mu_bare;
00123 
00124     AIDA::IHistogram1D* _hist_wpt_dressed_el;
00125     AIDA::IHistogram1D* _hist_wpt_bare_el;
00126     AIDA::IHistogram1D* _hist_wpt_dressed_mu;
00127     AIDA::IHistogram1D* _hist_wpt_bare_mu;
00128 
00129   };
00130 
00131 
00132   // Hook for the plugin system
00133   DECLARE_RIVET_PLUGIN(ATLAS_2011_I925932);
00134 
00135 }