ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODJet
Root
JetContainerInfo.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
xAODJet/JetContainerInfo.h
"
6
#include <string>
7
#include <map>
8
9
namespace
xAOD
{
10
11
namespace
JetAlgorithmType
{
12
13
static
const
std::string
c_unknownAlg
=
"UnknownAlg"
;
14
20
static
const
std::map<std::string, ID>
nameToIDmap
= {
21
// Names in the ATLAS convention
22
{
"Kt"
,
JetAlgorithmType::kt_algorithm
},
23
{
"CamKt"
,
JetAlgorithmType::cambridge_algorithm
},
24
{
"AntiKt"
,
JetAlgorithmType::antikt_algorithm
},
25
{
"GenKt"
,
JetAlgorithmType::genkt_algorithm
},
26
{
"CamKtPassive"
,
JetAlgorithmType::cambridge_for_passive_algorithm
},
27
{
"GenKtPassive"
,
JetAlgorithmType::genkt_for_passive_algorithm
},
28
{
"EEKt"
,
JetAlgorithmType::ee_kt_algorithm
},
29
{
"EEGenKt"
,
JetAlgorithmType::ee_genkt_algorithm
},
30
// Names as FastJet understands them (in lower case)
31
{
"kt"
,
JetAlgorithmType::kt_algorithm
},
32
{
"cambridge"
,
JetAlgorithmType::cambridge_algorithm
},
33
{
"antikt"
,
JetAlgorithmType::antikt_algorithm
},
34
{
"genkt"
,
JetAlgorithmType::genkt_algorithm
},
35
{
"cambridge_for_passive"
,
JetAlgorithmType::cambridge_for_passive_algorithm
},
36
{
"genkt_for_passive"
,
JetAlgorithmType::genkt_for_passive_algorithm
},
37
{
"ee_kt"
,
JetAlgorithmType::ee_kt_algorithm
},
38
{
"ee_genkt"
,
JetAlgorithmType::ee_genkt_algorithm
},
39
// Technical entries
40
{
"FastJetPlugin"
,
JetAlgorithmType::plugin_algorithm
},
41
{
c_unknownAlg
,
JetAlgorithmType::undefined_jet_algorithm
}
42
};
43
54
static
const
std::map<ID, std::string>
idToNamemap
= {
55
{
JetAlgorithmType::kt_algorithm
,
"Kt"
},
56
{
JetAlgorithmType::cambridge_algorithm
,
"CamKt"
},
57
{
JetAlgorithmType::antikt_algorithm
,
"AntiKt"
},
58
{
JetAlgorithmType::genkt_algorithm
,
"GenKt"
},
59
{
JetAlgorithmType::cambridge_for_passive_algorithm
,
"CamKtPassive"
},
60
{
JetAlgorithmType::genkt_for_passive_algorithm
,
"GenKtPassive"
},
61
{
JetAlgorithmType::ee_kt_algorithm
,
"EEKt"
},
62
{
JetAlgorithmType::ee_genkt_algorithm
,
"EEGenKt"
},
63
{
JetAlgorithmType::plugin_algorithm
,
"FastJetPlugin"
},
64
{
JetAlgorithmType::undefined_jet_algorithm
,
c_unknownAlg
}
65
};
66
67
const
std::string&
algName
(
ID
id
) {
68
69
auto
itr =
idToNamemap
.find(
id
);
70
if
( itr !=
idToNamemap
.end() ) {
71
return
itr->second;
72
}
73
return
c_unknownAlg
;
74
}
75
76
ID
algId
(
const
std::string& n ) {
77
78
auto
itr =
nameToIDmap
.find( n );
79
if
( itr !=
nameToIDmap
.end() ) {
80
return
itr->second;
81
}
82
return
undefined_jet_algorithm
;
83
}
84
85
}
// JetAlgorithmType namespace
86
87
namespace
JetInput
{
88
89
static
const
std::string
c_unCategorized
=
"Uncategorized"
;
90
96
static
const
std::map<std::string, Type>
nameToTypemap
= {
97
{
"LCTopo"
,
LCTopo
},
98
{
"EMTopo"
,
EMTopo
},
99
{
"LCTopoOrigin"
,
LCTopoOrigin
},
100
{
"EMTopoOrigin"
,
EMTopoOrigin
},
101
{
"TopoTower"
,
TopoTower
},
102
{
"Tower"
,
Tower
},
103
{
"Jet"
,
Jet
},
104
{
"Truth"
,
Truth
},
105
{
"TruthWZ"
,
TruthWZ
},
106
{
"TruthDressedWZ"
,
TruthDressedWZ
},
107
{
"TruthCharged"
,
TruthCharged
},
108
{
"Track"
,
Track
},
109
{
"PFlow"
,
PFlow
},
110
{
"LCPFlow"
,
LCPFlow
},
111
{
"EMPFlow"
,
EMPFlow
},
112
{
"EMCPFlow"
,
EMCPFlow
},
113
{
"EMPFlowByVertex"
,
EMPFlowByVertex
},
114
{
"TrackCaloCluster"
,
TrackCaloCluster
},
115
{
"EMTopoOriginSK"
,
EMTopoOriginSK
},
116
{
"EMTopoOriginCS"
,
EMTopoOriginCS
},
117
{
"EMTopoOriginCSSK"
,
EMTopoOriginCSSK
},
118
{
"EMTopoOriginVorSK"
,
EMTopoOriginVorSK
},
119
{
"EMTopoOriginTime"
,
EMTopoOriginTime
},
120
{
"EMTopoOriginSKTime"
,
EMTopoOriginSKTime
},
121
{
"EMTopoOriginCSSKTime"
,
EMTopoOriginCSSKTime
},
122
{
"EMTopoOriginVorSKTime"
,
EMTopoOriginVorSKTime
},
123
{
"LCTopoOriginSK"
,
LCTopoOriginSK
},
124
{
"LCTopoOriginCS"
,
LCTopoOriginCS
},
125
{
"LCTopoOriginCSSK"
,
LCTopoOriginCSSK
},
126
{
"LCTopoOriginVorSK"
,
LCTopoOriginVorSK
},
127
{
"EMPFlowSK"
,
EMPFlowSK
},
128
{
"EMPFlowCS"
,
EMPFlowCS
},
129
{
"EMPFlowCSSK"
,
EMPFlowCSSK
},
130
{
"EMPFlowVorSK"
,
EMPFlowVorSK
},
131
{
"EMPFlowTime"
,
EMPFlowTime
},
132
{
"EMPFlowSKTime"
,
EMPFlowSKTime
},
133
{
"EMPFlowCSSKTime"
,
EMPFlowCSSKTime
},
134
{
"EMPFlowVorSKTime"
,
EMPFlowVorSKTime
},
135
{
"HI"
,
HI
},
136
{
"HIClusters"
,
HIClusters
},
137
{
"PFlowCustomVtx"
,
PFlowCustomVtx
},
138
{
c_unCategorized
,
Uncategorized
}
139
};
140
148
static
const
std::map<Type, std::string>
typeToNamemap
{
149
{
LCTopo
,
"LCTopo"
},
150
{
EMTopo
,
"EMTopo"
},
151
{
LCTopoOrigin
,
"LCTopoOrigin"
},
152
{
EMTopoOrigin
,
"EMTopoOrigin"
},
153
{
TopoTower
,
"TopoTower"
},
154
{
Tower
,
"Tower"
},
155
{
Jet
,
"Jet"
},
156
{
Truth
,
"Truth"
},
157
{
TruthWZ
,
"TruthWZ"
},
158
{
TruthDressedWZ
,
"TruthDressedWZ"
},
159
{
TruthCharged
,
"TruthCharged"
},
160
{
Track
,
"Track"
},
161
{
PFlow
,
"PFlow"
},
162
{
LCPFlow
,
"LCPFlow"
},
163
{
EMPFlow
,
"EMPFlow"
},
164
{
EMCPFlow
,
"EMCPFlow"
},
165
{
EMPFlowByVertex
,
"EMPFlowByVertex"
},
166
{
TrackCaloCluster
,
"TrackCaloCluster"
},
167
{
EMTopoOriginSK
,
"EMTopoOriginSK"
},
168
{
EMTopoOriginCS
,
"EMTopoOriginCS"
},
169
{
EMTopoOriginCSSK
,
"EMTopoOriginCSSK"
},
170
{
EMTopoOriginVorSK
,
"EMTopoOriginVorSK"
},
171
{
EMTopoOriginTime
,
"EMTopoOriginTime"
},
172
{
EMTopoOriginSKTime
,
"EMTopoOriginSKTime"
},
173
{
EMTopoOriginCSSKTime
,
"EMTopoOriginCSSKTime"
},
174
{
EMTopoOriginVorSKTime
,
"EMTopoOriginVorSKTime"
},
175
{
LCTopoOriginSK
,
"LCTopoOriginSK"
},
176
{
LCTopoOriginCS
,
"LCTopoOriginCS"
},
177
{
LCTopoOriginCSSK
,
"LCTopoOriginCSSK"
},
178
{
LCTopoOriginVorSK
,
"LCTopoOriginVorSK"
},
179
{
EMPFlowSK
,
"EMPFlowSK"
},
180
{
EMPFlowCS
,
"EMPFlowCS"
},
181
{
EMPFlowCSSK
,
"EMPFlowCSSK"
},
182
{
EMPFlowVorSK
,
"EMPFlowVorSK"
},
183
{
EMPFlowTime
,
"EMPFlowTime"
},
184
{
EMPFlowSKTime
,
"EMPFlowSKTime"
},
185
{
EMPFlowCSSKTime
,
"EMPFlowCSSKTime"
},
186
{
EMPFlowVorSKTime
,
"EMPFlowVorSKTime"
},
187
{
HI
,
"HI"
},
188
{
HIClusters
,
"HIClusters"
},
189
{
PFlowCustomVtx
,
"PFlowCustomVtx"
},
190
{
Uncategorized
,
c_unCategorized
}
191
};
192
193
bool
isValidConstitType
(
Type
t ) {
194
195
auto
itr =
typeToNamemap
.find( t );
196
return
( ( itr !=
typeToNamemap
.end() ) && ( t !=
Uncategorized
) );
197
}
198
199
const
std::string&
typeName
(
Type
id
) {
200
201
auto
itr =
typeToNamemap
.find(
id
);
202
if
( itr !=
typeToNamemap
.end() ) {
203
return
itr->second;
204
}
205
return
c_unCategorized
;
206
}
207
208
Type
inputType
(
const
std::string& n ) {
209
210
auto
itr =
nameToTypemap
.find( n );
211
if
( itr !=
nameToTypemap
.end() ) {
212
return
itr->second;
213
}
214
return
Uncategorized
;
215
}
216
217
}
// namespace JetInput
218
219
namespace
JetTransform
{
220
221
std::string
name
(
Type
type
) {
222
switch
(
type
) {
223
case
UnknownTransform
:
return
"UnknownTransform"
;
224
case
NoTransform
:
return
"NoTransform"
;
225
case
Trim
:
return
"Trim"
;
226
case
Prune
:
return
"Prune"
;
227
case
MassDrop
:
return
"MassDrop"
;
228
case
KtRecluster
:
return
"KtRecluster"
;
229
case
CamKtRecluster
:
return
"CamKtRecluster"
;
230
case
AntiKtRecluster
:
return
"AntiKtRecluster"
;
231
}
232
return
"UnknownTransform"
;
233
}
234
235
Type
type
(
const
std::string&
name
) {
236
if
(
name
==
"UnknownTransform"
)
return
NoTransform
;
237
if
(
name
==
"NoTransform"
)
return
NoTransform
;
238
if
(
name
==
"Trim"
)
return
Trim
;
239
if
(
name
==
"Prune"
)
return
Prune
;
240
if
(
name
==
"MassDrop"
)
return
MassDrop
;
241
if
(
name
==
"KtRecluster"
)
return
KtRecluster
;
242
if
(
name
==
"CamKtRecluster"
)
return
CamKtRecluster
;
243
if
(
name
==
"AntiKtRecluster"
)
return
AntiKtRecluster
;
244
return
UnknownTransform
;
245
}
246
247
}
// end namespace JetTransform
248
249
}
JetContainerInfo.h
HI
Definition
HIEventDefs.h:14
PFlow
Definition
PFlow.py:1
Track
Definition
TriggerChamberClusterOnTrackCreator.h:19
Truth
Definition
ITruthClassificationTool.h:16
xAOD::JetAlgorithmType
Definition
JetContainerInfo.cxx:11
xAOD::JetAlgorithmType::algId
ID algId(const std::string &n)
Converts a string into a JetAlgorithmType::ID.
Definition
JetContainerInfo.cxx:76
xAOD::JetAlgorithmType::nameToIDmap
static const std::map< std::string, ID > nameToIDmap
Map associating string names to enumeration values.
Definition
JetContainerInfo.cxx:20
xAOD::JetAlgorithmType::idToNamemap
static const std::map< ID, std::string > idToNamemap
Map associating enum values to string names.
Definition
JetContainerInfo.cxx:54
xAOD::JetAlgorithmType::c_unknownAlg
static const std::string c_unknownAlg
Definition
JetContainerInfo.cxx:13
xAOD::JetAlgorithmType::algName
const std::string & algName(ID id)
Converts a JetAlgorithmType::ID into a string.
Definition
JetContainerInfo.cxx:67
xAOD::JetAlgorithmType::ID
ID
//////////////////////////////////////// JetAlgorithmType::ID defines most common physics jet finding...
Definition
JetContainerInfo.h:29
xAOD::JetAlgorithmType::genkt_algorithm
@ genkt_algorithm
Definition
JetContainerInfo.h:34
xAOD::JetAlgorithmType::genkt_for_passive_algorithm
@ genkt_for_passive_algorithm
Definition
JetContainerInfo.h:36
xAOD::JetAlgorithmType::ee_genkt_algorithm
@ ee_genkt_algorithm
Definition
JetContainerInfo.h:38
xAOD::JetAlgorithmType::cambridge_algorithm
@ cambridge_algorithm
Definition
JetContainerInfo.h:32
xAOD::JetAlgorithmType::plugin_algorithm
@ plugin_algorithm
Definition
JetContainerInfo.h:39
xAOD::JetAlgorithmType::antikt_algorithm
@ antikt_algorithm
Definition
JetContainerInfo.h:33
xAOD::JetAlgorithmType::undefined_jet_algorithm
@ undefined_jet_algorithm
Definition
JetContainerInfo.h:40
xAOD::JetAlgorithmType::ee_kt_algorithm
@ ee_kt_algorithm
Definition
JetContainerInfo.h:37
xAOD::JetAlgorithmType::cambridge_for_passive_algorithm
@ cambridge_for_passive_algorithm
Definition
JetContainerInfo.h:35
xAOD::JetAlgorithmType::kt_algorithm
@ kt_algorithm
Definition
JetContainerInfo.h:31
xAOD::JetInput
Definition
JetContainerInfo.cxx:87
xAOD::JetInput::Type
Type
Definition
JetContainerInfo.h:54
xAOD::JetInput::EMTopoOriginSK
@ EMTopoOriginSK
Definition
JetContainerInfo.h:71
xAOD::JetInput::EMPFlowByVertex
@ EMPFlowByVertex
Definition
JetContainerInfo.h:98
xAOD::JetInput::EMPFlowSKTime
@ EMPFlowSKTime
Definition
JetContainerInfo.h:92
xAOD::JetInput::EMCPFlow
@ EMCPFlow
Definition
JetContainerInfo.h:65
xAOD::JetInput::TopoTower
@ TopoTower
Definition
JetContainerInfo.h:57
xAOD::JetInput::Jet
@ Jet
Definition
JetContainerInfo.h:66
xAOD::JetInput::LCTopoOriginVorSK
@ LCTopoOriginVorSK
Definition
JetContainerInfo.h:80
xAOD::JetInput::EMPFlowTime
@ EMPFlowTime
Definition
JetContainerInfo.h:91
xAOD::JetInput::LCTopoOriginSK
@ LCTopoOriginSK
Definition
JetContainerInfo.h:76
xAOD::JetInput::PFlowCustomVtx
@ PFlowCustomVtx
Definition
JetContainerInfo.h:97
xAOD::JetInput::LCTopoOrigin
@ LCTopoOrigin
Definition
JetContainerInfo.h:67
xAOD::JetInput::EMPFlowCSSK
@ EMPFlowCSSK
Definition
JetContainerInfo.h:84
xAOD::JetInput::EMTopoOrigin
@ EMTopoOrigin
Definition
JetContainerInfo.h:68
xAOD::JetInput::EMTopoOriginTime
@ EMTopoOriginTime
Definition
JetContainerInfo.h:87
xAOD::JetInput::EMPFlowCS
@ EMPFlowCS
Definition
JetContainerInfo.h:82
xAOD::JetInput::TrackCaloCluster
@ TrackCaloCluster
Definition
JetContainerInfo.h:69
xAOD::JetInput::Uncategorized
@ Uncategorized
Definition
JetContainerInfo.h:100
xAOD::JetInput::EMTopoOriginCSSK
@ EMTopoOriginCSSK
Definition
JetContainerInfo.h:74
xAOD::JetInput::Tower
@ Tower
Definition
JetContainerInfo.h:58
xAOD::JetInput::EMPFlowVorSK
@ EMPFlowVorSK
Definition
JetContainerInfo.h:85
xAOD::JetInput::EMTopoOriginSKTime
@ EMTopoOriginSKTime
Definition
JetContainerInfo.h:88
xAOD::JetInput::TruthDressedWZ
@ TruthDressedWZ
Definition
JetContainerInfo.h:70
xAOD::JetInput::LCTopoOriginCS
@ LCTopoOriginCS
Definition
JetContainerInfo.h:77
xAOD::JetInput::EMTopoOriginVorSKTime
@ EMTopoOriginVorSKTime
Definition
JetContainerInfo.h:90
xAOD::JetInput::EMTopo
@ EMTopo
Definition
JetContainerInfo.h:56
xAOD::JetInput::EMTopoOriginVorSK
@ EMTopoOriginVorSK
Definition
JetContainerInfo.h:75
xAOD::JetInput::LCPFlow
@ LCPFlow
Definition
JetContainerInfo.h:63
xAOD::JetInput::TruthCharged
@ TruthCharged
Definition
JetContainerInfo.h:86
xAOD::JetInput::EMPFlowCSSKTime
@ EMPFlowCSSKTime
Definition
JetContainerInfo.h:93
xAOD::JetInput::TruthWZ
@ TruthWZ
Definition
JetContainerInfo.h:60
xAOD::JetInput::HIClusters
@ HIClusters
Definition
JetContainerInfo.h:96
xAOD::JetInput::EMPFlow
@ EMPFlow
Definition
JetContainerInfo.h:64
xAOD::JetInput::LCTopoOriginCSSK
@ LCTopoOriginCSSK
Definition
JetContainerInfo.h:79
xAOD::JetInput::EMTopoOriginCS
@ EMTopoOriginCS
Definition
JetContainerInfo.h:72
xAOD::JetInput::LCTopo
@ LCTopo
Definition
JetContainerInfo.h:55
xAOD::JetInput::EMPFlowSK
@ EMPFlowSK
Definition
JetContainerInfo.h:81
xAOD::JetInput::EMPFlowVorSKTime
@ EMPFlowVorSKTime
Definition
JetContainerInfo.h:94
xAOD::JetInput::EMTopoOriginCSSKTime
@ EMTopoOriginCSSKTime
Definition
JetContainerInfo.h:89
xAOD::JetInput::nameToTypemap
static const std::map< std::string, Type > nameToTypemap
Map associating string names to enumeration values.
Definition
JetContainerInfo.cxx:96
xAOD::JetInput::c_unCategorized
static const std::string c_unCategorized
Definition
JetContainerInfo.cxx:89
xAOD::JetInput::inputType
Type inputType(const std::string &n)
Definition
JetContainerInfo.cxx:208
xAOD::JetInput::typeName
const std::string & typeName(Type id)
Definition
JetContainerInfo.cxx:199
xAOD::JetInput::isValidConstitType
bool isValidConstitType(Type t)
Definition
JetContainerInfo.cxx:193
xAOD::JetInput::typeToNamemap
static const std::map< Type, std::string > typeToNamemap
Map associating enum values to string names.
Definition
JetContainerInfo.cxx:148
xAOD::JetTransform
Definition
JetContainerInfo.cxx:219
xAOD::JetTransform::Type
Type
Enum for types of jet transformations.
Definition
JetContainerInfo.h:112
xAOD::JetTransform::MassDrop
@ MassDrop
Definition
JetContainerInfo.h:117
xAOD::JetTransform::Trim
@ Trim
Definition
JetContainerInfo.h:115
xAOD::JetTransform::NoTransform
@ NoTransform
Definition
JetContainerInfo.h:114
xAOD::JetTransform::Prune
@ Prune
Definition
JetContainerInfo.h:116
xAOD::JetTransform::CamKtRecluster
@ CamKtRecluster
Definition
JetContainerInfo.h:119
xAOD::JetTransform::UnknownTransform
@ UnknownTransform
Definition
JetContainerInfo.h:113
xAOD::JetTransform::AntiKtRecluster
@ AntiKtRecluster
Definition
JetContainerInfo.h:120
xAOD::JetTransform::KtRecluster
@ KtRecluster
Definition
JetContainerInfo.h:118
xAOD::JetTransform::name
std::string name(Type type)
Convert jet transformation enum to string.
Definition
JetContainerInfo.cxx:221
xAOD::JetTransform::type
Type type(const std::string &name)
Convert string to jet transformation enum.
Definition
JetContainerInfo.cxx:235
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
Generated on
for ATLAS Offline Software by
1.17.0