ATLAS Offline Software
Functions
python.MDT_OverlayConfig Namespace Reference

Functions

def MDT_OverlayAlgCfg (flags, name="MdtOverlay", **kwargs)
 
def MDT_TruthOverlayCfg (flags, name="MdtTruthOverlay", **kwargs)
 
def MDT_OverlayCfg (flags)
 

Detailed Description

Define methods to construct configured MDT overlay algorithms

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

Function Documentation

◆ MDT_OverlayAlgCfg()

def python.MDT_OverlayConfig.MDT_OverlayAlgCfg (   flags,
  name = "MdtOverlay",
**  kwargs 
)
Return a ComponentAccumulator for MDTOverlay algorithm

Definition at line 11 of file MDT_OverlayConfig.py.

11 def MDT_OverlayAlgCfg(flags, name="MdtOverlay", **kwargs):
12  """Return a ComponentAccumulator for MDTOverlay algorithm"""
13  acc = ComponentAccumulator()
14 
15  kwargs.setdefault("BkgInputKey", f"{flags.Overlay.BkgPrefix}MDT_DIGITS")
16  kwargs.setdefault("SignalInputKey", f"{flags.Overlay.SigPrefix}MDT_DIGITS")
17  kwargs.setdefault("OutputKey", "MDT_DIGITS")
18 
19  kwargs.setdefault("IntegrationWindow", 20) # in ns
20 
21  # Do MDT overlay
22  acc.addEventAlgo(CompFactory.MdtOverlay(name, **kwargs))
23 
24  # Setup output
25  if flags.Output.doWriteRDO:
26  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
27  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
28  "MdtCsmContainer#MDTCSM"
29  ]))
30 
31  if flags.Output.doWriteRDO_SGNL:
32  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
33  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
34  f"MdtCsmContainer#{flags.Overlay.SigPrefix}MDTCSM"
35  ]))
36 
37  return acc
38 
39 

◆ MDT_OverlayCfg()

def python.MDT_OverlayConfig.MDT_OverlayCfg (   flags)
Configure and return a ComponentAccumulator for MDT overlay

Definition at line 75 of file MDT_OverlayConfig.py.

75 def MDT_OverlayCfg(flags):
76  """Configure and return a ComponentAccumulator for MDT overlay"""
77  acc = ComponentAccumulator()
78 
79  # Add MDT RDO to digit config
80  from MuonConfig.MuonByteStreamCnvTestConfig import MdtRdoToMdtDigitCfg
81  acc.merge(MdtRdoToMdtDigitCfg(flags))
82 
83  # Add MDT overlay digitization algorithm
84  from MuonConfig.MDT_DigitizationConfig import MDT_OverlayDigitizationBasicCfg
85  acc.merge(MDT_OverlayDigitizationBasicCfg(flags))
86 
87  # Add MDT overlay algorithm
88  acc.merge(MDT_OverlayAlgCfg(flags))
89 
90  # Add MDT truth overlay
91  if flags.Digitization.EnableTruth:
92  if flags.Muon.usePhaseIIGeoSetup:
93  from MuonTruthOverlayR4.TruthOverlayConfig import TruthOverlayCfg
94  acc.merge(TruthOverlayCfg(flags, name="MdtTruthOverlay", WriteKey="MDT_SDO", deadTime = 700.))
95  else:
96  acc.merge(MDT_TruthOverlayCfg(flags))
97 
98  # Add MDT digit to RDO config
99  from MuonConfig.MuonByteStreamCnvTestConfig import MdtDigitToMdtRDOCfg
100  acc.merge(MdtDigitToMdtRDOCfg(flags))
101 
102  return acc

◆ MDT_TruthOverlayCfg()

def python.MDT_OverlayConfig.MDT_TruthOverlayCfg (   flags,
  name = "MdtTruthOverlay",
**  kwargs 
)
Return a ComponentAccumulator for the MDT SDO overlay algorithm

Definition at line 40 of file MDT_OverlayConfig.py.

40 def MDT_TruthOverlayCfg(flags, name="MdtTruthOverlay", **kwargs):
41  """Return a ComponentAccumulator for the MDT SDO overlay algorithm"""
42  acc = ComponentAccumulator()
43 
44  # We do not need background MDT SDOs
45  if not flags.Input.isMC:
46  kwargs.setdefault("BkgInputKey", "")
47  else:
48  kwargs.setdefault("BkgInputKey", f"{flags.Overlay.BkgPrefix}MDT_SDO")
49 
50  if kwargs["BkgInputKey"]:
51  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
52  acc.merge(SGInputLoaderCfg(flags, [f'MuonSimDataCollection#{kwargs["BkgInputKey"]}']))
53 
54  kwargs.setdefault("SignalInputKey", f"{flags.Overlay.SigPrefix}MDT_SDO")
55  kwargs.setdefault("OutputKey", "MDT_SDO")
56 
57  # Do MDT truth overlay
58  acc.addEventAlgo(CompFactory.MuonSimDataOverlay(name, **kwargs))
59 
60  # Setup output
61  if flags.Output.doWriteRDO:
62  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
63  acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
64  "MuonSimDataCollection#MDT_SDO"
65  ]))
66 
67  if flags.Output.doWriteRDO_SGNL:
68  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
69  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
70  f"MuonSimDataCollection#{flags.Overlay.SigPrefix}MDT_SDO"
71  ]))
72 
73  return acc
74 
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
python.MuonByteStreamCnvTestConfig.MdtRdoToMdtDigitCfg
def MdtRdoToMdtDigitCfg(flags, name="MdtRdoToMdtDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:20
python.MDT_OverlayConfig.MDT_OverlayAlgCfg
def MDT_OverlayAlgCfg(flags, name="MdtOverlay", **kwargs)
Definition: MDT_OverlayConfig.py:11
TruthOverlayConfig.TruthOverlayCfg
def TruthOverlayCfg(flags, name="TruthOverlay", **kwargs)
Definition: TruthOverlayConfig.py:3
python.MDT_OverlayConfig.MDT_OverlayCfg
def MDT_OverlayCfg(flags)
Definition: MDT_OverlayConfig.py:75
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.MuonByteStreamCnvTestConfig.MdtDigitToMdtRDOCfg
def MdtDigitToMdtRDOCfg(flags, name="MdtDigitToMdtRDO", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:164
python.MDT_OverlayConfig.MDT_TruthOverlayCfg
def MDT_TruthOverlayCfg(flags, name="MdtTruthOverlay", **kwargs)
Definition: MDT_OverlayConfig.py:40
python.MDT_DigitizationConfig.MDT_OverlayDigitizationBasicCfg
def MDT_OverlayDigitizationBasicCfg(flags, **kwargs)
Definition: MDT_DigitizationConfig.py:152