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