2 """Define methods to construct configured RPC 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 RPCOverlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}RPC_DIGITS")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}RPC_DIGITS")
17 kwargs.setdefault(
"OutputKey",
"RPC_DIGITS")
20 acc.addEventAlgo(CompFactory.RpcOverlay(name, **kwargs))
23 if flags.Output.doWriteRDO:
24 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
26 "RpcPadContainer#RPCPAD"
28 if flags.Muon.enableNRPC:
30 "xAOD::NRPCRDOContainer#NRPCRDO",
"xAOD::NRPCRDOAuxContainer#NRPCRDOAux."
33 if flags.Output.doWriteRDO_SGNL:
34 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
36 f
"RpcPadContainer#{flags.Overlay.SigPrefix}RPCPAD"
38 if flags.Muon.enableNRPC:
40 f
"xAOD::NRPCRDOContainer#{flags.Overlay.SigPrefix}NRPCRDO", f
"xAOD::NRPCRDOAuxContainer#{flags.Overlay.SigPrefix}NRPCRDOAux."
47 """Return a ComponentAccumulator for the RPC SDO overlay algorithm"""
51 if not flags.Input.isMC:
52 kwargs.setdefault(
"BkgInputKey",
"")
54 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}RPC_SDO")
56 if kwargs[
"BkgInputKey"]:
57 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
58 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
60 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}RPC_SDO")
61 kwargs.setdefault(
"OutputKey",
"RPC_SDO")
64 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
67 if flags.Output.doWriteRDO:
68 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
70 "MuonSimDataCollection#RPC_SDO"
73 if flags.Output.doWriteRDO_SGNL:
74 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
76 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}RPC_SDO"
83 """Configure and return a ComponentAccumulator for RPC overlay"""
87 from MuonConfig.MuonByteStreamCnvTestConfig
import RpcRdoToRpcDigitCfg
91 from MuonConfig.RPC_DigitizationConfig
import RPC_OverlayDigitizationBasicCfg
98 if flags.Digitization.EnableTruth:
99 if flags.Muon.usePhaseIIGeoSetup:
100 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
101 acc.merge(
TruthOverlayCfg(flags, name=
"RpcTruthOverlay", WriteKey=
"RPC_SDO", deadTime = 100.))
106 from MuonConfig.MuonByteStreamCnvTestConfig
import RpcDigitToRpcRDOCfg
108 if flags.Muon.enableNRPC:
109 from MuonConfig.MuonByteStreamCnvTestConfig
import NrpcDigitToNrpcRDOCfg