ATLAS_2010_S8919674.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/VetoedFinalState.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Projections/WFinder.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// W + jets jet multiplicities and pT 00011 class ATLAS_2010_S8919674 : public Analysis { 00012 public: 00013 00014 /// @name Constructors etc. 00015 //@{ 00016 00017 /// Constructor 00018 ATLAS_2010_S8919674() 00019 : Analysis("ATLAS_2010_S8919674") 00020 { } 00021 00022 //@} 00023 00024 00025 public: 00026 00027 /// @name Analysis methods 00028 //@{ 00029 00030 /// Book histograms and initialise projections before the run 00031 void init() { 00032 00033 // Set up projections to find the electron and muon Ws 00034 FinalState fs; 00035 Cut cuts = (Cuts::abseta < 1.37 || Cuts::absetaIn(1.52, 2.47)) && Cuts::pT > 20*GeV; 00036 WFinder wfinder_e(fs, cuts, PID::ELECTRON, 0*GeV, 1000*GeV, 25*GeV); 00037 addProjection(wfinder_e, "W_e"); 00038 WFinder wfinder_mu(fs, Cuts::abseta < 2.4 && Cuts::pT > 20*GeV, PID::MUON, 0*GeV, 1000*GeV, 25*GeV); 00039 addProjection(wfinder_mu, "W_mu"); 00040 00041 // Input for the jets: no neutrinos, no muons, and no electron which passed the electron cuts 00042 VetoedFinalState veto; 00043 veto.addVetoOnThisFinalState(wfinder_e); 00044 veto.addVetoOnThisFinalState(wfinder_mu); 00045 veto.addVetoPairId(PID::MUON); 00046 veto.vetoNeutrinos(); 00047 FastJets jets(veto, FastJets::ANTIKT, 0.4); 00048 addProjection(jets, "jets"); 00049 00050 /// Book histograms 00051 _h_el_njet_inclusive = bookHisto1D(1,1,1); 00052 _h_mu_njet_inclusive = bookHisto1D(2,1,1); 00053 _h_el_pT_jet1 = bookHisto1D(5,1,1); 00054 _h_mu_pT_jet1 = bookHisto1D(6,1,1); 00055 _h_el_pT_jet2 = bookHisto1D(7,1,1); 00056 _h_mu_pT_jet2 = bookHisto1D(8,1,1); 00057 } 00058 00059 00060 /// Perform the per-event analysis 00061 void analyze(const Event& event) { 00062 const double weight = event.weight(); 00063 00064 const Jets& jets = applyProjection<FastJets>(event, "jets").jetsByPt(20.0*GeV); 00065 00066 const WFinder& We = applyProjection<WFinder>(event, "W_e"); 00067 if (We.bosons().size() == 1) { 00068 const FourMomentum& p_miss = We.constituentNeutrinos()[0].momentum(); 00069 const FourMomentum& p_lept = We.constituentLeptons()[0].momentum(); 00070 if (p_miss.Et() > 25*GeV && We.mT() > 40*GeV) { 00071 Jets js; 00072 foreach (const Jet& j, jets) { 00073 if (j.abseta() < 2.8 && deltaR(p_lept, j.momentum()) > 0.5) 00074 js.push_back(j); 00075 } 00076 _h_el_njet_inclusive->fill(0, weight); 00077 if (js.size() >= 1) { 00078 _h_el_njet_inclusive->fill(1, weight); 00079 _h_el_pT_jet1->fill(js[0].pT(), weight); 00080 } 00081 if (js.size() >= 2) { 00082 _h_el_njet_inclusive->fill(2, weight); 00083 _h_el_pT_jet2->fill(js[1].pT(), weight); 00084 } 00085 if (js.size() >= 3) { 00086 _h_el_njet_inclusive->fill(3, weight); 00087 } 00088 } 00089 } 00090 00091 const WFinder& Wm = applyProjection<WFinder>(event, "W_mu"); 00092 if (Wm.bosons().size() == 1) { 00093 const FourMomentum& p_miss = Wm.constituentNeutrinos()[0].momentum(); 00094 const FourMomentum& p_lept = Wm.constituentLeptons()[0].momentum(); 00095 if (p_miss.Et() > 25*GeV && Wm.mT() > 40*GeV) { 00096 Jets js; 00097 foreach (const Jet& j, jets) { 00098 if (j.abseta() < 2.8 && deltaR(p_lept, j.momentum()) > 0.5) 00099 js.push_back(j); 00100 } 00101 _h_mu_njet_inclusive->fill(0, weight); 00102 if (js.size() >= 1) { 00103 _h_mu_njet_inclusive->fill(1, weight); 00104 _h_mu_pT_jet1->fill(js[0].pT(), weight); 00105 } 00106 if (js.size() >= 2) { 00107 _h_mu_njet_inclusive->fill(2, weight); 00108 _h_mu_pT_jet2->fill(js[1].pT(), weight); 00109 } 00110 if (js.size() >= 3) { 00111 _h_mu_njet_inclusive->fill(3, weight); 00112 } 00113 if (js.size() >= 4) { 00114 _h_mu_njet_inclusive->fill(4, weight); 00115 } 00116 } 00117 } 00118 00119 } 00120 00121 00122 /// Normalise histograms etc., after the run 00123 void finalize() { 00124 double normfac = crossSection()/sumOfWeights(); 00125 scale(_h_el_njet_inclusive, normfac); 00126 scale(_h_mu_njet_inclusive, normfac); 00127 scale(_h_el_pT_jet1, normfac); 00128 scale(_h_mu_pT_jet1, normfac); 00129 scale(_h_el_pT_jet2, normfac); 00130 scale(_h_mu_pT_jet2, normfac); 00131 } 00132 00133 //@} 00134 00135 00136 private: 00137 00138 /// @name Histograms 00139 //@{ 00140 00141 Histo1DPtr _h_el_njet_inclusive; 00142 Histo1DPtr _h_mu_njet_inclusive; 00143 Histo1DPtr _h_el_pT_jet1; 00144 Histo1DPtr _h_mu_pT_jet1; 00145 Histo1DPtr _h_el_pT_jet2; 00146 Histo1DPtr _h_mu_pT_jet2; 00147 //@} 00148 00149 }; 00150 00151 00152 00153 // The hook for the plugin system 00154 DECLARE_RIVET_PLUGIN(ATLAS_2010_S8919674); 00155 00156 } Generated on Thu Mar 10 2016 08:29:46 for The Rivet MC analysis system by ![]() |