ATLAS Offline Software
Loading...
Searching...
No Matches
CaloExtensionBuilderAlgCfg.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentFactory import CompFactory
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
5def 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(
11 ParticleCaloExtensionToolCfg(flags)))
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
29def 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
CaloExtensionBuilderAlgLRTCfg(flags, name="CaloExtensionBuilderAlg_LRT", **kwargs)