2 """Define methods to construct configured CSC 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 CSCOverlay algorithm"""
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}CSCRDO")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}CSCRDO")
17 kwargs.setdefault(
"OutputKey",
"CSCRDO")
19 kwargs.setdefault(
"isDataOverlay",
not flags.Input.isMC)
21 if flags.Overlay.ByteStream:
22 from MuonConfig.MuonBytestreamDecodeConfig
import CscBytestreamDecodeCfg
25 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
26 acc.merge(
SGInputLoaderCfg(flags, [f
'CscRawDataContainer#{kwargs["BkgInputKey"]}']))
28 from MuonConfig.MuonCalibrationConfig
import CscCalibToolCfg
29 kwargs.setdefault(
"CalibTool", acc.popToolsAndMerge(
CscCalibToolCfg(flags)))
31 from MuonConfig.MuonCSC_CnvToolsConfig
import MuonCscRDODecoderCfg
35 acc.addEventAlgo(CompFactory.CscOverlay(name, **kwargs))
38 if flags.Output.doWriteRDO:
39 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
41 "CscRawDataContainer#CSCRDO"
44 if flags.Output.doWriteRDO_SGNL:
45 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
47 f
"CscRawDataContainer#{flags.Overlay.SigPrefix}CSCRDO"
54 """Return a ComponentAccumulator for the CSC SDO overlay algorithm"""
58 if not flags.Input.isMC:
59 kwargs.setdefault(
"BkgInputKey",
"")
61 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}CSC_SDO")
63 if kwargs[
"BkgInputKey"]:
64 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
65 acc.merge(
SGInputLoaderCfg(flags, [f
'CscSimDataCollection#{kwargs["BkgInputKey"]}']))
67 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}CSC_SDO")
68 kwargs.setdefault(
"OutputKey",
"CSC_SDO")
71 acc.addEventAlgo(CompFactory.CscSimDataOverlay(name, **kwargs))
74 if flags.Output.doWriteRDO:
75 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
77 "CscSimDataCollection#CSC_SDO"
80 if flags.Output.doWriteRDO_SGNL:
81 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
83 f
"CscSimDataCollection#{flags.Overlay.SigPrefix}CSC_SDO"
90 """Configure and return a ComponentAccumulator for CSC overlay"""
94 from MuonConfig.CSC_DigitizationConfig
import CSC_OverlayDigitizationBasicCfg
98 from MuonConfig.MuonByteStreamCnvTestConfig
import CscDigitToCscRDOCfg
105 if flags.Digitization.EnableTruth: