ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
HLT
Bjet
BjetHitZConfigTest.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
"""Configure the HitZ reco on its own, without a chain that schedules it.
3
4
Until the menu uses it, nothing else in the build touches this configuration,
5
so a broken flag, alg name or data dependency would otherwise go unnoticed.
6
"""
7
8
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
9
from
AthenaConfiguration.TestDefaults
import
(
10
defaultTestFiles, defaultGeometryTags, defaultConditionsTags,
11
)
12
from
AthenaCommon.Logging
import
logging
13
14
from
TriggerMenuMT.HLT.Jet.JetPresel
import
getPreselRecoDict
15
from
TriggerMenuMT.HLT.Jet.JetRecoSequencesConfig
import
JetRecoDataDeps
16
from
TriggerMenuMT.HLT.Jet.JetMenuSequencesConfig
import
jetRoIHitZRecoCfg
17
from
TriggerMenuMT.HLT.Bjet
import
BjetHitZConfig
18
19
log = logging.getLogger(__name__)
20
21
flags = initConfigFlags()
22
flags.Input.Files = defaultTestFiles.RDO_RUN4
23
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
24
flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
25
flags.lock()
26
27
_, preselJetDef = JetRecoDataDeps(flags, **getPreselRecoDict(
'a4'
))[
'final'
]
28
reco, jets = jetRoIHitZRecoCfg(flags, preselJetDef)
29
30
hitzJets =
'HLT_AntiKt4EMTopoJets_subjesIS_hitz'
31
assert
jets.startswith(hitzJets), jets
32
33
for
name
in
[
'ITkPixelPrepDataToxAOD'
,
'ITkStripPrepDataToxAOD'
,
34
'HitZJetHitAssociationPixel'
,
'HitZJetHitAssociationStrip'
,
35
'HitZHitsSelector'
,
'HitZJetTagAlg'
,
'jetview_'
+jets]:
36
assert
reco.getEventAlgo(name)
is
not
None
, f
'{name} is not configured'
37
38
tagger = reco.getEventAlgo(
'HitZJetTagAlg'
)
39
assert
tagger.container == hitzJets
40
assert
tagger.constituentContainer ==
''
41
assert
tagger.decorator.nnFile == flags.Trigger.Jet.hitZNetwork
42
assert
dict(tagger.decorator.variableRemapping) == BjetHitZConfig.OUTPUT_REMAP
43
44
assert
reco.getService(
'HitZNNSharingOnnxSvc'
).executionProvider ==
'CPU'
45
46
reco.wasMerged()
47
log.info(
'HitZ reco configured on %s'
, jets)
Generated on
for ATLAS Offline Software by
1.17.0