ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TruthPartonLevelAnalysisAlgorithms
Root
CalcHiggsPartonHistory.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
8
#include "
PartonHistory/CalcPartonHistory.h
"
9
#include "
VectorHelpers/DecoratorHelpers.h
"
10
#include "
VectorHelpers/LorentzHelper.h
"
11
#include "
xAODTruth/TruthParticleContainer.h
"
12
13
#include <array>
14
#include <utility>
15
16
namespace
CP
{
17
using
ROOT::Math::PtEtaPhiMVector;
18
19
void
CalcPartonHistory::setHiggs
(
const
std::string& fsr) {
20
PtEtaPhiMVector
H
;
21
PtEtaPhiMVector Wm, Wm_decay1, Wm_decay2;
22
PtEtaPhiMVector Wp, Wp_decay1, Wp_decay2;
23
int
Wm_decay1_pdgId, Wm_decay2_pdgId;
24
int
Wp_decay1_pdgId, Wp_decay2_pdgId;
25
26
// W+: pass full m_particleMap keys to getW; bare names to m_dec.*
27
bool
has_Wp =
28
getW
(
m_prefix
+
"_"
+
"MC_lbar_"
+ fsr,
m_prefix
+
"_"
+
"MC_nu_"
+ fsr,
29
Wp_decay1, Wp_decay1_pdgId, Wp_decay2, Wp_decay2_pdgId);
30
if
(has_Wp) {
31
Wp = Wp_decay1 + Wp_decay2;
32
m_dec
.decorateParticle(
"MC_Hdecay1_"
+ fsr, Wp, 24);
33
m_dec
.decorateParticle(
"MC_Hdecay1_decay1_"
+ fsr, Wp_decay1,
34
Wp_decay1_pdgId);
35
m_dec
.decorateParticle(
"MC_Hdecay1_decay2_"
+ fsr, Wp_decay2,
36
Wp_decay2_pdgId);
37
}
38
// W-
39
bool
has_Wm =
40
getW
(
m_prefix
+
"_"
+
"MC_l_"
+ fsr,
m_prefix
+
"_"
+
"MC_nubar_"
+ fsr,
41
Wm_decay1, Wm_decay1_pdgId, Wm_decay2, Wm_decay2_pdgId);
42
if
(has_Wm) {
43
Wm = Wm_decay1 + Wm_decay2;
44
m_dec
.decorateParticle(
"MC_Hdecay2_"
+ fsr, Wm, -24);
45
m_dec
.decorateParticle(
"MC_Hdecay2_decay1_"
+ fsr, Wm_decay1,
46
Wm_decay1_pdgId);
47
m_dec
.decorateParticle(
"MC_Hdecay2_decay2_"
+ fsr, Wm_decay2,
48
Wm_decay2_pdgId);
49
}
50
if
(has_Wm && has_Wp) {
51
H
= Wp + Wm;
52
m_dec
.decorateParticle(
"MC_H_"
+ fsr,
H
, 25);
53
}
54
}
55
56
void
CalcPartonHistory::FillHiggsPartonHistory
(
const
std::string& mode) {
57
// {particle map key, decoration name}, both without the "MC_" prefix and
58
// the FSR-stage suffix.
59
static
constexpr
std::array<std::pair<const char*, const char*>, 7>
60
higgsParticles{{{
"H"
,
"H"
},
61
{
"HDecay1"
,
"Hdecay1"
},
62
{
"HDecay2"
,
"Hdecay2"
},
63
{
"HDecay1Decay1"
,
"Hdecay1_decay1"
},
64
{
"HDecay1Decay2"
,
"Hdecay1_decay2"
},
65
{
"HDecay2Decay1"
,
"Hdecay2_decay1"
},
66
{
"HDecay2Decay2"
,
"Hdecay2_decay2"
}}};
67
static
constexpr
std::array<const char*, 2> fsrStages{
68
{
"_beforeFSR"
,
"_afterFSR"
}};
69
70
// Defaults for all branches regardless of mode.
71
for
(
const
char
* fsr : fsrStages)
72
for
(
const
auto
& [key, decoration] : higgsParticles)
73
m_dec
.decorateDefault(
"MC_"
+ std::string(decoration) + fsr);
74
75
if
(mode ==
"resonant"
|| mode ==
"single_top"
) {
76
// FillGenericPartonHistory retrieval strings are bare suffixes.
77
for
(
const
char
* fsr : fsrStages) {
78
for
(
const
auto
& [key, decoration] : higgsParticles) {
79
const
std::string decorationName =
80
"MC_"
+ std::string(decoration) + fsr;
81
if
(mode ==
"resonant"
) {
82
FillGenericPartonHistory
(
"MC_"
+ std::string(key) + fsr,
83
decorationName, 0);
84
}
else
{
85
FillGenericPartonHistory
({
"MC_"
+ std::string(key) + fsr,
86
"MC_b_"
+ std::string(key) + fsr,
87
"MC_bbar_"
+ std::string(key) + fsr},
88
decorationName, 0);
89
}
90
}
91
}
92
}
else
if
(mode ==
"non_resonant_WW"
) {
93
setHiggs
(
"beforeFSR"
);
94
setHiggs
(
"afterFSR"
);
95
}
96
}
97
}
// namespace CP
CalcPartonHistory.h
DecoratorHelpers.h
TruthParticleContainer.h
LorentzHelper.h
H
#define H(x, y, z)
Definition
MD5.cxx:114
CP::CalcPartonHistory::m_prefix
Gaudi::Property< std::string > m_prefix
Definition
CalcPartonHistory.h:165
CP::CalcPartonHistory::FillHiggsPartonHistory
void FillHiggsPartonHistory(const std::string &mode)
Definition
CalcHiggsPartonHistory.cxx:56
CP::CalcPartonHistory::getW
bool getW(const std::string &str_lep, const std::string &str_nu, PtEtaPhiMVector &p1, int &pdgId1, PtEtaPhiMVector &p2, int &pdgId2)
Definition
CalcWPartonHistory.cxx:15
CP::CalcPartonHistory::m_dec
PartonDecorator m_dec
Definition
CalcPartonHistory.h:162
CP::CalcPartonHistory::FillGenericPartonHistory
void FillGenericPartonHistory(const std::string &retrievalstring, const std::string &decorationstring, const int idx)
Definition
CalcGenericPartonHistory.cxx:14
CP::CalcPartonHistory::setHiggs
void setHiggs(const std::string &fsr)
Definition
CalcHiggsPartonHistory.cxx:19
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
Generated on
for ATLAS Offline Software by
1.17.0