2 """Define methods to construct configured sTGC 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 sTGC data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import sTgcBytestreamDecodeCfg
23 """Return a ComponentAccumulator for STGC_Overlay algorithm"""
26 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}sTGC_DIGITS")
27 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}sTGC_DIGITS")
28 kwargs.setdefault(
"OutputKey",
"sTGC_DIGITS")
31 acc.addEventAlgo(CompFactory.STGC_Overlay(name, **kwargs))
34 if flags.Output.doWriteRDO:
35 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
37 "Muon::STGC_RawDataContainer#sTGCRDO"
40 if flags.Output.doWriteRDO_SGNL:
41 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
43 f
"Muon::STGC_RawDataContainer#{flags.Overlay.SigPrefix}sTGCRDO"
50 """Return a ComponentAccumulator for the sTGC SDO overlay algorithm"""
54 if flags.Overlay.DataOverlay:
55 kwargs.setdefault(
"BkgInputKey",
"")
57 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}sTGC_SDO")
59 if kwargs[
"BkgInputKey"]:
60 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
61 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
63 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}sTGC_SDO")
64 kwargs.setdefault(
"OutputKey",
"sTGC_SDO")
67 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
70 if flags.Output.doWriteRDO:
71 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
73 "MuonSimDataCollection#sTGC_SDO"
76 if flags.Output.doWriteRDO_SGNL:
77 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
79 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}sTGC_SDO"
86 """Configure and return a ComponentAccumulator for sTGC overlay"""
90 if flags.Overlay.DataOverlay:
94 from MuonConfig.MuonByteStreamCnvTestConfig
import STGC_RdoToDigitCfg
97 from MuonConfig.sTGC_DigitizationConfig
import sTGC_OverlayDigitizationBasicCfg
102 if flags.Digitization.EnableTruth:
105 from MuonConfig.MuonByteStreamCnvTestConfig
import STGC_DigitToRDOCfg