00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetAIDA.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/IdentifiedFinalState.hh"
00010 #include "Rivet/Projections/VetoedFinalState.hh"
00011 #include "Rivet/Projections/FastJets.hh"
00012
00013 namespace Rivet {
00014
00015
00016
00017
00018 class ATLAS_2011_S9041966 : public Analysis {
00019 public:
00020
00021
00022
00023
00024
00025 ATLAS_2011_S9041966()
00026 : Analysis("ATLAS_2011_S9041966"),
00027
00028 count(0), vetoe(0), Njetscut(0), dilept(0),
00029 candmumujj(0), candeejj(0), onelept(0),
00030 eTmisscut(0), candmvjj(0), candevjj(0),
00031 mumujj(0), eejj(0),
00032 mTonelept(0), MLQonelept(0), MtLQonelept(0), Stvonelept(0),
00033 mTev(0), MLQev(0), MtLQev(0), Stvev(0),
00034 muvjj(0), evjj(0), emuvjj(0),
00035 cande(0), candmu(0),
00036 tmpe(0), tmpmu(0),
00037 mumuZCR(0), eeZCR(0),
00038 munuW2CR(0), munuttCR(0),
00039 enuW2CR(0), enuttCR(0)
00040 { }
00041
00042
00043
00044
00045 public:
00046
00047
00048
00049
00050
00051 void init() {
00052
00053
00054 std::vector<std::pair<double, double> > eta_e;
00055 eta_e.push_back(make_pair(-2.47,2.47));
00056 IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00057 elecs.acceptIdPair(ELECTRON);
00058 addProjection(elecs, "elecs");
00059
00060
00061
00062 std::vector<std::pair<double, double> > eta_v_e;
00063 eta_v_e.push_back(make_pair(-1.52,-1.35));
00064 eta_v_e.push_back(make_pair( 1.35, 1.52));
00065 IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
00066 veto_elecs.acceptIdPair(ELECTRON);
00067 addProjection(veto_elecs, "veto_elecs");
00068
00069
00070
00071 IdentifiedFinalState all_mu_e;
00072 all_mu_e.acceptIdPair(MUON);
00073 all_mu_e.acceptIdPair(ELECTRON);
00074 addProjection(all_mu_e, "all_mu_e");
00075
00076
00077
00078
00079 std::vector<std::pair<double, double> > eta_m;
00080 eta_m.push_back(make_pair(-2.4,2.4));
00081 IdentifiedFinalState muons(eta_m, 20.0*GeV);
00082 muons.acceptIdPair(MUON);
00083 addProjection(muons, "muons");
00084
00085
00086
00087 VetoedFinalState vfs;
00088 vfs.addVetoPairDetail(MUON,20*GeV,7000*GeV);
00089 vfs.addVetoPairDetail(ELECTRON,20*GeV,7000*GeV);
00090 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
00091 "AntiKtJets04");
00092
00093
00094
00095 addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
00096
00097
00098
00099 addProjection(VisibleFinalState(-4.9,4.9),"vfs");
00100
00101
00102
00103 _count_mumujj = bookHistogram1D("count_2muons_dijet", 1, 0., 1.);
00104 _count_eejj = bookHistogram1D("count_2elecs_dijet", 1, 0., 1.);
00105 _count_muvjj = bookHistogram1D("count_muon_neutrino_dijet", 1, 0., 1.);
00106 _count_evjj = bookHistogram1D("count_elec_neutrino_dijet", 1, 0., 1.);
00107
00108 _hist_St_mumu = bookHistogram1D("hist_mumujj_St", 10, 450., 1650.);
00109 _hist_St_ee = bookHistogram1D("hist_eejj_St", 10, 450., 1650.);
00110 _hist_MLQ_muv = bookHistogram1D("hist_munujj_MLQ", 9, 150., 600.);
00111 _hist_MLQ_ev = bookHistogram1D("hist_enujj_MLQ", 9, 150., 600.);
00112
00113 _hist_St_mumu_ZCR = bookHistogram1D("CR_Zjets_St_mumu", 40, 0., 800.);
00114 _hist_St_ee_ZCR = bookHistogram1D("CR_Zjets_Stee", 40, 0., 800.);
00115 _hist_MLQ_munu_W2CR = bookHistogram1D("CR_W2jets_MLQ_munu", 20, 0., 400.);
00116 _hist_MLQ_enu_W2CR = bookHistogram1D("CR_W2jets_MLQ_enu", 20, 0., 400.);
00117 _hist_MLQ_munu_ttCR = bookHistogram1D("CR_tt_MLQ_munu", 35, 0., 700.);
00118 _hist_MLQ_enu_ttCR = bookHistogram1D("CR_tt_MLQ_enu", 35, 0., 700.);
00119
00120 }
00121
00122
00123
00124
00125 void analyze(const Event& event) {
00126
00127 const double weight = event.weight();
00128
00129
00130 count +=1;
00131
00132
00133
00134 ParticleVector veto_e
00135 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
00136 if ( ! veto_e.empty() ) {
00137 MSG_DEBUG("electrons in veto region");
00138 vetoEvent;
00139 }
00140 ++vetoe;
00141
00142
00143 Jets cand_jets;
00144 foreach ( const Jet& jet,
00145 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
00146 if ( fabs( jet.momentum().eta() ) < 2.8 ) {
00147 cand_jets.push_back(jet);
00148 }
00149 }
00150
00151
00152 ParticleVector candtemp_e =
00153 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00154 ParticleVector candtemp_mu =
00155 applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
00156 ParticleVector cand_mu;
00157 ParticleVector cand_e;
00158 ParticleVector vfs_particles
00159 = applyProjection<VisibleFinalState>(event, "vfs").particles();
00160
00161
00162
00163 foreach ( const Particle & mu, candtemp_mu ) {
00164 ++tmpmu;
00165 double pTinCone = -mu.momentum().pT();
00166 foreach ( const Particle & track, vfs_particles ) {
00167 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
00168 pTinCone += track.momentum().pT();
00169 }
00170 if ( pTinCone/mu.momentum().pT() < 0.25 )
00171 ++candmu;
00172 cand_mu.push_back(mu);
00173 }
00174
00175
00176 foreach ( const Particle e, candtemp_e ) {
00177 ++tmpe;
00178 double pTinCone = -e.momentum().pT();
00179 foreach ( const Particle & track, vfs_particles ) {
00180 if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
00181 pTinCone += track.momentum().pT();
00182 }
00183 if ( pTinCone/e.momentum().pT() < 0.2 )
00184 ++cande;
00185 cand_e.push_back(e);
00186 }
00187
00188 if ( cand_e.empty() && cand_mu.empty() ) {
00189
00190 vetoEvent;
00191 }
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206 FourMomentum pTmiss;
00207 foreach ( const Particle & p, vfs_particles ) {
00208 pTmiss -= p.momentum();
00209 }
00210 double eTmiss = pTmiss.pT();
00211
00212
00213
00214 Jets recon_jets;
00215 foreach ( const Jet& jet, cand_jets ) {
00216 bool away_from_lept = true;
00217 foreach ( const Particle e, cand_e ) {
00218 if ( deltaR(e.momentum(),jet.momentum()) <= 0.5 ) {
00219 away_from_lept = false;
00220 break;
00221 }
00222 }
00223 foreach ( const Particle & mu, cand_mu ) {
00224 if ( deltaR(mu.momentum(),jet.momentum()) <= 0.5 ) {
00225 away_from_lept = false;
00226 break;
00227 }
00228 }
00229 if ( away_from_lept )
00230 recon_jets.push_back( jet );
00231 }
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247 if ( recon_jets.size() < 2 ) {
00248
00249 vetoEvent;
00250 }
00251 ++Njetscut;
00252
00253
00254
00255 double M_ll=0., M_LQ=0., St_ll=0., Mt_LQ=0., St_v=0., mT=0.;
00256 FourMomentum p_l, p_l1, p_l2, p_j[2];
00257 p_j[0] = recon_jets[0].momentum();
00258 p_j[1] = recon_jets[1].momentum();
00259
00260 ParticleVector dilept_pair;
00261 bool single_lept = false;
00262
00263 if ( cand_mu.size() == 2 && cand_e.empty() ) {
00264 ++candmumujj;
00265 foreach ( const Particle& mu, cand_mu )
00266 dilept_pair.push_back(mu);
00267 }
00268 else if ( cand_e.size() == 2 && cand_mu.empty() ) {
00269 ++candeejj;
00270 foreach ( const Particle& e, cand_e )
00271 dilept_pair.push_back(e);
00272 }
00273 else if ( cand_mu.size() == 1 && cand_e.empty() ) {
00274 ++candmvjj;
00275 p_l = cand_mu[0].momentum();
00276 single_lept = true;
00277 }
00278 else if ( cand_e.size() == 1 && cand_mu.empty() ) {
00279 ++candevjj;
00280 p_l = cand_e[0].momentum();
00281 single_lept = true;
00282 }
00283
00284
00285 if ( ! dilept_pair.empty() ) {
00286
00287 double E_l1, E_l2, E_j1, E_j2;
00288 double tmpM_LQ1[2], tmpM_LQ2[2], M_LQDiff1, M_LQDiff2;
00289
00290 p_l1 = dilept_pair[0].momentum();
00291 p_l2 = dilept_pair[1].momentum();
00292 E_l1 = p_l1.E();
00293 E_l2 = p_l2.E();
00294
00295 E_j1 = p_j[0].E();
00296 E_j2 = p_j[1].E();
00297
00298
00299
00300 tmpM_LQ1[0] = E_l1 + E_j1;
00301 tmpM_LQ1[1] = E_l2 + E_j2;
00302 M_LQDiff1 = abs( tmpM_LQ1[0] - tmpM_LQ1[1] );
00303
00304 tmpM_LQ2[0] = E_l1 + E_j2;
00305 tmpM_LQ2[1] = E_l2 + E_j1;
00306 M_LQDiff2 = abs( tmpM_LQ2[0] - tmpM_LQ2[1] );
00307
00308 if ( M_LQDiff1 > M_LQDiff2 )
00309 M_LQ = ( tmpM_LQ2[0] + tmpM_LQ2[1] ) / 2;
00310 else
00311 M_LQ = ( tmpM_LQ1[0] + tmpM_LQ1[1] ) / 2;
00312
00313
00314 St_ll = p_l1.pT() + p_l2.pT() + p_j[0].pT() + p_j[1].pT();
00315
00316
00317 M_ll = E_l1 + E_l2;
00318
00319 }
00320
00321
00322 else if ( single_lept ) {
00323
00324 double tmpM_LQ[2], tmpMt_LQ[2], dPhi_j[2], M_LQDiff1, M_LQDiff2;
00325
00326
00327
00328 for ( int i = 0; i < 2; ++i ) {
00329 tmpM_LQ[i] = p_l.E() + p_j[i].E();
00330 dPhi_j[1-i] = deltaPhi( p_j[1-i].phi(), pTmiss.phi() );
00331 tmpMt_LQ[i] = sqrt( 2 * p_j[1-i].pT() * eTmiss * (1 - cos( dPhi_j[1-i] )) );
00332 }
00333
00334
00335
00336 M_LQDiff1 = abs( tmpM_LQ[0] - tmpMt_LQ[0] );
00337 M_LQDiff2 = abs( tmpM_LQ[1] - tmpMt_LQ[1] );
00338
00339 if ( M_LQDiff1 > M_LQDiff2 ) {
00340 M_LQ = tmpM_LQ[1];
00341 Mt_LQ = tmpMt_LQ[1];
00342 }
00343 else {
00344 M_LQ = tmpM_LQ[0];
00345 Mt_LQ = tmpMt_LQ[0];
00346 }
00347
00348
00349 St_v = p_l.pT() + eTmiss + p_j[0].pT() + p_j[1].pT();
00350
00351
00352 double dPhi_l = deltaPhi( p_l.phi(), pTmiss.phi());
00353 mT = sqrt( 2 * p_l.pT() * eTmiss * (1 - cos(dPhi_l)) );
00354
00355 }
00356
00357
00358
00359
00360
00361 if ( cand_mu.size() == 2 ) {
00362 if ( M_ll >= 81*GeV && M_ll <= 101*GeV ) {
00363 ++mumuZCR;
00364 _hist_St_mumu_ZCR->fill(St_ll, weight);
00365 }
00366 }
00367
00368 else if ( cand_e.size() == 2 ) {
00369 if ( M_ll >= 81*GeV && M_ll <= 101*GeV ) {
00370 ++eeZCR;
00371 _hist_St_ee_ZCR->fill(St_ll, weight);
00372
00373 }
00374 }
00375
00376 if ( cand_mu.size() == 1 ) {
00377
00378 if ( recon_jets.size() == 2 &&
00379 mT >= 40*GeV && mT <= 150*GeV ) {
00380 ++munuW2CR;
00381 _hist_MLQ_munu_W2CR->fill(M_LQ, weight);
00382 }
00383
00384 if ( recon_jets.size() >= 4 &&
00385 recon_jets[0].momentum().pT() > 50*GeV && recon_jets[1].momentum().pT() > 40*GeV && recon_jets[2].momentum().pT() > 30*GeV ) {
00386 ++munuttCR;
00387 _hist_MLQ_munu_ttCR->fill(M_LQ, weight);
00388 }
00389 }
00390 if ( cand_e.size() == 1 ) {
00391
00392 if ( recon_jets.size() == 2 &&
00393 mT >= 40*GeV && mT <= 150*GeV ) {
00394 ++enuW2CR;
00395 _hist_MLQ_enu_W2CR->fill(M_LQ, weight);
00396 }
00397
00398 if ( recon_jets.size() >= 4 &&
00399 recon_jets[0].momentum().pT() > 50*GeV && recon_jets[1].momentum().pT() > 40*GeV && recon_jets[2].momentum().pT() > 30*GeV ) {
00400 ++enuttCR;
00401 _hist_MLQ_enu_ttCR->fill(M_LQ, weight);
00402 }
00403 }
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413 if ( single_lept ) {
00414
00415 if ( eTmiss <= 25*GeV ) {
00416
00417 vetoEvent;
00418 }
00419 ++eTmisscut;
00420
00421 if ( mT <= 40*GeV )
00422 vetoEvent;
00423
00424
00425
00426
00427 if ( cand_e.size() == 1 && cand_mu.empty() ) {
00428
00429
00430 double dPhi_jet1 = deltaPhi( recon_jets[0].phi(), pTmiss.phi() );
00431 double dPhi_jet2 = deltaPhi( recon_jets[1].phi(), pTmiss.phi() );
00432
00433 if ( dPhi_jet1 <= 1.5 * (1 - eTmiss/45) ||
00434 dPhi_jet2 <= 1.5 * (1 - eTmiss/45) ) {
00435 ++emuvjj;
00436 vetoEvent;
00437 }
00438 }
00439 }
00440
00441
00442
00443
00444
00445 if ( cand_mu.size() == 2 ) {
00446 if ( M_ll <= 120*GeV ||
00447 M_LQ <= 150*GeV ||
00448 p_l1.pT() <= 30*GeV || p_l2.pT() <= 30*GeV ||
00449 p_j[0].pT() <= 30*GeV || p_j[1].pT() <= 30*GeV ||
00450 St_ll <= 450*GeV ) {
00451
00452 vetoEvent;
00453 }
00454 else {
00455
00456
00457 ++mumujj;
00458
00459 _hist_St_mumu->fill(St_ll, weight);
00460 _count_mumujj->fill(0.5, weight);
00461
00462 }
00463 }
00464
00465 else if ( cand_e.size() == 2 ) {
00466 if ( M_ll <= 120*GeV ||
00467 M_LQ <= 150*GeV ||
00468 p_l1.pT() <= 30*GeV || p_l2.pT() <= 30*GeV ||
00469 p_j[0].pT() <= 30*GeV || p_j[1].pT() <= 30*GeV ||
00470 St_ll <= 450*GeV ) {
00471
00472 vetoEvent;
00473 }
00474 else {
00475
00476 ++eejj;
00477
00478 _hist_St_ee->fill(St_ll, weight);
00479 _count_eejj->fill(0.5, weight);
00480
00481 }
00482 }
00483
00484
00485
00486 else if ( cand_mu.size() == 1 ) {
00487
00488
00489
00490 if (M_LQ<=150*GeV) {
00491
00492 vetoEvent;
00493 }
00494 ++MLQonelept;
00495 if (Mt_LQ<=150*GeV) {
00496
00497 vetoEvent;
00498 }
00499 ++MtLQonelept;
00500 if (St_v<=400*GeV) {
00501
00502 vetoEvent;
00503 }
00504 ++Stvonelept;
00505 if (mT<=160*GeV) {
00506
00507 vetoEvent;
00508 }
00509 ++mTonelept;
00510
00511 ++muvjj;
00512
00513 _hist_MLQ_muv->fill(M_LQ, weight);
00514 _count_muvjj->fill(0.5, weight);
00515
00516
00517 }
00518
00519
00520 else if ( cand_e.size() == 1 ) {
00521
00522 if (M_LQ<=180*GeV) {
00523
00524 vetoEvent;
00525 }
00526 ++MLQev;
00527 if (Mt_LQ<=180*GeV) {
00528
00529 vetoEvent;
00530 }
00531 ++MtLQev;
00532 if (St_v<=410*GeV) {
00533
00534 vetoEvent;
00535 }
00536 ++Stvev;
00537 if (mT<=200*GeV) {
00538
00539 vetoEvent;
00540 }
00541 ++mTev;
00542
00543 ++evjj;
00544
00545 _hist_MLQ_ev->fill(M_LQ, weight);
00546 _count_evjj->fill(0.5, weight);
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566 }
00567
00568
00569 }
00570
00571
00572
00573
00574 void finalize() {
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604 scale( _hist_St_ee, 120. * 35. * crossSection()/sumOfWeights() );
00605 scale( _hist_St_mumu, 120. * 35. * crossSection()/sumOfWeights() );
00606 scale( _hist_MLQ_muv, 50. * 35. * crossSection()/sumOfWeights() );
00607 scale( _hist_MLQ_ev, 50. * 35. * crossSection()/sumOfWeights() );
00608
00609
00610
00611 scale( _hist_St_mumu_ZCR, 20. * 35. * crossSection()/sumOfWeights() );
00612 scale( _hist_St_ee_ZCR, 20. * 35. * crossSection()/sumOfWeights() );
00613 scale( _hist_MLQ_munu_W2CR, 20. * 35. * crossSection()/sumOfWeights() );
00614 scale( _hist_MLQ_enu_W2CR, 20. * 35. * crossSection()/sumOfWeights() );
00615 scale( _hist_MLQ_munu_ttCR, 20. * 35. * crossSection()/sumOfWeights() );
00616 scale( _hist_MLQ_enu_ttCR, 20. * 35. * crossSection()/sumOfWeights() );
00617
00618
00619
00620
00621
00622 }
00623
00624 private:
00625
00626
00627
00628 AIDA::IHistogram1D* _count_mumujj;
00629 AIDA::IHistogram1D* _count_eejj;
00630 AIDA::IHistogram1D* _count_muvjj;
00631 AIDA::IHistogram1D* _count_evjj;
00632
00633 AIDA::IHistogram1D* _hist_St_mumu;
00634 AIDA::IHistogram1D* _hist_St_ee;
00635 AIDA::IHistogram1D* _hist_MLQ_muv;
00636 AIDA::IHistogram1D* _hist_MLQ_ev;
00637
00638 AIDA::IHistogram1D* _hist_St_mumu_ZCR;
00639 AIDA::IHistogram1D* _hist_St_ee_ZCR;
00640 AIDA::IHistogram1D* _hist_MLQ_munu_W2CR;
00641 AIDA::IHistogram1D* _hist_MLQ_enu_W2CR;
00642 AIDA::IHistogram1D* _hist_MLQ_munu_ttCR;
00643 AIDA::IHistogram1D* _hist_MLQ_enu_ttCR;
00644
00645
00646
00647
00648
00649
00650
00651
00652 int count;
00653 int vetoe;
00654 int Njetscut;
00655 int dilept;
00656 int candmumujj;
00657 int candeejj;
00658 int onelept;
00659 int eTmisscut;
00660 int candmvjj;
00661 int candevjj;
00662 int mumujj;
00663 int eejj;
00664 int mTonelept;
00665 int MLQonelept;
00666 int MtLQonelept;
00667 int Stvonelept;
00668 int mTev;
00669 int MLQev;
00670 int MtLQev;
00671 int Stvev;
00672 int muvjj;
00673 int evjj;
00674 int emuvjj;
00675 int cande;
00676 int candmu;
00677 int tmpe;
00678 int tmpmu;
00679 int mumuZCR;
00680 int eeZCR;
00681 int munuW2CR;
00682 int munuttCR;
00683 int enuW2CR;
00684 int enuttCR;
00685
00686 };
00687
00688
00689
00690
00691 DECLARE_RIVET_PLUGIN(ATLAS_2011_S9041966);
00692
00693 }