2 """Define methods to construct configured MDT 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 MDTOverlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MDT_DIGITS")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MDT_DIGITS")
17 kwargs.setdefault(
"OutputKey",
"MDT_DIGITS")
19 kwargs.setdefault(
"IntegrationWindow", 20)
22 acc.addEventAlgo(CompFactory.MdtOverlay(name, **kwargs))
25 if flags.Output.doWriteRDO:
26 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
28 "MdtCsmContainer#MDTCSM"
31 if flags.Output.doWriteRDO_SGNL:
32 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
34 f
"MdtCsmContainer#{flags.Overlay.SigPrefix}MDTCSM"
41 """Return a ComponentAccumulator for the MDT SDO overlay algorithm"""
45 if not flags.Input.isMC:
46 kwargs.setdefault(
"BkgInputKey",
"")
48 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MDT_SDO")
50 if kwargs[
"BkgInputKey"]:
51 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
52 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
54 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MDT_SDO")
55 kwargs.setdefault(
"OutputKey",
"MDT_SDO")
58 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
61 if flags.Output.doWriteRDO:
62 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
64 "MuonSimDataCollection#MDT_SDO"
67 if flags.Output.doWriteRDO_SGNL:
68 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
70 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}MDT_SDO"
76 """Configure and return a ComponentAccumulator for MDT overlay"""
80 from MuonConfig.MuonByteStreamCnvTestConfig
import MdtRdoToMdtDigitCfg
84 from MuonConfig.MDT_DigitizationConfig
import MDT_OverlayDigitizationBasicCfg
91 if flags.Digitization.EnableTruth:
92 if flags.Muon.usePhaseIIGeoSetup:
93 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
94 acc.merge(
TruthOverlayCfg(flags, name=
"MdtTruthOverlay", WriteKey=
"MDT_SDO", deadTime = 700.))
99 from MuonConfig.MuonByteStreamCnvTestConfig
import MdtDigitToMdtRDOCfg