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