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