2 """Define methods to construct configured MM 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 MM data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import MmBytestreamDecodeCfg
23 """Return a ComponentAccumulator for MM_Overlay algorithm"""
26 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MM_DIGITS")
27 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}MM_DIGITS")
28 kwargs.setdefault(
"OutputKey",
"MM_DIGITS")
30 kwargs.setdefault(
"IntegrationWindow", 30)
33 acc.addEventAlgo(CompFactory.MM_Overlay(name, **kwargs))
36 if flags.Output.doWriteRDO:
37 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
39 "Muon::MM_RawDataContainer#MMRDO"
42 if flags.Output.doWriteRDO_SGNL:
43 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
45 f
"Muon::MM_RawDataContainer#{flags.Overlay.SigPrefix}MMRDO"
52 """Return a ComponentAccumulator for the MM SDO overlay algorithm"""
56 if flags.Overlay.DataOverlay:
57 kwargs.setdefault(
"BkgInputKey",
"")
59 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}MM_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}MM_SDO")
66 kwargs.setdefault(
"OutputKey",
"MM_SDO")
69 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
72 if flags.Output.doWriteRDO:
73 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
75 "MuonSimDataCollection#MM_SDO"
78 if flags.Output.doWriteRDO_SGNL:
79 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
81 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}MM_SDO"
88 """Configure and return a ComponentAccumulator for MM overlay"""
92 if flags.Overlay.DataOverlay:
96 from MuonConfig.MuonByteStreamCnvTestConfig
import MM_RdoToDigitCfg
99 from MuonConfig.MM_DigitizationConfig
import MM_OverlayDigitizationBasicCfg
104 if flags.Digitization.EnableTruth:
105 if flags.Muon.usePhaseIIGeoSetup:
106 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
107 acc.merge(
TruthOverlayCfg(flags, name=
"MmTruthOverlay", WriteKey=
"MM_SDO", deadTime = 300.))
111 from MuonConfig.MuonByteStreamCnvTestConfig
import MM_DigitToRDOCfg