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 #include "Rivet/Tools/Logging.hh" 00007 #include "Rivet/Tools/ParticleIdUtils.hh" 00008 #include "Rivet/RivetYODA.hh" 00009 00010 namespace Rivet { 00011 00012 /// @brief MC validation analysis for Z[ee]Z[mumu] + jets events 00013 class MC_ZZJETS : public MC_JetAnalysis { 00014 public: 00015 00016 /// Default constructor 00017 MC_ZZJETS() 00018 : MC_JetAnalysis("MC_ZZJETS", 4, "Jets") 00019 { } 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 /// Book histograms 00026 void init() { 00027 FinalState fs; 00028 ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); 00029 addProjection(zeefinder, "ZeeFinder"); 00030 00031 VetoedFinalState zmminput; 00032 zmminput.addVetoOnThisFinalState(zeefinder); 00033 ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); 00034 addProjection(zmmfinder, "ZmmFinder"); 00035 00036 VetoedFinalState jetinput; 00037 jetinput 00038 .addVetoOnThisFinalState(zeefinder) 00039 .addVetoOnThisFinalState(zmmfinder); 00040 FastJets jetpro(jetinput, FastJets::KT, 0.7); 00041 addProjection(jetpro, "Jets"); 00042 00043 // properties of the pair momentum 00044 _h_ZZ_pT = bookHisto1D("ZZ_pT", logspace(100, 1.0, 0.5*sqrtS())); 00045 _h_ZZ_pT_peak = bookHisto1D("ZZ_pT_peak", 25, 0.0, 25.0); 00046 _h_ZZ_eta = bookHisto1D("ZZ_eta", 40, -7.0, 7.0); 00047 _h_ZZ_phi = bookHisto1D("ZZ_phi", 25, 0.0, TWOPI); 00048 _h_ZZ_m = bookHisto1D("ZZ_m", logspace(100, 150.0, 180.0+0.25*sqrtS())); 00049 00050 // correlations between the ZZ 00051 _h_ZZ_dphi = bookHisto1D("ZZ_dphi", 25, 0.0, PI); /// @todo non-linear? 00052 _h_ZZ_deta = bookHisto1D("ZZ_deta", 25, -7.0, 7.0); 00053 _h_ZZ_dR = bookHisto1D("ZZ_dR", 25, 0.5, 7.0); 00054 _h_ZZ_dpT = bookHisto1D("ZZ_dpT", logspace(100, 1.0, 0.5*sqrtS())); 00055 _h_ZZ_costheta_planes = bookHisto1D("ZZ_costheta_planes", 25, -1.0, 1.0); 00056 00057 /// @todo fuer WW: missing ET 00058 00059 // properties of the Z bosons 00060 _h_Z_pT = bookHisto1D("Z_pT", logspace(100, 10.0, 0.25*sqrtS())); 00061 _h_Z_eta = bookHisto1D("Z_eta", 70, -7.0, 7.0); 00062 00063 // properties of the leptons 00064 _h_Zl_pT = bookHisto1D("Zl_pT", logspace(100, 30.0, 0.1 00065 *sqrtS())); 00066 _h_Zl_eta = bookHisto1D("Zl_eta", 40, -3.5, 3.5); 00067 00068 // correlations between the opposite charge leptons 00069 _h_ZeZm_dphi = bookHisto1D("ZeZm_dphi", 25, 0.0, PI); 00070 _h_ZeZm_deta = bookHisto1D("ZeZm_deta", 25, -5.0, 5.0); 00071 _h_ZeZm_dR = bookHisto1D("ZeZm_dR", 25, 0.5, 5.0); 00072 _h_ZeZm_m = bookHisto1D("ZeZm_m", 100, 0.0, 300.0); 00073 00074 // correlations with jets 00075 _h_ZZ_jet1_deta = bookHisto1D("ZZ_jet1_deta", 70, -7.0, 7.0); 00076 _h_ZZ_jet1_dR = bookHisto1D("ZZ_jet1_dR", 25, 1.5, 7.0); 00077 _h_Ze_jet1_dR = bookHisto1D("Ze_jet1_dR", 25, 0.0, 7.0); 00078 00079 // global stuff 00080 _h_HT = bookHisto1D("HT", logspace(100, 100.0, 0.5*sqrtS())); 00081 00082 MC_JetAnalysis::init(); 00083 } 00084 00085 00086 00087 /// Do the analysis 00088 void analyze(const Event & e) { 00089 const double weight = e.weight(); 00090 00091 const ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder"); 00092 if (zeefinder.bosons().size()!=1) { 00093 vetoEvent; 00094 } 00095 00096 const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder"); 00097 if (zmmfinder.bosons().size()!=1) { 00098 vetoEvent; 00099 } 00100 00101 FourMomentum zee(zeefinder.bosons()[0].momentum()); 00102 FourMomentum zmm(zmmfinder.bosons()[0].momentum()); 00103 FourMomentum zz(zee+zmm); 00104 // find leptons 00105 FourMomentum ep(0.0,0.0,0.0,0.0), em(0.0,0.0,0.0,0.0); 00106 if (PID::threeCharge(zeefinder.constituents()[0])>0.0) { 00107 ep=zeefinder.constituents()[0].momentum(); 00108 em=zeefinder.constituents()[1].momentum(); 00109 } 00110 else { 00111 ep=zeefinder.constituents()[1].momentum(); 00112 em=zeefinder.constituents()[0].momentum(); 00113 } 00114 FourMomentum mp(0.0,0.0,0.0,0.0), mm(0.0,0.0,0.0,0.0); 00115 if (PID::threeCharge(zmmfinder.constituents()[0])>0.0) { 00116 mp=zmmfinder.constituents()[0].momentum(); 00117 mm=zmmfinder.constituents()[1].momentum(); 00118 } 00119 else { 00120 mp=zmmfinder.constituents()[1].momentum(); 00121 mm=zmmfinder.constituents()[0].momentum(); 00122 } 00123 00124 _h_ZZ_pT->fill(zz.pT(),weight); 00125 _h_ZZ_pT_peak->fill(zz.pT(),weight); 00126 _h_ZZ_eta->fill(zz.eta(),weight); 00127 _h_ZZ_phi->fill(zz.azimuthalAngle(),weight); 00128 double mzz2=zz.mass2(); 00129 if (mzz2>0.0) _h_ZZ_m->fill(sqrt(mzz2), weight); 00130 00131 _h_ZZ_dphi->fill(mapAngle0ToPi(zee.phi()-zmm.phi()), weight); 00132 _h_ZZ_deta->fill(zee.eta()-zmm.eta(), weight); 00133 _h_ZZ_dR->fill(deltaR(zee,zmm), weight); 00134 _h_ZZ_dpT->fill(fabs(zee.pT()-zmm.pT()), weight); 00135 00136 Vector3 crossZee = ep.vector3().cross(em.vector3()); 00137 Vector3 crossZmm = mp.vector3().cross(mm.vector3()); 00138 double costheta = crossZee.dot(crossZmm)/crossZee.mod()/crossZmm.mod(); 00139 _h_ZZ_costheta_planes->fill(costheta, weight); 00140 00141 _h_Z_pT->fill(zee.pT(),weight); 00142 _h_Z_pT->fill(zmm.pT(),weight); 00143 _h_Z_eta->fill(zee.eta(),weight); 00144 _h_Z_eta->fill(zmm.eta(),weight); 00145 00146 _h_Zl_pT->fill(ep.pT(), weight); 00147 _h_Zl_pT->fill(em.pT(), weight); 00148 _h_Zl_pT->fill(mp.pT(), weight); 00149 _h_Zl_pT->fill(mm.pT(), weight); 00150 _h_Zl_eta->fill(ep.eta(), weight); 00151 _h_Zl_eta->fill(em.eta(), weight); 00152 _h_Zl_eta->fill(mp.eta(), weight); 00153 _h_Zl_eta->fill(mm.eta(), weight); 00154 00155 _h_ZeZm_dphi->fill(mapAngle0ToPi(ep.phi()-mm.phi()), weight); 00156 _h_ZeZm_deta->fill(ep.eta()-mm.eta(), weight); 00157 _h_ZeZm_dR->fill(deltaR(ep,mm), weight); 00158 double m2=FourMomentum(ep+mm).mass2(); 00159 if (m2 < 0) m2 = 0.0; 00160 _h_ZeZm_m->fill(sqrt(m2), weight); 00161 00162 const FastJets& jetpro = applyProjection<FastJets>(e, "Jets"); 00163 const Jets& jets = jetpro.jetsByPt(20.0*GeV); 00164 if (jets.size() > 0) { 00165 _h_ZZ_jet1_deta->fill(zz.eta()-jets[0].momentum().eta(), weight); 00166 _h_ZZ_jet1_dR->fill(deltaR(zz, jets[0].momentum()), weight); 00167 _h_Ze_jet1_dR->fill(deltaR(ep, jets[0].momentum()), weight); 00168 } 00169 00170 double HT=ep.pT()+em.pT()+mp.pT()+mm.pT(); 00171 foreach (const Jet& jet, jets) { 00172 HT+=jet.momentum().pT(); 00173 } 00174 if (HT>0.0) _h_HT->fill(HT, weight); 00175 00176 MC_JetAnalysis::analyze(e); 00177 } 00178 00179 00180 /// Finalize 00181 void finalize() { 00182 double norm=crossSection()/sumOfWeights(); 00183 scale(_h_ZZ_pT, norm); 00184 scale(_h_ZZ_pT_peak, norm); 00185 scale(_h_ZZ_eta, norm); 00186 scale(_h_ZZ_phi, norm); 00187 scale(_h_ZZ_m, norm); 00188 scale(_h_ZZ_dphi, norm); 00189 scale(_h_ZZ_deta, norm); 00190 scale(_h_ZZ_dR, norm); 00191 scale(_h_ZZ_dpT, norm); 00192 scale(_h_ZZ_costheta_planes, norm); 00193 scale(_h_Z_pT, norm); 00194 scale(_h_Z_eta, norm); 00195 scale(_h_Zl_pT, norm); 00196 scale(_h_Zl_eta, norm); 00197 scale(_h_ZeZm_dphi, norm); 00198 scale(_h_ZeZm_deta, norm); 00199 scale(_h_ZeZm_dR, norm); 00200 scale(_h_ZeZm_m, norm); 00201 scale(_h_ZZ_jet1_deta, norm); 00202 scale(_h_ZZ_jet1_dR, norm); 00203 scale(_h_Ze_jet1_dR, norm); 00204 scale(_h_HT, norm); 00205 00206 MC_JetAnalysis::finalize(); 00207 } 00208 00209 //@} 00210 00211 00212 private: 00213 00214 /// @name Histograms 00215 //@{ 00216 Histo1DPtr _h_ZZ_pT; 00217 Histo1DPtr _h_ZZ_pT_peak; 00218 Histo1DPtr _h_ZZ_eta; 00219 Histo1DPtr _h_ZZ_phi; 00220 Histo1DPtr _h_ZZ_m; 00221 Histo1DPtr _h_ZZ_dphi; 00222 Histo1DPtr _h_ZZ_deta; 00223 Histo1DPtr _h_ZZ_dR; 00224 Histo1DPtr _h_ZZ_dpT; 00225 Histo1DPtr _h_ZZ_costheta_planes; 00226 Histo1DPtr _h_Z_pT; 00227 Histo1DPtr _h_Z_eta; 00228 Histo1DPtr _h_Zl_pT; 00229 Histo1DPtr _h_Zl_eta; 00230 Histo1DPtr _h_ZeZm_dphi; 00231 Histo1DPtr _h_ZeZm_deta; 00232 Histo1DPtr _h_ZeZm_dR; 00233 Histo1DPtr _h_ZeZm_m; 00234 Histo1DPtr _h_ZZ_jet1_deta; 00235 Histo1DPtr _h_ZZ_jet1_dR; 00236 Histo1DPtr _h_Ze_jet1_dR; 00237 Histo1DPtr _h_HT; 00238 //@} 00239 00240 }; 00241 00242 00243 00244 // The hook for the plugin system 00245 DECLARE_RIVET_PLUGIN(MC_ZZJETS); 00246 00247 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |