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