MC_WWINC.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/WFinder.hh" 00004 #include "Rivet/Projections/VetoedFinalState.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief MC validation analysis for W^+[enu]W^-[munu] events 00010 class MC_WWINC : public Analysis { 00011 public: 00012 00013 /// Default constructor 00014 MC_WWINC() 00015 : Analysis("MC_WWINC") 00016 { } 00017 00018 00019 /// @name Analysis methods 00020 //@{ 00021 00022 /// Book histograms 00023 void init() { 00024 FinalState fs; 00025 WFinder wenufinder(fs, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00026 addProjection(wenufinder, "WenuFinder"); 00027 00028 VetoedFinalState wmnuinput; 00029 wmnuinput.addVetoOnThisFinalState(wenufinder); 00030 WFinder wmnufinder(wmnuinput, Cuts::abseta < 3.5 && Cuts::pT > 25*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00031 addProjection(wmnufinder, "WmnuFinder"); 00032 00033 // properties of the pair momentum 00034 double sqrts = sqrtS()>0. ? sqrtS() : 14000.; 00035 _h_WW_pT = bookHisto1D("WW_pT", logspace(100, 1.0, 0.5*sqrts)); 00036 _h_WW_pT_peak = bookHisto1D("WW_pT_peak", 25, 0.0, 25.0); 00037 _h_WW_eta = bookHisto1D("WW_eta", 40, -7.0, 7.0); 00038 _h_WW_phi = bookHisto1D("WW_phi", 25, 0.0, TWOPI); 00039 _h_WW_m = bookHisto1D("WW_m", logspace(100, 150.0, 180.0+0.25*sqrts)); 00040 00041 // correlations between the WW 00042 _h_WW_dphi = bookHisto1D("WW_dphi", 25, 0.0, PI); /// @todo non-linear? 00043 _h_WW_deta = bookHisto1D("WW_deta", 25, -7.0, 7.0); 00044 _h_WW_dR = bookHisto1D("WW_dR", 25, 0.5, 7.0); 00045 _h_WW_dpT = bookHisto1D("WW_dpT", logspace(100, 1.0, 0.5*sqrts)); 00046 _h_WW_costheta_planes = bookHisto1D("WW_costheta_planes", 25, -1.0, 1.0); 00047 00048 /// @todo fuer WW: missing ET 00049 00050 // properties of the W bosons 00051 _h_W_pT = bookHisto1D("W_pT", logspace(100, 10.0, 0.25*sqrts)); 00052 _h_W_eta = bookHisto1D("W_eta", 70, -7.0, 7.0); 00053 00054 // properties of the leptons 00055 _h_Wl_pT = bookHisto1D("Wl_pT", logspace(100, 30.0, 0.1 00056 *sqrts)); 00057 _h_Wl_eta = bookHisto1D("Wl_eta", 40, -3.5, 3.5); 00058 00059 // correlations between the opposite charge leptons 00060 _h_WeWm_dphi = bookHisto1D("WeWm_dphi", 25, 0.0, PI); 00061 _h_WeWm_deta = bookHisto1D("WeWm_deta", 25, -5.0, 5.0); 00062 _h_WeWm_dR = bookHisto1D("WeWm_dR", 25, 0.5, 5.0); 00063 _h_WeWm_m = bookHisto1D("WeWm_m", 100, 0.0, 300.0); 00064 } 00065 00066 00067 00068 /// Do the analysis 00069 void analyze(const Event & e) { 00070 const double weight = e.weight(); 00071 00072 const WFinder& wenufinder = applyProjection<WFinder>(e, "WenuFinder"); 00073 if (wenufinder.bosons().size()!=1) { 00074 vetoEvent; 00075 } 00076 00077 const WFinder& wmnufinder = applyProjection<WFinder>(e, "WmnuFinder"); 00078 if (wmnufinder.bosons().size()!=1) { 00079 vetoEvent; 00080 } 00081 00082 FourMomentum wenu(wenufinder.bosons()[0].momentum()); 00083 FourMomentum wmnu(wmnufinder.bosons()[0].momentum()); 00084 FourMomentum ww(wenu+wmnu); 00085 // find leptons 00086 FourMomentum ep=wenufinder.constituentLeptons()[0].momentum(); 00087 FourMomentum enu=wenufinder.constituentNeutrinos()[0].momentum(); 00088 FourMomentum mm=wmnufinder.constituentLeptons()[0].momentum(); 00089 FourMomentum mnu=wmnufinder.constituentNeutrinos()[0].momentum(); 00090 00091 _h_WW_pT->fill(ww.pT(),weight); 00092 _h_WW_pT_peak->fill(ww.pT(),weight); 00093 _h_WW_eta->fill(ww.eta(),weight); 00094 _h_WW_phi->fill(ww.phi(),weight); 00095 double mww2=ww.mass2(); 00096 if (mww2>0.0) _h_WW_m->fill(sqrt(mww2), weight); 00097 00098 _h_WW_dphi->fill(mapAngle0ToPi(wenu.phi()-wmnu.phi()), weight); 00099 _h_WW_deta->fill(wenu.eta()-wmnu.eta(), weight); 00100 _h_WW_dR->fill(deltaR(wenu,wmnu), weight); 00101 _h_WW_dpT->fill(fabs(wenu.pT()-wmnu.pT()), weight); 00102 00103 Vector3 crossWenu = ep.p3().cross(enu.p3()); 00104 Vector3 crossWmnu = mm.p3().cross(mnu.p3()); 00105 double costheta = crossWenu.dot(crossWmnu)/crossWenu.mod()/crossWmnu.mod(); 00106 _h_WW_costheta_planes->fill(costheta, weight); 00107 00108 _h_W_pT->fill(wenu.pT(),weight); 00109 _h_W_pT->fill(wmnu.pT(),weight); 00110 _h_W_eta->fill(wenu.eta(),weight); 00111 _h_W_eta->fill(wmnu.eta(),weight); 00112 00113 _h_Wl_pT->fill(ep.pT(), weight); 00114 _h_Wl_pT->fill(mm.pT(), weight); 00115 _h_Wl_eta->fill(ep.eta(), weight); 00116 _h_Wl_eta->fill(mm.eta(), weight); 00117 00118 _h_WeWm_dphi->fill(mapAngle0ToPi(ep.phi()-mm.phi()), weight); 00119 _h_WeWm_deta->fill(ep.eta()-mm.eta(), weight); 00120 _h_WeWm_dR->fill(deltaR(ep,mm), weight); 00121 double m2=FourMomentum(ep+mm).mass2(); 00122 if (m2 < 0) m2 = 0.0; 00123 _h_WeWm_m->fill(sqrt(m2), weight); 00124 } 00125 00126 00127 /// Finalize 00128 void finalize() { 00129 const double norm = crossSection()/picobarn/sumOfWeights(); 00130 scale(_h_WW_pT, norm); 00131 scale(_h_WW_pT_peak, norm); 00132 scale(_h_WW_eta, norm); 00133 scale(_h_WW_phi, norm); 00134 scale(_h_WW_m, norm); 00135 scale(_h_WW_dphi, norm); 00136 scale(_h_WW_deta, norm); 00137 scale(_h_WW_dR, norm); 00138 scale(_h_WW_dpT, norm); 00139 scale(_h_WW_costheta_planes, norm); 00140 scale(_h_W_pT, norm); 00141 scale(_h_W_eta, norm); 00142 scale(_h_Wl_pT, norm); 00143 scale(_h_Wl_eta, norm); 00144 scale(_h_WeWm_dphi, norm); 00145 scale(_h_WeWm_deta, norm); 00146 scale(_h_WeWm_dR, norm); 00147 scale(_h_WeWm_m, norm); 00148 } 00149 00150 //@} 00151 00152 00153 private: 00154 00155 /// @name Histograms 00156 //@{ 00157 Histo1DPtr _h_WW_pT; 00158 Histo1DPtr _h_WW_pT_peak; 00159 Histo1DPtr _h_WW_eta; 00160 Histo1DPtr _h_WW_phi; 00161 Histo1DPtr _h_WW_m; 00162 Histo1DPtr _h_WW_dphi; 00163 Histo1DPtr _h_WW_deta; 00164 Histo1DPtr _h_WW_dR; 00165 Histo1DPtr _h_WW_dpT; 00166 Histo1DPtr _h_WW_costheta_planes; 00167 Histo1DPtr _h_W_pT; 00168 Histo1DPtr _h_W_eta; 00169 Histo1DPtr _h_Wl_pT; 00170 Histo1DPtr _h_Wl_eta; 00171 Histo1DPtr _h_WeWm_dphi; 00172 Histo1DPtr _h_WeWm_deta; 00173 Histo1DPtr _h_WeWm_dR; 00174 Histo1DPtr _h_WeWm_m; 00175 //@} 00176 00177 }; 00178 00179 00180 00181 // The hook for the plugin system 00182 DECLARE_RIVET_PLUGIN(MC_WWINC); 00183 00184 } Generated on Wed Oct 7 2015 12:09:14 for The Rivet MC analysis system by ![]() |