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