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