ATLAS Offline Software
CaloExtensionBuilderAlgCfg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 def CaloExtensionBuilderAlgCfg(flags, name="CaloExtensionBuilderAlg", **kwargs):
6  result = ComponentAccumulator()
7 
8  if "LastCaloExtentionTool" not in kwargs:
9  from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
10  kwargs.setdefault("LastCaloExtentionTool", result.popToolsAndMerge(
12 
13  # P->T conversion extra dependencies
14  if flags.Detector.GeometryITk:
15  kwargs.setdefault("ExtraInputs", [
16  ("InDetDD::SiDetectorElementCollection", "ConditionStore+ITkPixelDetectorElementCollection"),
17  ("InDetDD::SiDetectorElementCollection", "ConditionStore+ITkStripDetectorElementCollection"),
18  ])
19  else:
20  kwargs.setdefault("ExtraInputs", [
21  ("InDetDD::SiDetectorElementCollection", "ConditionStore+PixelDetectorElementCollection"),
22  ("InDetDD::SiDetectorElementCollection", "ConditionStore+SCT_DetectorElementCollection"),
23  ])
24 
25  result.addEventAlgo(CompFactory.Trk.CaloExtensionBuilderAlg(name, **kwargs))
26  return result
27 
28 
29 def CaloExtensionBuilderAlgLRTCfg(flags, name="CaloExtensionBuilderAlg_LRT", **kwargs):
30  kwargs.setdefault("TrkPartContainerName", "InDetLargeD0TrackParticles")
31  kwargs.setdefault("ParticleCache", "ParticleCaloExtension_LRT")
32  return CaloExtensionBuilderAlgCfg(flags, name, **kwargs)
33 
34 
36  result = CaloExtensionBuilderAlgCfg(flags)
37  if flags.Tracking.doLargeD0 and flags.Tracking.storeSeparateLargeD0Container:
38  result.merge(CaloExtensionBuilderAlgLRTCfg(flags))
39  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloExtensionBuilderAlgCfg.CaloExtensionBuilderAlgLRTCfg
def CaloExtensionBuilderAlgLRTCfg(flags, name="CaloExtensionBuilderAlg_LRT", **kwargs)
Definition: CaloExtensionBuilderAlgCfg.py:29
CaloExtensionBuilderAlgCfg.CaloExtensionBuilderCfg
def CaloExtensionBuilderCfg(flags)
Definition: CaloExtensionBuilderAlgCfg.py:35
CaloExtensionBuilderAlgCfg
Definition: CaloExtensionBuilderAlgCfg.py:1
TrackToCaloConfig.ParticleCaloExtensionToolCfg
def ParticleCaloExtensionToolCfg(flags, name='ParticleCaloExtensionTool', **kwargs)
Definition: TrackToCaloConfig.py:10
CaloExtensionBuilderAlgCfg.CaloExtensionBuilderAlgCfg
def CaloExtensionBuilderAlgCfg(flags, name="CaloExtensionBuilderAlg", **kwargs)
Definition: CaloExtensionBuilderAlgCfg.py:5