ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TrigEDMConfig
python
ContainerRemapping_Run2Run3.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
# ContainerRemapping_Run2Run3.py
3
# A jobOptions fragment for aliasing Run 3 HLT container names
4
# to the Run 2 predecessors, e.g. for validation
5
#
6
7
from
AthenaCommon.Logging
import
logging
8
log = logging.getLogger(
'TriggerEDM'
)
9
10
# Mapping of Run 3 name to Run 2 name
11
# Should suffice to just do the interface container
12
HLT_Name_Changes = {
13
"xAOD::JetContainer"
:
14
[
15
# Small-R
16
(
'HLT_AntiKt4EMTopoJets_subjesIS'
,
'HLT_xAOD__JetContainer_a4tcemsubjesISFS'
),
17
(
'HLT_AntiKt4EMTopoJets_subjes'
,
'HLT_xAOD__JetContainer_a4tcemsubjesFS'
),
18
(
'HLT_AntiKt4EMTopoJets_nojcalib'
,
'HLT_xAOD__JetContainer_a4tcemnojcalibISFS'
),
19
# Large-R reclustered
20
(
'HLT_AntiKt10JetRCJets_subjesIS'
,
'HLT_xAOD__JetContainer_a10r_tcemsubjesISFS'
),
21
# Large-R ungroomed
22
(
'HLT_AntiKt10LCTopoJets_subjes'
,
'HLT_xAOD__JetContainer_a10tclcwsubjesFS'
),
23
(
'HLT_AntiKt10LCTopoJets_nojcalib'
,
'HLT_xAOD__JetContainer_a10tclcwnojcalibFS'
),
24
# Large-R groomed
25
(
'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes'
,
'HLT_xAOD__JetContainer_a10ttclcwjesFS'
),
26
],
27
28
'xAOD::CaloClusterContainer'
:
29
[(
'HLT_TopoCaloClustersFS'
,
'HLT_TrigCaloClusterMaker_topo'
)],
30
31
}
32
33
from
SGComps
import
AddressRemappingSvc
34
35
def
remapHLTContainerNames
():
36
for
containertype, renamelist
in
HLT_Name_Changes.items():
37
for
run3name, run2name
in
renamelist:
38
log.info(
"Remapping {} object SG Keys: {} --> {}"
.format(containertype,run3name,run2name))
39
40
auxcontainertype = containertype.replace(
"Container"
,
"AuxContainer"
)
41
if
containertype==
"xAOD::CaloClusterContainer"
:
42
auxcontainertype =
"xAOD::CaloClusterTrigAuxContainer"
43
if
containertype==
"xAOD::JetContainer"
and
run3name.startswith(
"HLT"
):
44
isShallow =
True
45
for
expr
in
[
"RCJets"
,
"Trimmed"
,
"SoftDrop"
,
"nojcalib"
]:
46
if
expr
in
run3name:
47
isShallow=
False
48
if
isShallow:
49
auxcontainertype =
"xAOD::ShallowAuxContainer"
50
51
#AddressRemappingSvc.addInputRename(containertype,run3name,run2name)
52
ars = AddressRemappingSvc.getAddressRemappingSvc()
53
ars.TypeKeyOverwriteMaps += [
'%s#%s->%s#%s'
% (containertype, run3name,
54
containertype, run2name) ]
55
56
#AddressRemappingSvc.addInputRename(auxcontainertype,run3name+"Aux.",run2name+"Aux.")
57
ars.TypeKeyOverwriteMaps += [
'%s#%s->%s#%s'
% (auxcontainertype, run3name+
"Aux."
,
58
auxcontainertype, run2name+
"Aux."
) ]
59
python.ContainerRemapping_Run2Run3.remapHLTContainerNames
remapHLTContainerNames()
Definition
ContainerRemapping_Run2Run3.py:35
Generated on
for ATLAS Offline Software by
1.17.0