ATLAS Offline Software
Loading...
Searching...
No Matches
GenerateJetChainDefs.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from .JetChainConfiguration import JetChainConfiguration
4from TriggerMenuMT.HLT.Config.Utility.ChainMerging import mergeChainDefs
5
6import pprint
7from AthenaCommon.Logging import logging
8log = logging.getLogger(__name__)
9log.debug("Importing %s",__name__)
10
11
12
13def generateChainConfigs(flags, chainDict ):
14
15 if log.isEnabledFor(logging.DEBUG): # pprint.pformat is expensive
16 log.debug('full jet dictionary is: %s\n', pprint.pformat(chainDict))
17
18 # Jet chain is assembled always from the full dictionary (multiple legs are handled internally by the jet reco / hypo)
19 theChainDef = JetChainConfiguration(chainDict)
20 theChainDef.prepareDataDependencies(flags)
21
22 listOfChainDefs = []
23
24 for leg in range(len(chainDict['chainParts'])):
25
26 listOfChainDefs += [theChainDef.assembleChain(flags)]
27
28 if len(listOfChainDefs) > 1:
29 jetChain = mergeChainDefs(listOfChainDefs, chainDict)
30 else:
31 jetChain = listOfChainDefs[0]
32 return jetChain
33
34
35
36
37
38