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