2 """Define methods to construct configured RPC 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 RPC data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import RpcBytestreamDecodeCfg
23 """Return a ComponentAccumulator for RPCOverlay algorithm"""
26 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}RPC_DIGITS")
27 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}RPC_DIGITS")
28 kwargs.setdefault(
"OutputKey",
"RPC_DIGITS")
31 acc.addEventAlgo(CompFactory.RpcOverlay(name, **kwargs))
34 if flags.Output.doWriteRDO:
35 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
37 "RpcPadContainer#RPCPAD"
39 if flags.Muon.enableNRPC:
41 "xAOD::NRPCRDOContainer#NRPCRDO",
"xAOD::NRPCRDOAuxContainer#NRPCRDOAux."
44 if flags.Output.doWriteRDO_SGNL:
45 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
47 f
"RpcPadContainer#{flags.Overlay.SigPrefix}RPCPAD"
49 if flags.Muon.enableNRPC:
51 f
"xAOD::NRPCRDOContainer#{flags.Overlay.SigPrefix}NRPCRDO", f
"xAOD::NRPCRDOAuxContainer#{flags.Overlay.SigPrefix}NRPCRDOAux."
58 """Return a ComponentAccumulator for the RPC SDO overlay algorithm"""
62 if flags.Overlay.DataOverlay:
63 kwargs.setdefault(
"BkgInputKey",
"")
65 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}RPC_SDO")
67 if kwargs[
"BkgInputKey"]:
68 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
69 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
71 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}RPC_SDO")
72 kwargs.setdefault(
"OutputKey",
"RPC_SDO")
75 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
78 if flags.Output.doWriteRDO:
79 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
81 "MuonSimDataCollection#RPC_SDO"
84 if flags.Output.doWriteRDO_SGNL:
85 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
87 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}RPC_SDO"
94 """Configure and return a ComponentAccumulator for RPC overlay"""
98 if flags.Overlay.DataOverlay:
102 from MuonConfig.MuonByteStreamCnvTestConfig
import RpcRdoToRpcDigitCfg
105 from MuonConfig.RPC_DigitizationConfig
import RPC_OverlayDigitizationBasicCfg
110 if flags.Digitization.EnableTruth:
111 if flags.Muon.usePhaseIIGeoSetup:
112 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
113 acc.merge(
TruthOverlayCfg(flags, name=
"RpcTruthOverlay", WriteKey=
"RPC_SDO", deadTime = 100.))
117 from MuonConfig.MuonByteStreamCnvTestConfig
import RpcDigitToRpcRDOCfg
119 if flags.Muon.enableNRPC:
120 from MuonConfig.MuonByteStreamCnvTestConfig
import NrpcDigitToNrpcRDOCfg