2 """Define methods to construct configured MDT 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 MDT data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import MdtBytestreamDecodeCfg
23 """Return a ComponentAccumulator for MDTOverlay algorithm"""
26 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MDT_DIGITS")
27 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MDT_DIGITS")
28 kwargs.setdefault(
"OutputKey",
"MDT_DIGITS")
30 kwargs.setdefault(
"IntegrationWindow", 20)
33 acc.addEventAlgo(CompFactory.MdtOverlay(name, **kwargs))
36 if flags.Output.doWriteRDO:
37 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
39 "MdtCsmContainer#MDTCSM"
42 if flags.Output.doWriteRDO_SGNL:
43 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
45 f
"MdtCsmContainer#{flags.Overlay.SigPrefix}MDTCSM"
52 """Return a ComponentAccumulator for the MDT SDO overlay algorithm"""
56 if flags.Overlay.DataOverlay:
57 kwargs.setdefault(
"BkgInputKey",
"")
59 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MDT_SDO")
61 if kwargs[
"BkgInputKey"]:
62 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
63 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
65 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MDT_SDO")
66 kwargs.setdefault(
"OutputKey",
"MDT_SDO")
69 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
72 if flags.Output.doWriteRDO:
73 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
75 "MuonSimDataCollection#MDT_SDO"
78 if flags.Output.doWriteRDO_SGNL:
79 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
81 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}MDT_SDO"
87 """Configure and return a ComponentAccumulator for MDT overlay"""
91 if flags.Overlay.DataOverlay:
95 from MuonConfig.MuonByteStreamCnvTestConfig
import MdtRdoToMdtDigitCfg
98 from MuonConfig.MDT_DigitizationConfig
import MDT_OverlayDigitizationBasicCfg
103 if flags.Digitization.EnableTruth:
104 if flags.Muon.usePhaseIIGeoSetup:
105 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
106 acc.merge(
TruthOverlayCfg(flags, name=
"MdtTruthOverlay", WriteKey=
"MDT_SDO", deadTime = 700.))
110 from MuonConfig.MuonByteStreamCnvTestConfig
import MdtDigitToMdtRDOCfg