2 """Define methods to construct configured MM 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 MM_Overlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MM_DIGITS")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MM_DIGITS")
17 kwargs.setdefault(
"OutputKey",
"MM_DIGITS")
19 kwargs.setdefault(
"IntegrationWindow", 30)
22 acc.addEventAlgo(CompFactory.MM_Overlay(name, **kwargs))
25 if flags.Output.doWriteRDO:
26 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
28 "Muon::MM_RawDataContainer#MMRDO"
31 if flags.Output.doWriteRDO_SGNL:
32 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
34 f
"Muon::MM_RawDataContainer#{flags.Overlay.SigPrefix}MMRDO"
41 """Return a ComponentAccumulator for the MM SDO overlay algorithm"""
45 if not flags.Input.isMC:
46 kwargs.setdefault(
"BkgInputKey",
"")
48 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MM_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}MM_SDO")
55 kwargs.setdefault(
"OutputKey",
"MM_SDO")
58 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
61 if flags.Output.doWriteRDO:
62 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
64 "MuonSimDataCollection#MM_SDO"
67 if flags.Output.doWriteRDO_SGNL:
68 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
70 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}MM_SDO"
77 """Configure and return a ComponentAccumulator for MM overlay"""
81 from MuonConfig.MuonByteStreamCnvTestConfig
import MM_RdoToDigitCfg
85 from MuonConfig.MM_DigitizationConfig
import MM_OverlayDigitizationBasicCfg
92 if flags.Digitization.EnableTruth:
93 if flags.Muon.usePhaseIIGeoSetup:
94 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
95 acc.merge(
TruthOverlayCfg(flags, name=
"MmTruthOverlay", WriteKey=
"MM_SDO", deadTime = 300.))
100 from MuonConfig.MuonByteStreamCnvTestConfig
import MM_DigitToRDOCfg