2 """Define methods to construct configured CSC 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 CSC data overlay specifics"""
16 from MuonConfig.MuonBytestreamDecodeConfig
import CscBytestreamDecodeCfg
23 """Return a ComponentAccumulator for CSCOverlay algorithm"""
24 from MuonConfig.MuonCalibrationConfig
import CscCalibToolCfg
26 kwargs.setdefault(
"CalibTool", acc.popPrivateTools())
28 from MuonConfig.MuonCSC_CnvToolsConfig
import MuonCscRDODecoderCfg
31 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}CSCRDO")
32 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}CSCRDO")
33 kwargs.setdefault(
"OutputKey",
"CSCRDO")
35 kwargs.setdefault(
"isDataOverlay", flags.Overlay.DataOverlay)
37 if not flags.Overlay.DataOverlay:
38 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
39 acc.merge(
SGInputLoaderCfg(flags, [f
'CscRawDataContainer#{kwargs["BkgInputKey"]}']))
42 acc.addEventAlgo(CompFactory.CscOverlay(name, **kwargs))
45 if flags.Output.doWriteRDO:
46 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
48 "CscRawDataContainer#CSCRDO"
51 if flags.Output.doWriteRDO_SGNL:
52 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
54 f
"CscRawDataContainer#{flags.Overlay.SigPrefix}CSCRDO"
61 """Return a ComponentAccumulator for the CSC SDO overlay algorithm"""
65 if flags.Overlay.DataOverlay:
66 kwargs.setdefault(
"BkgInputKey",
"")
68 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}CSC_SDO")
70 if kwargs[
"BkgInputKey"]:
71 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
72 acc.merge(
SGInputLoaderCfg(flags, [f
'CscSimDataCollection#{kwargs["BkgInputKey"]}']))
74 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}CSC_SDO")
75 kwargs.setdefault(
"OutputKey",
"CSC_SDO")
78 acc.addEventAlgo(CompFactory.CscSimDataOverlay(name, **kwargs))
81 if flags.Output.doWriteRDO:
82 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
84 "CscSimDataCollection#CSC_SDO"
87 if flags.Output.doWriteRDO_SGNL:
88 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
90 f
"CscSimDataCollection#{flags.Overlay.SigPrefix}CSC_SDO"
97 """Configure and return a ComponentAccumulator for CSC overlay"""
101 if flags.Overlay.DataOverlay:
105 from MuonConfig.CSC_DigitizationConfig
import CSC_OverlayDigitizationBasicCfg
108 from MuonConfig.MuonByteStreamCnvTestConfig
import CscDigitToCscRDOCfg
113 if flags.Digitization.EnableTruth: