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