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