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 ) 00204 recon_mu.push_back( mu ); 00205 } 00206 00207 // pTmiss 00208 Particles vfs_particles = 00209 applyProjection<VisibleFinalState>(event, "vfs").particles(); 00210 FourMomentum pTmiss; 00211 foreach ( const Particle & p, vfs_particles ) { 00212 pTmiss -= p.momentum(); 00213 } 00214 double eTmiss = pTmiss.pT(); 00215 00216 // final jet filter 00217 Jets recon_jets; 00218 foreach ( const Jet& jet, cand_jets_2 ) { 00219 if ( fabs( jet.eta() ) <= 2.8 ) 00220 recon_jets.push_back( jet ); 00221 } 00222 00223 // now only use recon_jets, recon_mu, recon_e 00224 00225 // reject events with electrons and muons 00226 if ( ! ( recon_mu.empty() && recon_e.empty() ) ) { 00227 MSG_DEBUG("Charged leptons left after selection"); 00228 vetoEvent; 00229 } 00230 00231 // calculate H_T 00232 double HT=0; 00233 foreach ( const Jet& jet, recon_jets ) { 00234 if ( jet.pT() > 40 * GeV ) 00235 HT += jet.pT() ; 00236 } 00237 00238 // number of jets and deltaR 00239 bool pass55DeltaR=true; 00240 unsigned int njet55=0; 00241 bool pass80DeltaR=true; 00242 unsigned int njet80=0; 00243 for (unsigned int ix=0;ix<recon_jets.size();++ix) { 00244 if(recon_jets[ix].pT()>80.*GeV) ++njet80; 00245 if(recon_jets[ix].pT()>55.*GeV) ++njet55; 00246 00247 for (unsigned int iy=ix+1;iy<recon_jets.size();++iy) { 00248 if(recon_jets[ix].pT()>55.*GeV && 00249 recon_jets[iy].pT()>55.*GeV && 00250 deltaR(recon_jets[ix],recon_jets[iy]) <0.6 ) 00251 pass55DeltaR = false; 00252 if(recon_jets[ix].pT()>80.*GeV && 00253 recon_jets[iy].pT()>80.*GeV && 00254 deltaR(recon_jets[ix],recon_jets[iy]) <0.6 ) 00255 pass80DeltaR = false; 00256 } 00257 } 00258 00259 // require at least four jets with et > 55 00260 if(njet55<=3) vetoEvent; 00261 00262 // plots of etmiss/ht 00263 double etht = eTmiss/sqrt(HT); 00264 if(njet55==6) { 00265 _etmisspT_55_NJ_6_obs->fill(etht,weight); 00266 _etmisspT_55_NJ_6_bac->fill(etht,weight); 00267 _etmisspT_55_NJ_6_sig->fill(etht,weight); 00268 } 00269 else if(njet55==7) { 00270 _etmisspT_55_NJ_7_obs->fill(etht,weight); 00271 _etmisspT_55_NJ_7_bac->fill(etht,weight); 00272 _etmisspT_55_NJ_7_sig->fill(etht,weight); 00273 } 00274 else if(njet55==8) { 00275 _etmisspT_55_NJ_8_obs->fill(etht,weight); 00276 _etmisspT_55_NJ_8_bac->fill(etht,weight); 00277 _etmisspT_55_NJ_8_sig->fill(etht,weight); 00278 } 00279 if(njet80==5) { 00280 _etmisspT_80_NJ_5_obs->fill(etht,weight); 00281 _etmisspT_80_NJ_5_bac->fill(etht,weight); 00282 _etmisspT_80_NJ_5_sig->fill(etht,weight); 00283 } 00284 else if(njet80==6) { 00285 _etmisspT_80_NJ_6_obs->fill(etht,weight); 00286 _etmisspT_80_NJ_6_bac->fill(etht,weight); 00287 _etmisspT_80_NJ_6_sig->fill(etht,weight); 00288 } 00289 else if(njet80==7) { 00290 _etmisspT_80_NJ_7_obs->fill(etht,weight); 00291 _etmisspT_80_NJ_7_bac->fill(etht,weight); 00292 _etmisspT_80_NJ_7_sig->fill(etht,weight); 00293 } 00294 00295 if(etht>1.5&ðt<2. ) { 00296 if(njet55>3) { 00297 _njet55A_obs->fill(njet55,weight); 00298 _njet55A_bac->fill(njet55,weight); 00299 _njet55A_sig->fill(njet55,weight); 00300 } 00301 if(njet80>3) { 00302 _njet80A_obs->fill(njet80,weight); 00303 _njet80A_bac->fill(njet80,weight); 00304 _njet80A_sig->fill(njet80,weight); 00305 } 00306 } 00307 else if(etht>2. &ðt<3. ) { 00308 if(njet55>3) { 00309 _njet55B_obs->fill(njet55,weight); 00310 _njet55B_bac->fill(njet55,weight); 00311 _njet55B_sig->fill(njet55,weight); 00312 } 00313 if(njet80>3) { 00314 _njet80B_obs->fill(njet80,weight); 00315 _njet80B_bac->fill(njet80,weight); 00316 _njet80B_sig->fill(njet80,weight); 00317 } 00318 } 00319 else { 00320 if(njet55>3) { 00321 _njet55C_obs->fill(njet55,weight); 00322 _njet55C_bac->fill(njet55,weight); 00323 _njet55C_sig->fill(njet55,weight); 00324 } 00325 if(njet80>3) { 00326 _njet80C_obs->fill(njet80,weight); 00327 _njet80C_bac->fill(njet80,weight); 00328 _njet80C_sig->fill(njet80,weight); 00329 } 00330 } 00331 00332 // apply E_T/sqrt(H_T) cut 00333 if(etht<=3.5*GeV) { 00334 MSG_DEBUG("Fails ET/sqrt(HT) cut "); 00335 vetoEvent; 00336 } 00337 00338 // check passes at least one delta5/ njet number cut 00339 if(!(pass55DeltaR && njet55 >= 7) && 00340 !(pass80DeltaR && njet80 >= 6) ) { 00341 MSG_DEBUG("Fails DeltaR cut or jet number cuts"); 00342 vetoEvent; 00343 } 00344 00345 // 7j55 00346 if(njet55>=7&&pass55DeltaR) 00347 _count_7j55->fill( 0.5, weight) ; 00348 // 8j55 00349 if(njet55>=8&&pass55DeltaR) 00350 _count_8j55->fill( 0.5, weight) ; 00351 // 6j80 00352 if(njet80>=6&&pass80DeltaR) 00353 _count_6j80->fill( 0.5, weight) ; 00354 // 7j80 00355 if(njet80>=7&&pass80DeltaR) 00356 _count_7j80->fill( 0.5, weight) ; 00357 00358 } 00359 00360 //@} 00361 00362 void finalize() { 00363 double norm = crossSection()/femtobarn*1.34/sumOfWeights(); 00364 scale(_etmisspT_55_NJ_6_obs,norm); 00365 scale(_etmisspT_55_NJ_6_bac,norm); 00366 scale(_etmisspT_55_NJ_6_sig,norm); 00367 scale(_etmisspT_55_NJ_7_obs,norm); 00368 scale(_etmisspT_55_NJ_7_bac,norm); 00369 scale(_etmisspT_55_NJ_7_sig,norm); 00370 scale(_etmisspT_55_NJ_8_obs,norm); 00371 scale(_etmisspT_55_NJ_8_bac,norm); 00372 scale(_etmisspT_55_NJ_8_sig,norm); 00373 scale(_etmisspT_80_NJ_5_obs,norm); 00374 scale(_etmisspT_80_NJ_5_bac,norm); 00375 scale(_etmisspT_80_NJ_5_sig,norm); 00376 scale(_etmisspT_80_NJ_6_obs,norm); 00377 scale(_etmisspT_80_NJ_6_bac,norm); 00378 scale(_etmisspT_80_NJ_6_sig,norm); 00379 scale(_etmisspT_80_NJ_7_obs,norm); 00380 scale(_etmisspT_80_NJ_7_bac,norm); 00381 scale(_etmisspT_80_NJ_7_sig,norm); 00382 scale(_njet55A_obs,norm); 00383 scale(_njet55A_bac,norm); 00384 scale(_njet55A_sig,norm); 00385 scale(_njet55B_obs,norm); 00386 scale(_njet55B_bac,norm); 00387 scale(_njet55B_sig,norm); 00388 scale(_njet55C_obs,norm); 00389 scale(_njet55C_bac,norm); 00390 scale(_njet55C_sig,norm); 00391 scale(_njet80A_obs,norm); 00392 scale(_njet80A_bac,norm); 00393 scale(_njet80A_sig,norm); 00394 scale(_njet80B_obs,norm); 00395 scale(_njet80B_bac,norm); 00396 scale(_njet80B_sig,norm); 00397 scale(_njet80C_obs,norm); 00398 scale(_njet80C_bac,norm); 00399 scale(_njet80C_sig,norm); 00400 scale(_count_7j55,norm); 00401 scale(_count_8j55,norm); 00402 scale(_count_6j80,norm); 00403 scale(_count_7j80,norm); 00404 } 00405 00406 private: 00407 00408 /// @name Histograms 00409 //@{ 00410 Histo1DPtr _etmisspT_55_NJ_6_obs; 00411 Histo1DPtr _etmisspT_55_NJ_6_bac; 00412 Histo1DPtr _etmisspT_55_NJ_6_sig; 00413 Histo1DPtr _etmisspT_55_NJ_7_obs; 00414 Histo1DPtr _etmisspT_55_NJ_7_bac; 00415 Histo1DPtr _etmisspT_55_NJ_7_sig; 00416 Histo1DPtr _etmisspT_55_NJ_8_obs; 00417 Histo1DPtr _etmisspT_55_NJ_8_bac; 00418 Histo1DPtr _etmisspT_55_NJ_8_sig; 00419 Histo1DPtr _etmisspT_80_NJ_5_obs; 00420 Histo1DPtr _etmisspT_80_NJ_5_bac; 00421 Histo1DPtr _etmisspT_80_NJ_5_sig; 00422 Histo1DPtr _etmisspT_80_NJ_6_obs; 00423 Histo1DPtr _etmisspT_80_NJ_6_bac; 00424 Histo1DPtr _etmisspT_80_NJ_6_sig; 00425 Histo1DPtr _etmisspT_80_NJ_7_obs; 00426 Histo1DPtr _etmisspT_80_NJ_7_bac; 00427 Histo1DPtr _etmisspT_80_NJ_7_sig; 00428 Histo1DPtr _njet55A_obs; 00429 Histo1DPtr _njet55A_bac; 00430 Histo1DPtr _njet55A_sig; 00431 Histo1DPtr _njet55B_obs; 00432 Histo1DPtr _njet55B_bac; 00433 Histo1DPtr _njet55B_sig; 00434 Histo1DPtr _njet55C_obs; 00435 Histo1DPtr _njet55C_bac; 00436 Histo1DPtr _njet55C_sig; 00437 Histo1DPtr _njet80A_obs; 00438 Histo1DPtr _njet80A_bac; 00439 Histo1DPtr _njet80A_sig; 00440 Histo1DPtr _njet80B_obs; 00441 Histo1DPtr _njet80B_bac; 00442 Histo1DPtr _njet80B_sig; 00443 Histo1DPtr _njet80C_obs; 00444 Histo1DPtr _njet80C_bac; 00445 Histo1DPtr _njet80C_sig; 00446 Histo1DPtr _count_7j55; 00447 Histo1DPtr _count_8j55; 00448 Histo1DPtr _count_6j80; 00449 Histo1DPtr _count_7j80; 00450 //@} 00451 00452 }; 00453 00454 // The hook for the plugin system 00455 DECLARE_RIVET_PLUGIN(ATLAS_2011_S9225137); 00456 00457 } Generated on Fri Oct 25 2013 12:41:43 for The Rivet MC analysis system by ![]() |