ATLAS_2011_S9225137.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/ChargedFinalState.hh" 00006 #include "Rivet/Projections/VisibleFinalState.hh" 00007 #include "Rivet/Projections/VetoedFinalState.hh" 00008 #include "Rivet/Projections/IdentifiedFinalState.hh" 00009 #include "Rivet/Projections/FastJets.hh" 00010 #include "Rivet/Tools/RivetMT2.hh" 00011 00012 namespace Rivet { 00013 00014 00015 class ATLAS_2011_S9225137 : public Analysis { 00016 public: 00017 00018 /// @name Constructors etc. 00019 //@{ 00020 00021 /// Constructor 00022 ATLAS_2011_S9225137() 00023 : Analysis("ATLAS_2011_S9225137") 00024 { } 00025 00026 //@} 00027 00028 00029 public: 00030 00031 /// @name Analysis methods 00032 //@{ 00033 00034 /// Book histograms and initialise projections before the run 00035 void init() { 00036 00037 // veto region electrons 00038 std::vector<std::pair<double, double> > eta_v_e; 00039 eta_v_e.push_back(make_pair(-1.52,-1.37)); 00040 eta_v_e.push_back(make_pair( 1.37, 1.52)); 00041 IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV); 00042 veto_elecs.acceptIdPair(PID::ELECTRON); 00043 addProjection(veto_elecs, "veto_elecs"); 00044 00045 // projection to find the electrons 00046 std::vector<std::pair<double, double> > eta_e; 00047 eta_e.push_back(make_pair(-2.47,2.47)); 00048 IdentifiedFinalState elecs(eta_e, 20.0*GeV); 00049 elecs.acceptIdPair(PID::ELECTRON); 00050 addProjection(elecs, "elecs"); 00051 00052 // projection to find the muons 00053 std::vector<std::pair<double, double> > eta_m; 00054 eta_m.push_back(make_pair(-2.4,2.4)); 00055 IdentifiedFinalState muons(eta_m, 10.0*GeV); 00056 muons.acceptIdPair(PID::MUON); 00057 addProjection(muons, "muons"); 00058 00059 // for pTmiss 00060 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00061 00062 VetoedFinalState vfs; 00063 vfs.addVetoPairId(PID::MUON); 00064 00065 /// Jet finder 00066 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), 00067 "AntiKtJets04"); 00068 00069 // all tracks (to do deltaR with leptons) 00070 addProjection(ChargedFinalState(-3.0,3.0),"cfs"); 00071 00072 /// Book histograms 00073 _etmisspT_55_NJ_6_obs = bookHisto1D( 1,1,1); 00074 _etmisspT_55_NJ_6_bac = bookHisto1D( 1,1,2); 00075 _etmisspT_55_NJ_6_sig = bookHisto1D( 1,1,3); 00076 _etmisspT_55_NJ_7_obs = bookHisto1D(13,1,1); 00077 _etmisspT_55_NJ_7_bac = bookHisto1D(13,1,2); 00078 _etmisspT_55_NJ_7_sig = bookHisto1D(13,1,3); 00079 _etmisspT_55_NJ_8_obs = bookHisto1D(15,1,1); 00080 _etmisspT_55_NJ_8_bac = bookHisto1D(15,1,2); 00081 _etmisspT_55_NJ_8_sig = bookHisto1D(15,1,3); 00082 _etmisspT_80_NJ_5_obs = bookHisto1D( 2,1,1); 00083 _etmisspT_80_NJ_5_bac = bookHisto1D( 2,1,2); 00084 _etmisspT_80_NJ_5_sig = bookHisto1D( 2,1,3); 00085 _etmisspT_80_NJ_6_obs = bookHisto1D(14,1,1); 00086 _etmisspT_80_NJ_6_bac = bookHisto1D(14,1,2); 00087 _etmisspT_80_NJ_6_sig = bookHisto1D(14,1,3); 00088 _etmisspT_80_NJ_7_obs = bookHisto1D(16,1,1); 00089 _etmisspT_80_NJ_7_bac = bookHisto1D(16,1,2); 00090 _etmisspT_80_NJ_7_sig = bookHisto1D(16,1,3); 00091 00092 _njet55A_obs = bookHisto1D( 3,1,1); 00093 _njet55A_bac = bookHisto1D( 3,1,2); 00094 _njet55A_sig = bookHisto1D( 3,1,3); 00095 _njet55B_obs = bookHisto1D( 4,1,1); 00096 _njet55B_bac = bookHisto1D( 4,1,2); 00097 _njet55B_sig = bookHisto1D( 4,1,3); 00098 _njet55C_obs = bookHisto1D(17,1,1); 00099 _njet55C_bac = bookHisto1D(17,1,2); 00100 _njet55C_sig = bookHisto1D(17,1,3); 00101 _njet80A_obs = bookHisto1D( 5,1,1); 00102 _njet80A_bac = bookHisto1D( 5,1,2); 00103 _njet80A_sig = bookHisto1D( 5,1,3); 00104 _njet80B_obs = bookHisto1D( 6,1,1); 00105 _njet80B_bac = bookHisto1D( 6,1,2); 00106 _njet80B_sig = bookHisto1D( 6,1,3); 00107 _njet80C_obs = bookHisto1D(18,1,1); 00108 _njet80C_bac = bookHisto1D(18,1,2); 00109 _njet80C_sig = bookHisto1D(18,1,3); 00110 00111 _count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.); 00112 _count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.); 00113 _count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.); 00114 _count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.); 00115 00116 } 00117 00118 00119 /// Perform the per-event analysis 00120 void analyze(const Event& event) { 00121 const double weight = event.weight(); 00122 // apply electron veto region 00123 Particles veto_e 00124 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles(); 00125 if ( ! veto_e.empty() ) { 00126 MSG_DEBUG("electrons in veto region"); 00127 vetoEvent; 00128 } 00129 00130 // get the jet candidates 00131 Jets cand_jets; 00132 foreach (const Jet& jet, 00133 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00134 if ( fabs( jet.eta() ) < 4.9 ) { 00135 cand_jets.push_back(jet); 00136 } 00137 } 00138 00139 // candidate muons 00140 Particles cand_mu; 00141 Particles chg_tracks = 00142 applyProjection<ChargedFinalState>(event, "cfs").particles(); 00143 foreach ( const Particle & mu, 00144 applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) { 00145 double pTinCone = -mu.pT(); 00146 foreach ( const Particle & track, chg_tracks ) { 00147 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) 00148 pTinCone += track.pT(); 00149 } 00150 if ( pTinCone < 1.8*GeV ) 00151 cand_mu.push_back(mu); 00152 } 00153 00154 // candidate electrons 00155 00156 Particles cand_e = 00157 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00158 00159 // resolve jet/lepton ambiguity 00160 Jets cand_jets_2; 00161 foreach ( const Jet& jet, cand_jets ) { 00162 // candidates above eta=2.8 are jets 00163 if ( fabs( jet.eta() ) >= 2.8 ) 00164 cand_jets_2.push_back( jet ); 00165 // otherwise more the R=0.2 from an electrons 00166 else { 00167 bool away_from_e = true; 00168 foreach ( const Particle & e, cand_e ) { 00169 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00170 away_from_e = false; 00171 break; 00172 } 00173 } 00174 if ( away_from_e ) 00175 cand_jets_2.push_back( jet ); 00176 } 00177 } 00178 00179 // only keep electrons more than R=0.4 from jets 00180 Particles recon_e; 00181 foreach ( const Particle & e, cand_e ) { 00182 bool away = true; 00183 foreach ( const Jet& jet, cand_jets_2 ) { 00184 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00185 away = false; 00186 break; 00187 } 00188 } 00189 if ( away ) 00190 recon_e.push_back( e ); 00191 } 00192 00193 // only keep muons more than R=0.4 from jets 00194 Particles recon_mu; 00195 foreach ( const Particle & mu, cand_mu ) { 00196 bool away = true; 00197 foreach ( const Jet& jet, cand_jets_2 ) { 00198 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00199 away = false; 00200 break; 00201 } 00202 } 00203 if ( away ) recon_mu.push_back( mu ); 00204 } 00205 00206 // pTmiss 00207 Particles vfs_particles = 00208 applyProjection<VisibleFinalState>(event, "vfs").particles(); 00209 FourMomentum pTmiss; 00210 foreach ( const Particle & p, vfs_particles ) { 00211 pTmiss -= p.momentum(); 00212 } 00213 double eTmiss = pTmiss.pT(); 00214 00215 // final jet filter 00216 Jets recon_jets; 00217 foreach (const Jet& jet, cand_jets_2) { 00218 if (jet.abseta() <= 2.8 ) recon_jets.push_back( jet ); 00219 } 00220 00221 // now only use recon_jets, recon_mu, recon_e 00222 00223 // reject events with electrons and muons 00224 if ( ! ( recon_mu.empty() && recon_e.empty() ) ) { 00225 MSG_DEBUG("Charged leptons left after selection"); 00226 vetoEvent; 00227 } 00228 00229 // calculate H_T 00230 double HT = 0; 00231 foreach (const Jet& jet, recon_jets) { 00232 if (jet.pT() > 40*GeV) HT += jet.pT() ; 00233 } 00234 00235 // number of jets and deltaR 00236 bool pass55DeltaR=true, pass80DeltaR=true; 00237 size_t njet55=0, njet80=0; 00238 for (size_t ix=0; ix < recon_jets.size(); ++ix) { 00239 if (recon_jets[ix].pT() > 80*GeV) ++njet80; 00240 if (recon_jets[ix].pT() > 55*GeV) ++njet55; 00241 for (size_t iy = ix + 1; iy < recon_jets.size(); ++iy) { 00242 if (recon_jets[ix].pT() > 55*GeV && 00243 recon_jets[iy].pT() > 55*GeV && 00244 deltaR(recon_jets[ix], recon_jets[iy]) < 0.6) 00245 pass55DeltaR = false; 00246 // if (recon_jets[ix].pT() > 80*GeV && 00247 // recon_jets[iy].pT() > 80*GeV && 00248 // deltaR(recon_jets[ix], recon_jets[iy]) < 0.6) 00249 // pass80DeltaR = false; 00250 } 00251 } 00252 00253 // require at least four jets with et > 55 00254 if (njet55 <= 3) vetoEvent; 00255 00256 // plots of etmiss/ht 00257 double etht = eTmiss/sqrt(HT); 00258 if (njet55 == 6) { 00259 _etmisspT_55_NJ_6_obs->fill(etht,weight); 00260 _etmisspT_55_NJ_6_bac->fill(etht,weight); 00261 _etmisspT_55_NJ_6_sig->fill(etht,weight); 00262 } else if (njet55 == 7) { 00263 _etmisspT_55_NJ_7_obs->fill(etht,weight); 00264 _etmisspT_55_NJ_7_bac->fill(etht,weight); 00265 _etmisspT_55_NJ_7_sig->fill(etht,weight); 00266 } else if (njet55 == 8) { 00267 _etmisspT_55_NJ_8_obs->fill(etht,weight); 00268 _etmisspT_55_NJ_8_bac->fill(etht,weight); 00269 _etmisspT_55_NJ_8_sig->fill(etht,weight); 00270 } 00271 if (njet80 == 5) { 00272 _etmisspT_80_NJ_5_obs->fill(etht,weight); 00273 _etmisspT_80_NJ_5_bac->fill(etht,weight); 00274 _etmisspT_80_NJ_5_sig->fill(etht,weight); 00275 } else if (njet80 == 6) { 00276 _etmisspT_80_NJ_6_obs->fill(etht,weight); 00277 _etmisspT_80_NJ_6_bac->fill(etht,weight); 00278 _etmisspT_80_NJ_6_sig->fill(etht,weight); 00279 } else if (njet80 == 7) { 00280 _etmisspT_80_NJ_7_obs->fill(etht,weight); 00281 _etmisspT_80_NJ_7_bac->fill(etht,weight); 00282 _etmisspT_80_NJ_7_sig->fill(etht,weight); 00283 } 00284 00285 if (etht > 1.5 && etht < 2.) { 00286 if (njet55 > 3) { 00287 _njet55A_obs->fill(njet55,weight); 00288 _njet55A_bac->fill(njet55,weight); 00289 _njet55A_sig->fill(njet55,weight); 00290 } 00291 if (njet80 > 3) { 00292 _njet80A_obs->fill(njet80,weight); 00293 _njet80A_bac->fill(njet80,weight); 00294 _njet80A_sig->fill(njet80,weight); 00295 } 00296 } else if (etht > 2. && etht < 3.) { 00297 if (njet55 > 3) { 00298 _njet55B_obs->fill(njet55,weight); 00299 _njet55B_bac->fill(njet55,weight); 00300 _njet55B_sig->fill(njet55,weight); 00301 } 00302 if (njet80 > 3) { 00303 _njet80B_obs->fill(njet80,weight); 00304 _njet80B_bac->fill(njet80,weight); 00305 _njet80B_sig->fill(njet80,weight); 00306 } 00307 } else { 00308 if (njet55 > 3) { 00309 _njet55C_obs->fill(njet55,weight); 00310 _njet55C_bac->fill(njet55,weight); 00311 _njet55C_sig->fill(njet55,weight); 00312 } 00313 if (njet80 > 3) { 00314 _njet80C_obs->fill(njet80,weight); 00315 _njet80C_bac->fill(njet80,weight); 00316 _njet80C_sig->fill(njet80,weight); 00317 } 00318 } 00319 00320 // apply E_T/sqrt(H_T) cut 00321 if (etht <= 3.5*GeV) { 00322 MSG_DEBUG("Fails ET/sqrt(HT) cut "); 00323 vetoEvent; 00324 } 00325 00326 // check passes at least one delta5/ njet number cut 00327 if (!(pass55DeltaR && njet55 >= 7) && !(pass80DeltaR && njet80 >= 6) ) { 00328 MSG_DEBUG("Fails DeltaR cut or jet number cuts"); 00329 vetoEvent; 00330 } 00331 00332 // 7j55 00333 if (njet55 >= 7 && pass55DeltaR) _count_7j55->fill( 0.5, weight); 00334 // 8j55 00335 if (njet55 >= 8 && pass55DeltaR) _count_8j55->fill( 0.5, weight); 00336 // 6j80 00337 if (njet80 >= 6 && pass80DeltaR) _count_6j80->fill( 0.5, weight); 00338 // 7j80 00339 if (njet80 >= 7 && pass80DeltaR) _count_7j80->fill( 0.5, weight); 00340 } 00341 00342 //@} 00343 00344 void finalize() { 00345 const double norm = crossSection()/femtobarn*1.34/sumOfWeights(); 00346 scale(_etmisspT_55_NJ_6_obs,norm); 00347 scale(_etmisspT_55_NJ_6_bac,norm); 00348 scale(_etmisspT_55_NJ_6_sig,norm); 00349 scale(_etmisspT_55_NJ_7_obs,norm); 00350 scale(_etmisspT_55_NJ_7_bac,norm); 00351 scale(_etmisspT_55_NJ_7_sig,norm); 00352 scale(_etmisspT_55_NJ_8_obs,norm); 00353 scale(_etmisspT_55_NJ_8_bac,norm); 00354 scale(_etmisspT_55_NJ_8_sig,norm); 00355 scale(_etmisspT_80_NJ_5_obs,norm); 00356 scale(_etmisspT_80_NJ_5_bac,norm); 00357 scale(_etmisspT_80_NJ_5_sig,norm); 00358 scale(_etmisspT_80_NJ_6_obs,norm); 00359 scale(_etmisspT_80_NJ_6_bac,norm); 00360 scale(_etmisspT_80_NJ_6_sig,norm); 00361 scale(_etmisspT_80_NJ_7_obs,norm); 00362 scale(_etmisspT_80_NJ_7_bac,norm); 00363 scale(_etmisspT_80_NJ_7_sig,norm); 00364 scale(_njet55A_obs,norm); 00365 scale(_njet55A_bac,norm); 00366 scale(_njet55A_sig,norm); 00367 scale(_njet55B_obs,norm); 00368 scale(_njet55B_bac,norm); 00369 scale(_njet55B_sig,norm); 00370 scale(_njet55C_obs,norm); 00371 scale(_njet55C_bac,norm); 00372 scale(_njet55C_sig,norm); 00373 scale(_njet80A_obs,norm); 00374 scale(_njet80A_bac,norm); 00375 scale(_njet80A_sig,norm); 00376 scale(_njet80B_obs,norm); 00377 scale(_njet80B_bac,norm); 00378 scale(_njet80B_sig,norm); 00379 scale(_njet80C_obs,norm); 00380 scale(_njet80C_bac,norm); 00381 scale(_njet80C_sig,norm); 00382 scale(_count_7j55,norm); 00383 scale(_count_8j55,norm); 00384 scale(_count_6j80,norm); 00385 scale(_count_7j80,norm); 00386 } 00387 00388 private: 00389 00390 /// @name Histograms 00391 //@{ 00392 Histo1DPtr _etmisspT_55_NJ_6_obs; 00393 Histo1DPtr _etmisspT_55_NJ_6_bac; 00394 Histo1DPtr _etmisspT_55_NJ_6_sig; 00395 Histo1DPtr _etmisspT_55_NJ_7_obs; 00396 Histo1DPtr _etmisspT_55_NJ_7_bac; 00397 Histo1DPtr _etmisspT_55_NJ_7_sig; 00398 Histo1DPtr _etmisspT_55_NJ_8_obs; 00399 Histo1DPtr _etmisspT_55_NJ_8_bac; 00400 Histo1DPtr _etmisspT_55_NJ_8_sig; 00401 Histo1DPtr _etmisspT_80_NJ_5_obs; 00402 Histo1DPtr _etmisspT_80_NJ_5_bac; 00403 Histo1DPtr _etmisspT_80_NJ_5_sig; 00404 Histo1DPtr _etmisspT_80_NJ_6_obs; 00405 Histo1DPtr _etmisspT_80_NJ_6_bac; 00406 Histo1DPtr _etmisspT_80_NJ_6_sig; 00407 Histo1DPtr _etmisspT_80_NJ_7_obs; 00408 Histo1DPtr _etmisspT_80_NJ_7_bac; 00409 Histo1DPtr _etmisspT_80_NJ_7_sig; 00410 Histo1DPtr _njet55A_obs; 00411 Histo1DPtr _njet55A_bac; 00412 Histo1DPtr _njet55A_sig; 00413 Histo1DPtr _njet55B_obs; 00414 Histo1DPtr _njet55B_bac; 00415 Histo1DPtr _njet55B_sig; 00416 Histo1DPtr _njet55C_obs; 00417 Histo1DPtr _njet55C_bac; 00418 Histo1DPtr _njet55C_sig; 00419 Histo1DPtr _njet80A_obs; 00420 Histo1DPtr _njet80A_bac; 00421 Histo1DPtr _njet80A_sig; 00422 Histo1DPtr _njet80B_obs; 00423 Histo1DPtr _njet80B_bac; 00424 Histo1DPtr _njet80B_sig; 00425 Histo1DPtr _njet80C_obs; 00426 Histo1DPtr _njet80C_bac; 00427 Histo1DPtr _njet80C_sig; 00428 Histo1DPtr _count_7j55; 00429 Histo1DPtr _count_8j55; 00430 Histo1DPtr _count_6j80; 00431 Histo1DPtr _count_7j80; 00432 //@} 00433 00434 }; 00435 00436 // The hook for the plugin system 00437 DECLARE_RIVET_PLUGIN(ATLAS_2011_S9225137); 00438 00439 } Generated on Tue May 13 2014 11:38:25 for The Rivet MC analysis system by ![]() |