rivet is hosted by Hepforge, IPPP Durham
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/Projections/WFinder.hh"
00006 
00007 namespace Rivet {
00008 
00009 
00010   namespace {
00011     /// @todo Correct this in Rivet
00012     inline double calcMT(const FourMomentum& a, const FourMomentum& b) {
00013       return sqrt(2.0 * a.pT() * b.pT() * (1.0 - cos(a.phi() - b.phi())) );
00014     }
00015   }
00016 
00017 
00018   class ATLAS_2011_I925932 : public Analysis {
00019   public:
00020 
00021     /// Constructor
00022     ATLAS_2011_I925932() : Analysis("ATLAS_2011_I925932") {  }
00023 
00024 
00025     /// @name Analysis methods
00026     //@{
00027 
00028     void init() {
00029       // Set up projections
00030       FinalState fs;
00031       WFinder wfinder_dressed_el(fs, -2.4, 2.4, 20*GeV, PID::ELECTRON, 0*GeV, 1000*GeV, 25*GeV, 0.2, WFinder::CLUSTERNODECAY);
00032       addProjection(wfinder_dressed_el, "WFinder_dressed_el");
00033       WFinder wfinder_bare_el(fs, -2.4, 2.4, 20*GeV, PID::ELECTRON, 0*GeV, 1000*GeV, 25*GeV, 0.0, WFinder::NOCLUSTER);
00034       addProjection(wfinder_bare_el, "WFinder_bare_el");
00035       WFinder wfinder_dressed_mu(fs, -2.4, 2.4, 20*GeV, PID::MUON, 0*GeV, 1000*GeV, 25*GeV, 0.2, WFinder::CLUSTERNODECAY);
00036       addProjection(wfinder_dressed_mu, "WFinder_dressed_mu");
00037       WFinder wfinder_bare_mu(fs, -2.4, 2.4, 20*GeV, PID::MUON, 0*GeV, 1000*GeV, 25*GeV, 0.0, WFinder::NOCLUSTER);
00038       addProjection(wfinder_bare_mu, "WFinder_bare_mu");
00039 
00040       // Book histograms
00041       _hist_wpt_dressed_el  = bookHisto1D(1, 1, 1);
00042       _hist_wpt_bare_el     = bookHisto1D(1, 1, 2);
00043       _hist_wpt_dressed_mu  = bookHisto1D(2, 1, 1);
00044       _hist_wpt_bare_mu     = bookHisto1D(2, 1, 2);
00045     }
00046 
00047 
00048     /// Do the analysis
00049     void analyze(const Event& event) {
00050       const double weight = event.weight();
00051 
00052       const WFinder& wfinder_dressed_el = applyProjection<WFinder>(event, "WFinder_dressed_el");
00053       const WFinder& wfinder_bare_el    = applyProjection<WFinder>(event, "WFinder_bare_el");
00054       const WFinder& wfinder_dressed_mu = applyProjection<WFinder>(event, "WFinder_dressed_mu");
00055       const WFinder& wfinder_bare_mu    = applyProjection<WFinder>(event, "WFinder_bare_mu");
00056 
00057       if (wfinder_dressed_el.empty() && wfinder_bare_el.empty() &&
00058           wfinder_dressed_mu.empty() && wfinder_bare_mu.empty()) {
00059         MSG_DEBUG("No W bosons found");
00060         vetoEvent;
00061       }
00062 
00063       // "Dressed" electron
00064       if (!wfinder_dressed_el.particles().empty()) {
00065         const FourMomentum& nu = wfinder_dressed_el.constituentNeutrinos()[0].momentum();
00066         if (wfinder_dressed_el.mT() > 40*GeV && nu.pT() > 25*GeV) {
00067           _hist_wpt_dressed_el->fill(wfinder_dressed_el.bosons()[0].pT()/GeV, weight);
00068         }
00069       }
00070 
00071       // "Bare" electron
00072       if (!wfinder_bare_el.particles().empty()) {
00073         const FourMomentum& nu = wfinder_bare_el.constituentNeutrinos()[0].momentum();
00074         if (wfinder_bare_el.mT() > 40*GeV && nu.pT() > 25*GeV) {
00075           _hist_wpt_bare_el->fill(wfinder_bare_el.bosons()[0].pT()/GeV, weight);
00076         }
00077       }
00078 
00079       // "Dressed" muon
00080       if (!wfinder_dressed_mu.particles().empty()) {
00081         const FourMomentum& nu = wfinder_dressed_mu.constituentNeutrinos()[0].momentum();
00082         if (wfinder_dressed_mu.mT() > 40*GeV && nu.pT() > 25*GeV) {
00083           _hist_wpt_dressed_mu->fill(wfinder_dressed_mu.bosons()[0].pT()/GeV, weight);
00084         }
00085       }
00086 
00087       // "Bare" muon
00088       if (!wfinder_bare_mu.particles().empty()) {
00089         const FourMomentum& nu = wfinder_bare_mu.constituentNeutrinos()[0].momentum();
00090         if (wfinder_bare_mu.mT() > 40*GeV && nu.pT() > 25*GeV) {
00091           _hist_wpt_bare_mu->fill(wfinder_bare_mu.bosons()[0].pT()/GeV, weight);
00092         }
00093       }
00094 
00095     }
00096 
00097 
00098     // Normalize histos
00099     void finalize() {
00100       normalize(_hist_wpt_dressed_el);
00101       normalize(_hist_wpt_bare_el);
00102       normalize(_hist_wpt_dressed_mu);
00103       normalize(_hist_wpt_bare_mu);
00104     }
00105 
00106     //@}
00107 
00108 
00109   private:
00110 
00111     Histo1DPtr _hist_wpt_dressed_el;
00112     Histo1DPtr _hist_wpt_bare_el;
00113     Histo1DPtr _hist_wpt_dressed_mu;
00114     Histo1DPtr _hist_wpt_bare_mu;
00115 
00116   };
00117 
00118 
00119   // Hook for the plugin system
00120   DECLARE_RIVET_PLUGIN(ATLAS_2011_I925932);
00121 
00122 }