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