MC_ZZINC.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 #include "Rivet/Projections/VetoedFinalState.hh" 00005 00006 namespace Rivet { 00007 00008 /// @brief MC validation analysis for Z[ee]Z[mumu] events 00009 class MC_ZZINC : public Analysis { 00010 public: 00011 00012 /// Default constructor 00013 MC_ZZINC() 00014 : Analysis("MC_ZZINC") 00015 { } 00016 00017 00018 /// @name Analysis methods 00019 //@{ 00020 00021 /// Book histograms 00022 void init() { 00023 FinalState fs; 00024 ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, PID::ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); 00025 addProjection(zeefinder, "ZeeFinder"); 00026 00027 VetoedFinalState zmminput; 00028 zmminput.addVetoOnThisFinalState(zeefinder); 00029 ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, PID::MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); 00030 addProjection(zmmfinder, "ZmmFinder"); 00031 00032 // properties of the pair momentum 00033 _h_ZZ_pT = bookHisto1D("ZZ_pT", logspace(100, 1.0, 0.5*sqrtS())); 00034 _h_ZZ_pT_peak = bookHisto1D("ZZ_pT_peak", 25, 0.0, 25.0); 00035 _h_ZZ_eta = bookHisto1D("ZZ_eta", 40, -7.0, 7.0); 00036 _h_ZZ_phi = bookHisto1D("ZZ_phi", 25, 0.0, TWOPI); 00037 _h_ZZ_m = bookHisto1D("ZZ_m", logspace(100, 150.0, 180.0+0.25*sqrtS())); 00038 00039 // correlations between the ZZ 00040 _h_ZZ_dphi = bookHisto1D("ZZ_dphi", 25, 0.0, PI); /// @todo non-linear? 00041 _h_ZZ_deta = bookHisto1D("ZZ_deta", 25, -7.0, 7.0); 00042 _h_ZZ_dR = bookHisto1D("ZZ_dR", 25, 0.5, 7.0); 00043 _h_ZZ_dpT = bookHisto1D("ZZ_dpT", logspace(100, 1.0, 0.5*sqrtS())); 00044 _h_ZZ_costheta_planes = bookHisto1D("ZZ_costheta_planes", 25, -1.0, 1.0); 00045 00046 // properties of the Z bosons 00047 _h_Z_pT = bookHisto1D("Z_pT", logspace(100, 10.0, 0.25*sqrtS())); 00048 _h_Z_eta = bookHisto1D("Z_eta", 70, -7.0, 7.0); 00049 00050 // properties of the leptons 00051 _h_Zl_pT = bookHisto1D("Zl_pT", logspace(100, 30.0, 0.1 00052 *sqrtS())); 00053 _h_Zl_eta = bookHisto1D("Zl_eta", 40, -3.5, 3.5); 00054 00055 // correlations between the opposite charge leptons 00056 _h_ZeZm_dphi = bookHisto1D("ZeZm_dphi", 25, 0.0, PI); 00057 _h_ZeZm_deta = bookHisto1D("ZeZm_deta", 25, -5.0, 5.0); 00058 _h_ZeZm_dR = bookHisto1D("ZeZm_dR", 25, 0.5, 5.0); 00059 _h_ZeZm_m = bookHisto1D("ZeZm_m", 100, 0.0, 300.0); 00060 00061 } 00062 00063 00064 00065 /// Do the analysis 00066 void analyze(const Event & e) { 00067 const double weight = e.weight(); 00068 00069 const ZFinder& zeefinder = applyProjection<ZFinder>(e, "ZeeFinder"); 00070 if (zeefinder.bosons().size()!=1) { 00071 vetoEvent; 00072 } 00073 00074 const ZFinder& zmmfinder = applyProjection<ZFinder>(e, "ZmmFinder"); 00075 if (zmmfinder.bosons().size()!=1) { 00076 vetoEvent; 00077 } 00078 00079 FourMomentum zee(zeefinder.bosons()[0].momentum()); 00080 FourMomentum zmm(zmmfinder.bosons()[0].momentum()); 00081 FourMomentum zz(zee+zmm); 00082 // find leptons 00083 FourMomentum ep(zeefinder.constituents()[0].momentum()), 00084 em(zeefinder.constituents()[1].momentum()), 00085 mp(zmmfinder.constituents()[0].momentum()), 00086 mm(zmmfinder.constituents()[1].momentum()); 00087 00088 00089 _h_ZZ_pT->fill(zz.pT(),weight); 00090 _h_ZZ_pT_peak->fill(zz.pT(),weight); 00091 _h_ZZ_eta->fill(zz.eta(),weight); 00092 _h_ZZ_phi->fill(zz.azimuthalAngle(),weight); 00093 double mzz2=zz.mass2(); 00094 if (mzz2>0.0) _h_ZZ_m->fill(sqrt(mzz2), weight); 00095 00096 _h_ZZ_dphi->fill(mapAngle0ToPi(zee.phi()-zmm.phi()), weight); 00097 _h_ZZ_deta->fill(zee.eta()-zmm.eta(), weight); 00098 _h_ZZ_dR->fill(deltaR(zee,zmm), weight); 00099 _h_ZZ_dpT->fill(fabs(zee.pT()-zmm.pT()), weight); 00100 00101 Vector3 crossZee = ep.vector3().cross(em.vector3()); 00102 Vector3 crossZmm = mp.vector3().cross(mm.vector3()); 00103 double costheta = crossZee.dot(crossZmm)/crossZee.mod()/crossZmm.mod(); 00104 _h_ZZ_costheta_planes->fill(costheta, weight); 00105 00106 _h_Z_pT->fill(zee.pT(),weight); 00107 _h_Z_pT->fill(zmm.pT(),weight); 00108 _h_Z_eta->fill(zee.eta(),weight); 00109 _h_Z_eta->fill(zmm.eta(),weight); 00110 00111 _h_Zl_pT->fill(ep.pT(), weight); 00112 _h_Zl_pT->fill(em.pT(), weight); 00113 _h_Zl_pT->fill(mp.pT(), weight); 00114 _h_Zl_pT->fill(mm.pT(), weight); 00115 _h_Zl_eta->fill(ep.eta(), weight); 00116 _h_Zl_eta->fill(em.eta(), weight); 00117 _h_Zl_eta->fill(mp.eta(), weight); 00118 _h_Zl_eta->fill(mm.eta(), weight); 00119 00120 _h_ZeZm_dphi->fill(mapAngle0ToPi(ep.phi()-mm.phi()), weight); 00121 _h_ZeZm_deta->fill(ep.eta()-mm.eta(), weight); 00122 _h_ZeZm_dR->fill(deltaR(ep,mm), weight); 00123 double m2=FourMomentum(ep+mm).mass2(); 00124 if (m2 < 0) m2 = 0.0; 00125 _h_ZeZm_m->fill(sqrt(m2), weight); 00126 } 00127 00128 00129 /// Finalize 00130 void finalize() { 00131 double norm=crossSection()/sumOfWeights(); 00132 scale(_h_ZZ_pT, norm); 00133 scale(_h_ZZ_pT_peak, norm); 00134 scale(_h_ZZ_eta, norm); 00135 scale(_h_ZZ_phi, norm); 00136 scale(_h_ZZ_m, norm); 00137 scale(_h_ZZ_dphi, norm); 00138 scale(_h_ZZ_deta, norm); 00139 scale(_h_ZZ_dR, norm); 00140 scale(_h_ZZ_dpT, norm); 00141 scale(_h_ZZ_costheta_planes, norm); 00142 scale(_h_Z_pT, norm); 00143 scale(_h_Z_eta, norm); 00144 scale(_h_Zl_pT, norm); 00145 scale(_h_Zl_eta, norm); 00146 scale(_h_ZeZm_dphi, norm); 00147 scale(_h_ZeZm_deta, norm); 00148 scale(_h_ZeZm_dR, norm); 00149 scale(_h_ZeZm_m, norm); 00150 } 00151 00152 //@} 00153 00154 00155 private: 00156 00157 /// @name Histograms 00158 //@{ 00159 Histo1DPtr _h_ZZ_pT; 00160 Histo1DPtr _h_ZZ_pT_peak; 00161 Histo1DPtr _h_ZZ_eta; 00162 Histo1DPtr _h_ZZ_phi; 00163 Histo1DPtr _h_ZZ_m; 00164 Histo1DPtr _h_ZZ_dphi; 00165 Histo1DPtr _h_ZZ_deta; 00166 Histo1DPtr _h_ZZ_dR; 00167 Histo1DPtr _h_ZZ_dpT; 00168 Histo1DPtr _h_ZZ_costheta_planes; 00169 Histo1DPtr _h_Z_pT; 00170 Histo1DPtr _h_Z_eta; 00171 Histo1DPtr _h_Zl_pT; 00172 Histo1DPtr _h_Zl_eta; 00173 Histo1DPtr _h_ZeZm_dphi; 00174 Histo1DPtr _h_ZeZm_deta; 00175 Histo1DPtr _h_ZeZm_dR; 00176 Histo1DPtr _h_ZeZm_m; 00177 //@} 00178 00179 }; 00180 00181 00182 00183 // The hook for the plugin system 00184 DECLARE_RIVET_PLUGIN(MC_ZZINC); 00185 00186 } Generated on Fri Oct 25 2013 12:41:46 for The Rivet MC analysis system by ![]() |