ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloCalibToolsConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3#==============================================================================
4# Provides configs for the tools/algorithms used for building/thinning L1Calo related
5# object containers and decorations in the DAODs
6#==============================================================================
7
8from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9from AthenaConfiguration.ComponentFactory import CompFactory
10
11def LegacyTriggerTowerThinningCfg(flags, name, **kwargs):
12 """
13 Configure the Legacy Trigger Tower Thinning tool
14 """
15 acc = ComponentAccumulator()
16
17 acc.addPublicTool(CompFactory.DerivationFramework.TriggerTowerThinningAlg(name, **kwargs), primary=True)
18
19 return acc
20
21def L1CaloMatchCell2TowerCfg(flags, name, **kwargs):
22 """
23 Configure the Legacy L1Calo match cell 2 tower tool
24 """
25 acc = ComponentAccumulator()
26
27 from CaloTriggerTool.CaloTriggerToolConfig import CaloTriggerTowerServiceCfg
28 kwargs.setdefault('CaloTriggerTowerService', acc.popToolsAndMerge(CaloTriggerTowerServiceCfg(flags,'CaloTriggerTowerService')))
29 acc.setPrivateTools(CompFactory.LVL1.L1CaloMatchCell2Tower(name, **kwargs))
30
31 return acc
32
33
34def L1CaloCells2TriggerTowersCfg(flags, name, **kwargs):
35 """
36 Configure the Legacy Calo to Trigger Towers tool
37 """
38 acc = ComponentAccumulator()
39
40 kwargs.setdefault('L1CaloMatchCell2Tower', acc.popToolsAndMerge(L1CaloMatchCell2TowerCfg(flags,'L1CaloMatchCell2Tower')))
41 acc.setPrivateTools(CompFactory.LVL1.L1CaloCells2TriggerTowers(name, **kwargs))
42
43 return acc
44
45
46def L1CaloxAODOfflineTriggerTowerToolsCfg(flags, name, **kwargs):
47 """
48 Configure the tools required by L1CaloxAODOfflineTriggerTowerTools
49 """
50 acc = ComponentAccumulator()
51
52 kwargs.setdefault("L1CaloCells2TriggerTowers", acc.popToolsAndMerge(L1CaloCells2TriggerTowersCfg(flags,'L1CaloCells2TriggerTowers')))
53
54 acc.setPrivateTools(CompFactory.LVL1.L1CaloxAODOfflineTriggerTowerTools(name, **kwargs))
55
56 return acc
57
58
59def LegacyTriggerTowerDecoratorCfg(flags, name, **kwargs):
60 """
61 Configure the legacy trigger tower decorator algorithm
62 """
63 acc = ComponentAccumulator()
64
65 # get the trigger tower tools
66 triggerTowerTools = acc.popToolsAndMerge(L1CaloxAODOfflineTriggerTowerToolsCfg(flags, name, **kwargs))
67
68 acc.addEventAlgo(CompFactory.LVL1.L1CaloTriggerTowerDecoratorAlg(name, TriggerTowerTools = triggerTowerTools, **kwargs), primary=True)
69
70 return acc
71
L1CaloCells2TriggerTowersCfg(flags, name, **kwargs)
LegacyTriggerTowerDecoratorCfg(flags, name, **kwargs)
L1CaloMatchCell2TowerCfg(flags, name, **kwargs)
L1CaloxAODOfflineTriggerTowerToolsCfg(flags, name, **kwargs)
LegacyTriggerTowerThinningCfg(flags, name, **kwargs)