2 """Define methods to construct configured sTGC 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 STGC_Overlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}sTGC_DIGITS")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}sTGC_DIGITS")
17 kwargs.setdefault(
"OutputKey",
"sTGC_DIGITS")
20 acc.addEventAlgo(CompFactory.STGC_Overlay(name, **kwargs))
23 if flags.Output.doWriteRDO:
24 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
26 "Muon::STGC_RawDataContainer#sTGCRDO"
29 if flags.Output.doWriteRDO_SGNL:
30 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
32 f
"Muon::STGC_RawDataContainer#{flags.Overlay.SigPrefix}sTGCRDO"
39 """Return a ComponentAccumulator for the sTGC SDO overlay algorithm"""
43 if not flags.Input.isMC:
44 kwargs.setdefault(
"BkgInputKey",
"")
46 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}sTGC_SDO")
48 if kwargs[
"BkgInputKey"]:
49 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
50 acc.merge(
SGInputLoaderCfg(flags, [f
'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
52 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}sTGC_SDO")
53 kwargs.setdefault(
"OutputKey",
"sTGC_SDO")
56 acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
59 if flags.Output.doWriteRDO:
60 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
62 "MuonSimDataCollection#sTGC_SDO"
65 if flags.Output.doWriteRDO_SGNL:
66 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
68 f
"MuonSimDataCollection#{flags.Overlay.SigPrefix}sTGC_SDO"
75 """Configure and return a ComponentAccumulator for sTGC overlay"""
79 from MuonConfig.MuonByteStreamCnvTestConfig
import STGC_RdoToDigitCfg
83 from MuonConfig.sTGC_DigitizationConfig
import sTGC_OverlayDigitizationBasicCfg
90 if flags.Digitization.EnableTruth:
91 if flags.Muon.usePhaseIIGeoSetup:
92 from MuonTruthOverlayR4.TruthOverlayConfig
import TruthOverlayCfg
93 acc.merge(
TruthOverlayCfg(flags, name=
"sTgcTruthOverlay", WriteKey=
"sTGC_SDO", deadTime = 100.))
98 from MuonConfig.MuonByteStreamCnvTestConfig
import STGC_DigitToRDOCfg