ATLAS Offline Software
Functions
TRTOverlayConfig Namespace Reference

Functions

def TRTOverlayAlgCfg (flags, name="TRTOverlay", **kwargs)
 
def TRTTruthOverlayCfg (flags, name="TRTSDOOverlay", **kwargs)
 
def TRTOverlayCfg (flags)
 

Detailed Description

Define methods to construct configured TRT overlay algorithms

Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration

Function Documentation

◆ TRTOverlayAlgCfg()

def TRTOverlayConfig.TRTOverlayAlgCfg (   flags,
  name = "TRTOverlay",
**  kwargs 
)
Return a ComponentAccumulator for TRTOverlay algorithm

Definition at line 10 of file TRTOverlayConfig.py.

10 def TRTOverlayAlgCfg(flags, name="TRTOverlay", **kwargs):
11  """Return a ComponentAccumulator for TRTOverlay algorithm"""
12  acc = ComponentAccumulator()
13 
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")
19 
20  # Input setup
21  if flags.Overlay.ByteStream:
22  from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConfig import TRTRawDataProviderCfg
23  acc.merge(TRTRawDataProviderCfg(flags))
24  else:
25  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
26  acc.merge(SGInputLoaderCfg(flags, [f'TRT_RDO_Container#{kwargs["BkgInputKey"]}']))
27 
28  from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
29  acc.merge(TRT_ReadoutGeometryCfg(flags))
30 
31  # HT hit correction fraction
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)
40 
41  from InDetConfig.TRT_ElectronPidToolsConfig import TRT_OverlayLocalOccupancyCfg
42  kwargs.setdefault("TRT_LocalOccupancyTool", acc.popToolsAndMerge(TRT_OverlayLocalOccupancyCfg(flags)))
43 
44  from RngComps.RngCompsConfig import AthRNGSvcCfg
45  kwargs.setdefault("RndmSvc", acc.getPrimaryAndMerge(AthRNGSvcCfg(flags)).name)
46 
47  # Do TRT overlay
48  acc.addEventAlgo(CompFactory.TRTOverlay(name, **kwargs))
49 
50  # Setup output
51  if flags.Output.doWriteRDO:
52  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
53  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
54  "TRT_RDO_Container#TRT_RDOs"
55  ]))
56 
57  if not flags.Input.isMC:
58  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
59  "TRT_BSErrContainer#TRT_ByteStreamErrs"
60  ]))
61 
62  if flags.Output.doWriteRDO_SGNL:
63  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
64  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
65  f"TRT_RDO_Container#{flags.Overlay.SigPrefix}TRT_RDOs"
66  ]))
67 
68  # for track overlay, write out the signal RDOs because reco tracking will only run on them
69  if flags.Overlay.doTrackOverlay:
70  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
71  f"TRT_RDO_Container#{flags.Overlay.SigPrefix}TRT_RDOs"
72  ]))
73 
74  return acc
75 
76 

◆ TRTOverlayCfg()

def TRTOverlayConfig.TRTOverlayCfg (   flags)
Configure and return a ComponentAccumulator for TRT overlay

Definition at line 113 of file TRTOverlayConfig.py.

113 def TRTOverlayCfg(flags):
114  """Configure and return a ComponentAccumulator for TRT overlay"""
115  acc = ComponentAccumulator()
116 
117  # Add TRT overlay digitization algorithm
118  from TRT_Digitization.TRT_DigitizationConfig import TRT_OverlayDigitizationBasicCfg
119  acc.merge(TRT_OverlayDigitizationBasicCfg(flags))
120 
121  # Add TRT overlay algorithm
122  acc.merge(TRTOverlayAlgCfg(flags))
123 
124  # Add TRT truth overlay
125  if flags.Digitization.EnableTruth:
126  acc.merge(TRTTruthOverlayCfg(flags))
127 
128  return acc

◆ TRTTruthOverlayCfg()

def TRTOverlayConfig.TRTTruthOverlayCfg (   flags,
  name = "TRTSDOOverlay",
**  kwargs 
)
Return a ComponentAccumulator for the TRT SDO overlay algorithm

Definition at line 77 of file TRTOverlayConfig.py.

77 def TRTTruthOverlayCfg(flags, name="TRTSDOOverlay", **kwargs):
78  """Return a ComponentAccumulator for the TRT SDO overlay algorithm"""
79  acc = ComponentAccumulator()
80 
81  # We do not need background TRT SDOs for data overlay
82  if not flags.Input.isMC:
83  kwargs.setdefault("BkgInputKey", "")
84  else:
85  kwargs.setdefault("BkgInputKey", f"{flags.Overlay.BkgPrefix}TRT_SDO_Map")
86 
87  if kwargs["BkgInputKey"]:
88  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
89  acc.merge(SGInputLoaderCfg(flags, [f'InDetSimDataCollection#{kwargs["BkgInputKey"]}']))
90 
91  kwargs.setdefault("SignalInputKey", f"{flags.Overlay.SigPrefix}TRT_SDO_Map")
92  kwargs.setdefault("OutputKey", "TRT_SDO_Map")
93 
94  # Do TRT truth overlay
95  acc.addEventAlgo(CompFactory.InDetSDOOverlay(name, **kwargs))
96 
97  # Setup output
98  if flags.Output.doWriteRDO:
99  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
100  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
101  "InDetSimDataCollection#TRT_SDO_Map"
102  ]))
103 
104  if flags.Output.doWriteRDO_SGNL:
105  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
106  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
107  f"InDetSimDataCollection#{flags.Overlay.SigPrefix}TRT_SDO_Map"
108  ]))
109 
110  return acc
111 
112 
python.TRT_RawDataByteStreamCnvConfig.TRTRawDataProviderCfg
def TRTRawDataProviderCfg(flags, name="TRTRawDataProvider", **kwargs)
Definition: TRT_RawDataByteStreamCnvConfig.py:39
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
TRT_GeoModelConfig.TRT_ReadoutGeometryCfg
def TRT_ReadoutGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:59
TRTOverlayConfig.TRTTruthOverlayCfg
def TRTTruthOverlayCfg(flags, name="TRTSDOOverlay", **kwargs)
Definition: TRTOverlayConfig.py:77
TRT_DigitizationConfig.TRT_OverlayDigitizationBasicCfg
def TRT_OverlayDigitizationBasicCfg(flags, **kwargs)
Definition: TRT_DigitizationConfig.py:211
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
TRTOverlayConfig.TRTOverlayAlgCfg
def TRTOverlayAlgCfg(flags, name="TRTOverlay", **kwargs)
Definition: TRTOverlayConfig.py:10
python.TRT_ElectronPidToolsConfig.TRT_OverlayLocalOccupancyCfg
def TRT_OverlayLocalOccupancyCfg(flags, name="TRT_OverlayLocalOccupancy", **kwargs)
Definition: TRT_ElectronPidToolsConfig.py:36
TRTOverlayConfig.TRTOverlayCfg
def TRTOverlayCfg(flags)
Definition: TRTOverlayConfig.py:113
RngCompsConfig.AthRNGSvcCfg
def AthRNGSvcCfg(flags, name="AthRNGSvc")
Definition: RngCompsConfig.py:51