MC_ZZJETS.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analyses/MC_JetAnalysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Projections/VetoedFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 using namespace Cuts; 00010 00011 /// @brief MC validation analysis for Z[ee]Z[mumu] + jets events 00012 class MC_ZZJETS : public MC_JetAnalysis { 00013 public: 00014 00015 /// Default constructor 00016 MC_ZZJETS() 00017 : MC_JetAnalysis("MC_ZZJETS", 4, "Jets") 00018 { } 00019 00020 00021 /// @name Analysis methods 00022 //@{ 00023 00024 /// Book histograms 00025 void init() { 00026 Cut cut = etaIn(-3.5,3.5) & (pT >= 25.0*GeV); 00027 ZFinder zeefinder(FinalState(), cut, PID::ELECTRON, 65*GeV, 115*GeV, 00028 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); 00029 addProjection(zeefinder, "ZeeFinder"); 00030 00031 VetoedFinalState zmminput; 00032 zmminput.addVetoOnThisFinalState(zeefinder); 00033 ZFinder zmmfinder(zmminput, cut, PID::MUON, 65*GeV, 115*GeV, 00034 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); 00035 addProjection(zmmfinder, "ZmmFinder"); 00036 00037 VetoedFinalState jetinput; 00038 jetinput 00039 .addVetoOnThisFinalState(zeefinder) 00040 .addVetoOnThisFinalState(zmmfinder); 00041 FastJets jetpro(jetinput, FastJets::ANTIKT, 0.4); 00042 addProjection(jetpro, "Jets"); 00043 00044 // Correlations with jets 00045 _h_ZZ_jet1_deta = bookHisto1D("ZZ_jet1_deta", 70, -7.0, 7.0); 00046 _h_ZZ_jet1_dR = bookHisto1D("ZZ_jet1_dR", 25, 1.5, 7.0); 00047 _h_Ze_jet1_dR = bookHisto1D("Ze_jet1_dR", 25, 0.0, 7.0); 00048 00049 // Global stuff 00050 _h_HT = bookHisto1D("HT", logspace(100, 100.0, 0.5*sqrtS()/GeV)); 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 ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder"); 00062 if (zeefinder.bosons().size() != 1) vetoEvent; 00063 00064 const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder"); 00065 if (zmmfinder.bosons().size() != 1) vetoEvent; 00066 00067 // Z momenta 00068 const FourMomentum& zee = zeefinder.bosons()[0].momentum(); 00069 const FourMomentum& zmm = zmmfinder.bosons()[0].momentum(); 00070 const FourMomentum zz = zee + zmm; 00071 // Lepton momenta 00072 const FourMomentum& ep = zeefinder.constituents()[0].momentum(); 00073 const FourMomentum& em = zeefinder.constituents()[1].momentum(); 00074 const FourMomentum& mp = zmmfinder.constituents()[0].momentum(); 00075 const FourMomentum& mm = zmmfinder.constituents()[1].momentum(); 00076 00077 const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(_jetptcut); 00078 if (jets.size() > 0) { 00079 const FourMomentum j0 = jets[0].momentum(); 00080 _h_ZZ_jet1_deta->fill(zz.eta()-j0.eta(), weight); 00081 _h_ZZ_jet1_dR->fill(deltaR(zz, j0), weight); 00082 _h_Ze_jet1_dR->fill(deltaR(ep, j0), weight); 00083 } 00084 00085 double HT = ep.pT() + em.pT() + mp.pT() + mm.pT(); 00086 foreach (const Jet& jet, jets) HT += jet.pT(); 00087 if (HT > 0.0) _h_HT->fill(HT/GeV, weight); 00088 00089 MC_JetAnalysis::analyze(e); 00090 } 00091 00092 00093 /// Finalize 00094 void finalize() { 00095 const double norm = crossSection()/picobarn; 00096 normalize(_h_ZZ_jet1_deta, norm); 00097 normalize(_h_ZZ_jet1_dR, norm); 00098 normalize(_h_Ze_jet1_dR, norm); 00099 normalize(_h_HT, norm); 00100 MC_JetAnalysis::finalize(); 00101 } 00102 00103 //@} 00104 00105 00106 private: 00107 00108 /// @name Histograms 00109 //@{ 00110 Histo1DPtr _h_ZZ_jet1_deta; 00111 Histo1DPtr _h_ZZ_jet1_dR; 00112 Histo1DPtr _h_Ze_jet1_dR; 00113 Histo1DPtr _h_HT; 00114 //@} 00115 00116 }; 00117 00118 00119 00120 // The hook for the plugin system 00121 DECLARE_RIVET_PLUGIN(MC_ZZJETS); 00122 00123 } Generated on Tue Sep 30 2014 19:45:46 for The Rivet MC analysis system by ![]() |