ATLAS Offline Software
Loading...
Searching...
No Matches
CalcTopPartonHistory.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7
10
11namespace CP {
12using ROOT::Math::PtEtaPhiMVector;
13
15 FillGenericPartonHistory("MC_t_beforeFSR", "MC_t_beforeFSR", 0);
16 FillGenericPartonHistory("MC_t_b_beforeFSR", "MC_b_beforeFSR_from_t", 0);
17 FillGenericPartonHistory("MC_t_afterFSR", "MC_t_afterFSR", 0);
18 FillGenericPartonHistory("MC_t_b_afterFSR", "MC_b_afterFSR_from_t", 0);
20}
21
23 FillGenericPartonHistory("MC_tbar_beforeFSR", "MC_tbar_beforeFSR", 0);
24 FillGenericPartonHistory("MC_tbar_bbar_beforeFSR",
25 "MC_bbar_beforeFSR_from_tbar", 0);
26 FillGenericPartonHistory("MC_tbar_afterFSR", "MC_tbar_afterFSR", 0);
27 FillGenericPartonHistory("MC_tbar_bbar_afterFSR",
28 "MC_bbar_afterFSR_from_tbar", 0);
29 FillWPartonHistory("tbar");
30}
31
33 // Assumes FillTopPartonHistory and FillAntiTopPartonHistory have already run.
34 PtEtaPhiMVector ttbar;
35 PtEtaPhiMVector t_beforeFSR, tbar_beforeFSR, t_afterFSR, tbar_afterFSR;
36 PtEtaPhiMVector WpDecay1, WpDecay2, WmDecay1, WmDecay2, b, bbar;
37
38 // m_dec.decorate* takes bare names; Retrievep4 takes full m_particleMap keys.
39 m_dec.decorateDefaultNoPdgId("MC_ttbar_beforeFSR");
40 m_dec.decorateDefaultNoPdgId("MC_ttbar_afterFSR");
41 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_beforeFSR");
42 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_afterFSR");
43
44 if (Retrievep4(m_prefix + "_" + "MC_t_beforeFSR", t_beforeFSR) &&
45 Retrievep4(m_prefix + "_" + "MC_tbar_beforeFSR", tbar_beforeFSR)) {
46 ttbar = t_beforeFSR + tbar_beforeFSR;
47 m_dec.decorateParticle("MC_ttbar_beforeFSR", ttbar);
48 }
49
50 if (Retrievep4(m_prefix + "_" + "MC_t_afterFSR", t_afterFSR) &&
51 Retrievep4(m_prefix + "_" + "MC_tbar_afterFSR", tbar_afterFSR)) {
52 ttbar = t_afterFSR + tbar_afterFSR;
53 m_dec.decorateParticle("MC_ttbar_afterFSR", ttbar);
54 }
55
56 if (Retrievep4(m_prefix + "_" + "MC_t_WDecay1_beforeFSR", WpDecay1) &&
57 Retrievep4(m_prefix + "_" + "MC_t_WDecay2_beforeFSR", WpDecay2) &&
58 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay1_beforeFSR", WmDecay1) &&
59 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay2_beforeFSR", WmDecay2) &&
60 Retrievep4(m_prefix + "_" + "MC_t_b_beforeFSR", b) &&
61 Retrievep4(m_prefix + "_" + "MC_tbar_bbar_beforeFSR", bbar)) {
62 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
63 m_dec.decorateParticle("MC_ttbar_fromDecay_beforeFSR", ttbar);
64 }
65
66 if (Retrievep4(m_prefix + "_" + "MC_t_WDecay1_afterFSR", WpDecay1) &&
67 Retrievep4(m_prefix + "_" + "MC_t_WDecay2_afterFSR", WpDecay2) &&
68 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay1_afterFSR", WmDecay1) &&
69 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay2_afterFSR", WmDecay2) &&
70 Retrievep4(m_prefix + "_" + "MC_t_b_afterFSR", b) &&
71 Retrievep4(m_prefix + "_" + "MC_tbar_bbar_afterFSR", bbar)) {
72 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
73 m_dec.decorateParticle("MC_ttbar_fromDecay_afterFSR", ttbar);
74 }
75}
76} // namespace CP
void FillWPartonHistory(const std::string &parent, int nWs=1, const std::string &mode="resonant")
bool Retrievep4(const std::string &key, PtEtaPhiMVector &p4)
std::string m_prefix
prefix applied to all decorator and m_particleMap names
void FillGenericPartonHistory(const std::string &retrievalstring, const std::string &decorationstring, const int idx)
Select isolated Photons, Electrons and Muons.