Rivet analyses referenceCMS_2016_I1473674Measurement of the differential cross sections for top quark pair production as a function of kinematic event variables at sqrt(s) = 8 TeVExperiment: CMS (LHC) Inspire ID: 1473674 Status: VALIDATED Authors:
Beam energies: (4000.0, 4000.0) GeV Run details:
Measurements are reported of the normalized differential cross sections for top quark pair production with respect to four kinematic event variables: the missing transverse energy; the scalar sum of the jet transverse momentum (pT); the scalar sum of the pT of all objects in the event; and the pT of leptonically decaying W bosons from top quark decays. Source code: CMS_2016_I1473674.cc 1#include "Rivet/Analysis.hh"
2#include "Rivet/Projections/FinalState.hh"
3#include "Rivet/Projections/FastJets.hh"
4#include "Rivet/Projections/PartonicTops.hh"
5#include "Rivet/Projections/LeptonFinder.hh"
6#include "Rivet/Projections/IdentifiedFinalState.hh"
7#include "Rivet/Projections/PromptFinalState.hh"
8#include "Rivet/Projections/VetoedFinalState.hh"
9#include "Rivet/Projections/InvMassFinalState.hh"
10#include "Rivet/Projections/MissingMomentum.hh"
11
12namespace Rivet {
13
14
15 class CMS_2016_I1473674 : public Analysis {
16 public:
17
18 // Minimal constructor
19 RIVET_DEFAULT_ANALYSIS_CTOR(CMS_2016_I1473674);
20
21
22 // Set up projections and book histograms
23 void init() {
24
25 // Complete final state
26 FinalState fs;
27
28 // Parton level top quarks
29 declare(PartonicTops(TopDecay::E_MU, PromptEMuFromTau::NO), "LeptonicPartonTops");
30 declare(PartonicTops(TopDecay::HADRONIC), "HadronicPartonTops");
31
32 // Projections for dressed electrons and muons
33 IdentifiedFinalState photons(fs);
34 photons.acceptIdPair(PID::PHOTON);
35 //
36 IdentifiedFinalState el_id(fs);
37 el_id.acceptIdPair(PID::ELECTRON);
38 PromptFinalState electrons(el_id);
39 declare(electrons, "Electrons");
40 LeptonFinder dressed_electrons(electrons, photons, 0.1);
41 declare(dressed_electrons, "DressedElectrons");
42 //
43 IdentifiedFinalState mu_id(fs);
44 mu_id.acceptIdPair(PID::MUON);
45 PromptFinalState muons(mu_id);
46 declare(muons, "Muons");
47 LeptonFinder dressed_muons(muons, photons, 0.1);
48 declare(dressed_muons, "DressedMuons");
49
50 // Projection for jets
51 VetoedFinalState fs_jets;
52 fs_jets.addVetoOnThisFinalState(dressed_muons);
53 declare(FastJets(fs_jets, JetAlg::ANTIKT, 0.5), "Jets");
54
55 // Projections for MET
56 declare(MissingMomentum(), "MET");
57
58
59 // Booking of histograms
60 book(_hist_met ,5, 1, 1);
61 book(_hist_ht ,6, 1, 1);
62 book(_hist_st ,7, 1, 1);
63 book(_hist_wpt ,8, 1, 1);
64 }
65
66
67 /// Per-event analysis
68 void analyze(const Event& event) {
69
70 // Select ttbar -> lepton+jets at parton level, removing tau decays
71 const Particles leptonicpartontops = apply<ParticleFinder>(event, "LeptonicPartonTops").particlesByPt();
72 if (leptonicpartontops.size() != 1) vetoEvent;
73 const Particles hadronicpartontops = apply<ParticleFinder>(event, "HadronicPartonTops").particlesByPt();
74 if (hadronicpartontops.size() != 1) vetoEvent;
75
76 // Select ttbar -> lepton+jets at particle level
77 const LeptonFinder& dressed_electrons = apply<LeptonFinder>(event, "DressedElectrons");
78 const LeptonFinder& dressed_muons = apply<LeptonFinder>(event, "DressedMuons");
79 if (dressed_electrons.dressedLeptons().size() + dressed_muons.dressedLeptons().size() != 1) vetoEvent;
80 const FourMomentum lepton = (dressed_electrons.dressedLeptons().empty() ? dressed_muons : dressed_electrons).dressedLeptons()[0];
81
82 // MET
83 const MissingMomentum& met = apply<MissingMomentum>(event, "MET");
84 _hist_met->fill(met.visibleMomentum().pT()/GeV);
85
86 // HT and ST
87 const FastJets& jetpro = apply<FastJets>(event, "Jets");
88 const Jets jets = jetpro.jetsByPt(Cuts::pT > 20*GeV);
89
90 double ht = 0.0;
91 for (const Jet& j : jets) {
92 if (deltaR(j.momentum(), lepton) > 0.3) {
93 ht += j.pT();
94 }
95 }
96
97 double st = ht + lepton.pT() + met.visibleMomentum().pT();
98 _hist_ht->fill(ht/GeV);
99 _hist_st->fill(st/GeV);
100
101 // WPT
102 const FourMomentum w = lepton - met.visibleMomentum();
103 _hist_wpt->fill(w.pT()/GeV);
104 }
105
106
107 /// Normalize histograms
108 void finalize() {
109 normalize(_hist_met);
110 normalize(_hist_ht);
111 normalize(_hist_st);
112 normalize(_hist_wpt);
113 }
114
115 private:
116 Histo1DPtr _hist_met, _hist_ht, _hist_st, _hist_wpt;
117
118 };
119
120
121 RIVET_DECLARE_PLUGIN(CMS_2016_I1473674);
122
123}
|