ATLAS Offline Software
Functions
python.MM_OverlayConfig Namespace Reference

Functions

def MM_OverlayAlgCfg (flags, name="MM_Overlay", **kwargs)
 
def MM_TruthOverlayCfg (flags, name="MM_TruthOverlay", **kwargs)
 
def MM_OverlayCfg (flags)
 

Detailed Description

Define methods to construct configured MM overlay algorithms

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

Function Documentation

◆ MM_OverlayAlgCfg()

def python.MM_OverlayConfig.MM_OverlayAlgCfg (   flags,
  name = "MM_Overlay",
**  kwargs 
)
Return a ComponentAccumulator for MM_Overlay algorithm

Definition at line 11 of file MM_OverlayConfig.py.

11 def MM_OverlayAlgCfg(flags, name="MM_Overlay", **kwargs):
12  """Return a ComponentAccumulator for MM_Overlay algorithm"""
13  acc = ComponentAccumulator()
14 
15  kwargs.setdefault("BkgInputKey", f"{flags.Overlay.BkgPrefix}MM_DIGITS")
16  kwargs.setdefault("SignalInputKey", f"{flags.Overlay.SigPrefix}MM_DIGITS")
17  kwargs.setdefault("OutputKey", "MM_DIGITS")
18 
19  kwargs.setdefault("IntegrationWindow", 30) # in ns
20 
21  # Do MM overlay
22  acc.addEventAlgo(CompFactory.MM_Overlay(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  "Muon::MM_RawDataContainer#MMRDO"
29  ]))
30 
31  if flags.Output.doWriteRDO_SGNL:
32  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
33  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
34  f"Muon::MM_RawDataContainer#{flags.Overlay.SigPrefix}MMRDO"
35  ]))
36 
37  return acc
38 
39 

◆ MM_OverlayCfg()

def python.MM_OverlayConfig.MM_OverlayCfg (   flags)
Configure and return a ComponentAccumulator for MM overlay

Definition at line 76 of file MM_OverlayConfig.py.

76 def MM_OverlayCfg(flags):
77  """Configure and return a ComponentAccumulator for MM overlay"""
78  acc = ComponentAccumulator()
79 
80  # Add MM RDO to digit config
81  from MuonConfig.MuonByteStreamCnvTestConfig import MM_RdoToDigitCfg
82  acc.merge(MM_RdoToDigitCfg(flags))
83 
84  # Add MM overlay digitization algorithm
85  from MuonConfig.MM_DigitizationConfig import MM_OverlayDigitizationBasicCfg
86  acc.merge(MM_OverlayDigitizationBasicCfg(flags))
87 
88  # Add MM overlay algorithm
89  acc.merge(MM_OverlayAlgCfg(flags))
90 
91  # Add MM truth overlay
92  if flags.Digitization.EnableTruth:
93  if flags.Muon.usePhaseIIGeoSetup:
94  from MuonTruthOverlayR4.TruthOverlayConfig import TruthOverlayCfg
95  acc.merge(TruthOverlayCfg(flags, name="MmTruthOverlay", WriteKey="MM_SDO", deadTime = 300.))
96  else:
97  acc.merge(MM_TruthOverlayCfg(flags))
98 
99  # Add MM digit to RDO config
100  from MuonConfig.MuonByteStreamCnvTestConfig import MM_DigitToRDOCfg
101  acc.merge(MM_DigitToRDOCfg(flags))
102 
103  return acc

◆ MM_TruthOverlayCfg()

def python.MM_OverlayConfig.MM_TruthOverlayCfg (   flags,
  name = "MM_TruthOverlay",
**  kwargs 
)
Return a ComponentAccumulator for the MM SDO overlay algorithm

Definition at line 40 of file MM_OverlayConfig.py.

40 def MM_TruthOverlayCfg(flags, name="MM_TruthOverlay", **kwargs):
41  """Return a ComponentAccumulator for the MM 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}MM_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}MM_SDO")
55  kwargs.setdefault("OutputKey", "MM_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#MM_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}MM_SDO"
71  ]))
72 
73  return acc
74 
75 
python.MM_OverlayConfig.MM_TruthOverlayCfg
def MM_TruthOverlayCfg(flags, name="MM_TruthOverlay", **kwargs)
Definition: MM_OverlayConfig.py:40
python.MM_DigitizationConfig.MM_OverlayDigitizationBasicCfg
def MM_OverlayDigitizationBasicCfg(flags, **kwargs)
Definition: MM_DigitizationConfig.py:150
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.MM_DigitToRDOCfg
def MM_DigitToRDOCfg(flags, name="MM_DigitToRDO", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:287
python.MM_OverlayConfig.MM_OverlayAlgCfg
def MM_OverlayAlgCfg(flags, name="MM_Overlay", **kwargs)
Definition: MM_OverlayConfig.py:11
TruthOverlayConfig.TruthOverlayCfg
def TruthOverlayCfg(flags, name="TruthOverlay", **kwargs)
Definition: TruthOverlayConfig.py:3
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.MM_OverlayConfig.MM_OverlayCfg
def MM_OverlayCfg(flags)
Definition: MM_OverlayConfig.py:76
python.MuonByteStreamCnvTestConfig.MM_RdoToDigitCfg
def MM_RdoToDigitCfg(flags, name="MM_RdoToDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:140