1 """Define methods to construct configured TRT overlay algorithms
3 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
11 """Return a ComponentAccumulator for TRTOverlay algorithm"""
14 kwargs.setdefault(
"SortBkgInput", flags.Overlay.DataOverlay)
15 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TRT_RDOs")
16 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TRT_RDOs")
17 kwargs.setdefault(
"SignalInputSDOKey", f
"{flags.Overlay.SigPrefix}TRT_SDO_Map")
18 kwargs.setdefault(
"OutputKey",
"TRT_RDOs")
21 if flags.Overlay.ByteStream:
22 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConfig
import TRTRawDataProviderCfg
25 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
26 acc.merge(
SGInputLoaderCfg(flags, [f
'TRT_RDO_Container#{kwargs["BkgInputKey"]}']))
28 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
32 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionBarrel", 0.110)
33 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionEndcap", 0.090)
34 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionBarrelNoE", 0.060)
35 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionEndcapNoE", 0.050)
36 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionBarrelAr", 0.100)
37 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionEndcapAr", 0.101)
38 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionBarrelArNoE", 0.088)
39 kwargs.setdefault(
"TRT_HT_OccupancyCorrectionEndcapArNoE", 0.102)
41 from InDetConfig.TRT_ElectronPidToolsConfig
import TRT_OverlayLocalOccupancyCfg
44 from RngComps.RngCompsConfig
import AthRNGSvcCfg
45 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
48 acc.addEventAlgo(CompFactory.TRTOverlay(name, **kwargs))
51 if flags.Output.doWriteRDO:
52 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
54 "TRT_RDO_Container#TRT_RDOs"
57 if not flags.Input.isMC:
59 "TRT_BSErrContainer#TRT_ByteStreamErrs"
62 if flags.Output.doWriteRDO_SGNL:
63 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
65 f
"TRT_RDO_Container#{flags.Overlay.SigPrefix}TRT_RDOs"
69 if flags.Overlay.doTrackOverlay:
71 f
"TRT_RDO_Container#{flags.Overlay.SigPrefix}TRT_RDOs"
78 """Return a ComponentAccumulator for the TRT SDO overlay algorithm"""
82 if not flags.Input.isMC:
83 kwargs.setdefault(
"BkgInputKey",
"")
85 kwargs.setdefault(
"BkgInputKey", f
"{flags.Overlay.BkgPrefix}TRT_SDO_Map")
87 if kwargs[
"BkgInputKey"]:
88 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
89 acc.merge(
SGInputLoaderCfg(flags, [f
'InDetSimDataCollection#{kwargs["BkgInputKey"]}']))
91 kwargs.setdefault(
"SignalInputKey", f
"{flags.Overlay.SigPrefix}TRT_SDO_Map")
92 kwargs.setdefault(
"OutputKey",
"TRT_SDO_Map")
95 acc.addEventAlgo(CompFactory.InDetSDOOverlay(name, **kwargs))
98 if flags.Output.doWriteRDO:
99 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
101 "InDetSimDataCollection#TRT_SDO_Map"
104 if flags.Output.doWriteRDO_SGNL:
105 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
107 f
"InDetSimDataCollection#{flags.Overlay.SigPrefix}TRT_SDO_Map"
114 """Configure and return a ComponentAccumulator for TRT overlay"""
118 from TRT_Digitization.TRT_DigitizationConfig
import TRT_OverlayDigitizationBasicCfg
125 if flags.Digitization.EnableTruth: