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