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