2 """Define methods to construct configured TGC overlay algorithms
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
12 """Return a ComponentAccumulator for TGCOverlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TGC_DIGITS")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TGC_DIGITS")
17 kwargs.setdefault(
"OutputKey",
"TGC_DIGITS")
20 acc.addEventAlgo(CompFactory.TgcOverlay(name, **kwargs))
23 if flags.Output.doWriteRDO:
24 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
26 "TgcRdoContainer#TGCRDO"
29 if flags.Output.doWriteRDO_SGNL:
30 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
32 f
"TgcRdoContainer#{flags.Overlay.SigPrefix}TGCRDO"
39 """Return a ComponentAccumulator for the TGC SDO overlay algorithm"""
43 if not flags.Input.isMC:
44 kwargs.setdefault(
"BkgInputKey",
"")
46 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TGC_SDO")
48 if kwargs[
"BkgInputKey"]:
49 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
50 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
52 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TGC_SDO")
53 kwargs.setdefault(
"OutputKey",
"TGC_SDO")
56 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
59 if flags.Output.doWriteRDO:
60 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
62 "MuonSimDataCollection#TGC_SDO"
65 if flags.Output.doWriteRDO_SGNL:
66 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
68 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}TGC_SDO"
75 """Configure and return a ComponentAccumulator for TGC overlay"""
79 from MuonConfig.MuonByteStreamCnvTestConfig
import TgcRdoToTgcDigitCfg
83 from MuonConfig.TGC_DigitizationConfig
import TGC_OverlayDigitizationBasicCfg
90 if flags.Digitization.EnableTruth:
91 if flags.Muon.usePhaseIIGeoSetup:
92 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
93 acc.merge(
TruthOverlayCfg(flags, name=
"TgcTruthOverlay", WriteKey=
"TGC_SDO", deadTime = 100.))
98 from MuonConfig.MuonByteStreamCnvTestConfig
import TgcDigitToTgcRDOCfg