ATLAS Offline Software
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 
8 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 
11 def 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 
21 def 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 
34 def 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 
46 def 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 
59 def 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 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
L1CaloCalibToolsConfig.L1CaloMatchCell2TowerCfg
def L1CaloMatchCell2TowerCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:21
L1CaloCalibToolsConfig.LegacyTriggerTowerDecoratorCfg
def LegacyTriggerTowerDecoratorCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:59
CaloTriggerToolConfig.CaloTriggerTowerServiceCfg
def CaloTriggerTowerServiceCfg(flags, name, **kwargs)
Definition: CaloTriggerToolConfig.py:11
L1CaloCalibToolsConfig.LegacyTriggerTowerThinningCfg
def LegacyTriggerTowerThinningCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:11
L1CaloCalibToolsConfig.L1CaloCells2TriggerTowersCfg
def L1CaloCells2TriggerTowersCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:34
L1CaloCalibToolsConfig.L1CaloxAODOfflineTriggerTowerToolsCfg
def L1CaloxAODOfflineTriggerTowerToolsCfg(flags, name, **kwargs)
Definition: L1CaloCalibToolsConfig.py:46