MC_WWJETS.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analyses/MC_JetAnalysis.hh" 00003 #include "Rivet/Projections/WFinder.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Projections/VetoedFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 00011 00012 /// @brief MC validation analysis for W^+[enu]W^-[munu] + jets events 00013 class MC_WWJETS : public MC_JetAnalysis { 00014 public: 00015 00016 /// Default constructor 00017 MC_WWJETS() 00018 : MC_JetAnalysis("MC_WWJETS", 4, "Jets") 00019 { } 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 /// Book histograms 00026 void init() { 00027 FinalState fs; 00028 WFinder wenufinder(fs, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00029 addProjection(wenufinder, "WenuFinder"); 00030 00031 VetoedFinalState wmnuinput; 00032 wmnuinput.addVetoOnThisFinalState(wenufinder); 00033 WFinder wmnufinder(wmnuinput, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00034 addProjection(wmnufinder, "WmnuFinder"); 00035 00036 VetoedFinalState jetinput; 00037 jetinput 00038 .addVetoOnThisFinalState(wenufinder) 00039 .addVetoOnThisFinalState(wmnufinder); 00040 FastJets jetpro(jetinput, FastJets::ANTIKT, 0.4); 00041 addProjection(jetpro, "Jets"); 00042 00043 // correlations with jets 00044 _h_WW_jet1_deta = bookHisto1D("WW_jet1_deta", 70, -7.0, 7.0); 00045 _h_WW_jet1_dR = bookHisto1D("WW_jet1_dR", 25, 1.5, 7.0); 00046 _h_We_jet1_dR = bookHisto1D("We_jet1_dR", 25, 0.0, 7.0); 00047 00048 // global stuff 00049 _h_HT = bookHisto1D("HT", logspace(100, 100.0, 0.5*(sqrtS()>0.?sqrtS():14000.))); 00050 _h_jets_m_12 = bookHisto1D("jets_m_12", logspace(100, 1.0, 0.25*(sqrtS()>0.?sqrtS():14000.))); 00051 00052 MC_JetAnalysis::init(); 00053 } 00054 00055 00056 00057 /// Do the analysis 00058 void analyze(const Event& e) { 00059 const double weight = e.weight(); 00060 00061 const WFinder& wenufinder = applyProjection<WFinder>(e, "WenuFinder"); 00062 if (wenufinder.bosons().size() !=1 ) vetoEvent; 00063 00064 const WFinder& wmnufinder = applyProjection<WFinder>(e, "WmnuFinder"); 00065 if (wmnufinder.bosons().size() !=1 ) vetoEvent; 00066 00067 FourMomentum wenu = wenufinder.bosons()[0].momentum(); 00068 FourMomentum wmnu = wmnufinder.bosons()[0].momentum(); 00069 FourMomentum ww = wenu + wmnu; 00070 // find leptons 00071 FourMomentum ep = wenufinder.constituentLeptons()[0].momentum(); 00072 FourMomentum enu = wenufinder.constituentNeutrinos()[0].momentum(); 00073 FourMomentum mm = wmnufinder.constituentLeptons()[0].momentum(); 00074 FourMomentum mnu = wmnufinder.constituentNeutrinos()[0].momentum(); 00075 00076 const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(_jetptcut); 00077 if (jets.size() > 0) { 00078 _h_WW_jet1_deta->fill(ww.eta()-jets[0].eta(), weight); 00079 _h_WW_jet1_dR->fill(deltaR(ww, jets[0].momentum()), weight); 00080 _h_We_jet1_dR->fill(deltaR(ep, jets[0].momentum()), weight); 00081 } 00082 00083 double HT = ep.pT() + mm.pT() + FourMomentum(enu+mnu).pT(); 00084 foreach (const Jet& jet, jets) HT += jet.pT(); 00085 if (HT > 0.0) _h_HT->fill(HT/GeV, weight); 00086 00087 if (jets.size() > 1) { 00088 const FourMomentum jet1 = jets[0].momentum(); 00089 const FourMomentum jet2 = jets[1].momentum(); 00090 _h_jets_m_12->fill((jet1+jet2).mass()/GeV, weight); 00091 } 00092 00093 MC_JetAnalysis::analyze(e); 00094 } 00095 00096 00097 /// Finalize 00098 void finalize() { 00099 const double norm = crossSection()/picobarn/sumOfWeights(); 00100 scale(_h_WW_jet1_deta, norm); 00101 scale(_h_WW_jet1_dR, norm); 00102 scale(_h_We_jet1_dR, norm); 00103 scale(_h_jets_m_12, norm); 00104 scale(_h_HT, norm); 00105 MC_JetAnalysis::finalize(); 00106 } 00107 00108 //@} 00109 00110 00111 private: 00112 00113 /// @name Histograms 00114 //@{ 00115 Histo1DPtr _h_WW_jet1_deta; 00116 Histo1DPtr _h_WW_jet1_dR; 00117 Histo1DPtr _h_We_jet1_dR; 00118 Histo1DPtr _h_jets_m_12; 00119 Histo1DPtr _h_HT; 00120 //@} 00121 00122 }; 00123 00124 00125 00126 // The hook for the plugin system 00127 DECLARE_RIVET_PLUGIN(MC_WWJETS); 00128 00129 } Generated on Wed Oct 7 2015 12:09:14 for The Rivet MC analysis system by ![]() |