2 """Define methods to construct configured TGC overlay algorithms
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
12 """Return a ComponentAccumulator with TGC data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import TgcBytestreamDecodeCfg
23 """Return a ComponentAccumulator for TGCOverlay algorithm"""
26 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TGC_DIGITS")
27 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TGC_DIGITS")
28 kwargs.setdefault(
"OutputKey",
"TGC_DIGITS")
31 acc.addEventAlgo(CompFactory.TgcOverlay(name, **kwargs))
34 if flags.Output.doWriteRDO:
35 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
37 "TgcRdoContainer#TGCRDO"
40 if flags.Output.doWriteRDO_SGNL:
41 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
43 f
"TgcRdoContainer#{flags.Overlay.SigPrefix}TGCRDO"
50 """Return a ComponentAccumulator for the TGC SDO overlay algorithm"""
54 if flags.Overlay.DataOverlay:
55 kwargs.setdefault(
"BkgInputKey",
"")
57 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TGC_SDO")
59 if kwargs[
"BkgInputKey"]:
60 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
61 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
63 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TGC_SDO")
64 kwargs.setdefault(
"OutputKey",
"TGC_SDO")
67 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
70 if flags.Output.doWriteRDO:
71 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
73 "MuonSimDataCollection#TGC_SDO"
76 if flags.Output.doWriteRDO_SGNL:
77 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
79 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}TGC_SDO"
86 """Configure and return a ComponentAccumulator for TGC overlay"""
90 if flags.Overlay.DataOverlay:
94 from MuonConfig.MuonByteStreamCnvTestConfig
import TgcRdoToTgcDigitCfg
97 from MuonConfig.TGC_DigitizationConfig
import TGC_OverlayDigitizationBasicCfg
102 if flags.Digitization.EnableTruth:
103 if flags.Muon.usePhaseIIGeoSetup:
104 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
105 acc.merge(
TruthOverlayCfg(flags, name=
"TgcTruthOverlay", WriteKey=
"TGC_SDO", deadTime = 100.))
109 from MuonConfig.MuonByteStreamCnvTestConfig
import TgcDigitToTgcRDOCfg