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
11
12namespace CP {
13using ROOT::Math::PtEtaPhiMVector;
14
16 FillGenericPartonHistory("MC_t_beforeFSR", "MC_t_beforeFSR", 0);
17 FillGenericPartonHistory("MC_t_b_beforeFSR", "MC_b_beforeFSR_from_t", 0);
18 FillGenericPartonHistory("MC_t_afterFSR", "MC_t_afterFSR", 0);
19 FillGenericPartonHistory("MC_t_b_afterFSR", "MC_b_afterFSR_from_t", 0);
21}
22
24 FillGenericPartonHistory("MC_tbar_beforeFSR", "MC_tbar_beforeFSR", 0);
25 FillGenericPartonHistory("MC_tbar_bbar_beforeFSR",
26 "MC_bbar_beforeFSR_from_tbar", 0);
27 FillGenericPartonHistory("MC_tbar_afterFSR", "MC_tbar_afterFSR", 0);
28 FillGenericPartonHistory("MC_tbar_bbar_afterFSR",
29 "MC_bbar_afterFSR_from_tbar", 0);
30 FillWPartonHistory("tbar");
31}
32
34 // Assumes FillTopPartonHistory and FillAntiTopPartonHistory have already run.
35 PtEtaPhiMVector ttbar;
36 PtEtaPhiMVector t_beforeFSR, tbar_beforeFSR, t_afterFSR, tbar_afterFSR;
37 PtEtaPhiMVector WpDecay1, WpDecay2, WmDecay1, WmDecay2, b, bbar;
38
39 // m_dec.decorate* takes bare names; Retrievep4 takes full m_particleMap keys.
40 m_dec.decorateDefaultNoPdgId("MC_ttbar_beforeFSR");
41 m_dec.decorateDefaultNoPdgId("MC_ttbar_afterFSR");
42 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_beforeFSR");
43 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_afterFSR");
44
45 if (Retrievep4(m_prefix + "_" + "MC_t_beforeFSR", t_beforeFSR) &&
46 Retrievep4(m_prefix + "_" + "MC_tbar_beforeFSR", tbar_beforeFSR)) {
47 ttbar = t_beforeFSR + tbar_beforeFSR;
48 m_dec.decorateParticle("MC_ttbar_beforeFSR", ttbar);
49 }
50
51 if (Retrievep4(m_prefix + "_" + "MC_t_afterFSR", t_afterFSR) &&
52 Retrievep4(m_prefix + "_" + "MC_tbar_afterFSR", tbar_afterFSR)) {
53 ttbar = t_afterFSR + tbar_afterFSR;
54 m_dec.decorateParticle("MC_ttbar_afterFSR", ttbar);
55 }
56
57 if (Retrievep4(m_prefix + "_" + "MC_t_WDecay1_beforeFSR", WpDecay1) &&
58 Retrievep4(m_prefix + "_" + "MC_t_WDecay2_beforeFSR", WpDecay2) &&
59 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay1_beforeFSR", WmDecay1) &&
60 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay2_beforeFSR", WmDecay2) &&
61 Retrievep4(m_prefix + "_" + "MC_t_b_beforeFSR", b) &&
62 Retrievep4(m_prefix + "_" + "MC_tbar_bbar_beforeFSR", bbar)) {
63 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
64 m_dec.decorateParticle("MC_ttbar_fromDecay_beforeFSR", ttbar);
65 }
66
67 if (Retrievep4(m_prefix + "_" + "MC_t_WDecay1_afterFSR", WpDecay1) &&
68 Retrievep4(m_prefix + "_" + "MC_t_WDecay2_afterFSR", WpDecay2) &&
69 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay1_afterFSR", WmDecay1) &&
70 Retrievep4(m_prefix + "_" + "MC_tbar_WDecay2_afterFSR", WmDecay2) &&
71 Retrievep4(m_prefix + "_" + "MC_t_b_afterFSR", b) &&
72 Retrievep4(m_prefix + "_" + "MC_tbar_bbar_afterFSR", bbar)) {
73 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
74 m_dec.decorateParticle("MC_ttbar_fromDecay_afterFSR", ttbar);
75 }
76}
77} // 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.