ATLAS Offline Software
Functions
python.xAODEventInfoCnvConfig Namespace Reference

Functions

def EventInfoCnvAlgCfg (flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
 
def EventInfoOverlayAlgCfg (flags, name="EventInfoOverlay", **kwargs)
 
def EventInfoOverlayCfg (flags, **kwargs)
 
def EventInfoUpdateFromContextAlgCfg (flags, name="EventInfoUpdateFromContextAlg", **kwargs)
 
def EventInfoBeamSpotDecoratorAlgCfg (flags, name="EventInfoBeamSpotDecoratorAlg", eventInfoKey="EventInfo", **kwargs)
 

Detailed Description

Define methods to construct configured EventInfo conversion algorithms

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

Function Documentation

◆ EventInfoBeamSpotDecoratorAlgCfg()

def python.xAODEventInfoCnvConfig.EventInfoBeamSpotDecoratorAlgCfg (   flags,
  name = "EventInfoBeamSpotDecoratorAlg",
  eventInfoKey = "EventInfo",
**  kwargs 
)

Definition at line 139 of file xAODEventInfoCnvConfig.py.

139 def EventInfoBeamSpotDecoratorAlgCfg(flags, name="EventInfoBeamSpotDecoratorAlg", eventInfoKey="EventInfo", **kwargs):
140  result = ComponentAccumulator()
141 
142  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
143  result.merge(BeamSpotCondAlgCfg(flags))
144 
145  kwargs.setdefault("beamPosXKey", f"{eventInfoKey}.beamPosX")
146  kwargs.setdefault("beamPosYKey", f"{eventInfoKey}.beamPosY")
147  kwargs.setdefault("beamPosZKey", f"{eventInfoKey}.beamPosZ")
148  kwargs.setdefault("beamPosSigmaXKey", f"{eventInfoKey}.beamPosSigmaX")
149  kwargs.setdefault("beamPosSigmaYKey", f"{eventInfoKey}.beamPosSigmaY")
150  kwargs.setdefault("beamPosSigmaZKey", f"{eventInfoKey}.beamPosSigmaZ")
151  kwargs.setdefault("beamPosSigmaXYKey", f"{eventInfoKey}.beamPosSigmaXY")
152  kwargs.setdefault("beamTiltXZKey", f"{eventInfoKey}.beamTiltXZ")
153  kwargs.setdefault("beamTiltYZKey", f"{eventInfoKey}.beamTiltYZ")
154  kwargs.setdefault("beamStatusKey", f"{eventInfoKey}.beamStatus")
155 
156  result.addEventAlgo(CompFactory.xAODMaker.EventInfoBeamSpotDecoratorAlg(name, **kwargs))
157 
158  return result

◆ EventInfoCnvAlgCfg()

def python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg (   flags,
  name = "EventInfoCnvAlg",
  inputKey = "McEventInfo",
  outputKey = "EventInfo",
  disableBeamSpot = False,
**  kwargs 
)
Return a ComponentAccumulator for EventInfoCnvAlg algorithm

Definition at line 11 of file xAODEventInfoCnvConfig.py.

11 def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg",
12  inputKey="McEventInfo",
13  outputKey="EventInfo",
14  disableBeamSpot=False,
15  **kwargs):
16  """Return a ComponentAccumulator for EventInfoCnvAlg algorithm"""
17 
18  acc = ComponentAccumulator()
19 
20  kwargs.setdefault("AODKey", inputKey)
21  kwargs.setdefault("xAODKey", outputKey)
22 
23  if f"PileUpEventInfo#{inputKey}" in flags.Input.TypedCollections:
24  kwargs.setdefault("PileupKey", f"Pileup{outputKey}")
25  else:
26  kwargs.setdefault("PileupKey", "")
27 
28  # TODO: luminosity
29 
30  if not disableBeamSpot:
31  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
32  acc.merge(BeamSpotCondAlgCfg(flags))
33 
34  acc.addEventAlgo(CompFactory.xAODMaker.EventInfoCnvAlg(name, **kwargs))
35 
36  return acc
37 
38 

◆ EventInfoOverlayAlgCfg()

def python.xAODEventInfoCnvConfig.EventInfoOverlayAlgCfg (   flags,
  name = "EventInfoOverlay",
**  kwargs 
)
Return a ComponentAccumulator for EventInfoOverlay algorithm

Definition at line 39 of file xAODEventInfoCnvConfig.py.

39 def EventInfoOverlayAlgCfg(flags, name="EventInfoOverlay", **kwargs):
40  """Return a ComponentAccumulator for EventInfoOverlay algorithm"""
41  acc = ComponentAccumulator()
42 
43  # Add beam spot conditions
44  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
45  acc.merge(BeamSpotCondAlgCfg(flags))
46 
47  kwargs.setdefault("BkgInputKey", f"{flags.Overlay.BkgPrefix}EventInfo")
48  kwargs.setdefault("SignalInputKey", f"{flags.Overlay.SigPrefix}EventInfo")
49  kwargs.setdefault("OutputKey", "EventInfo")
50 
51  kwargs.setdefault("DataOverlay", flags.Overlay.DataOverlay)
52  kwargs.setdefault("ValidateBeamSpot", not flags.Overlay.DataOverlay and flags.GeoModel.Run is LHCPeriod.Run3)
53 
54  if flags.Input.MCChannelNumber > 0:
55  kwargs.setdefault("MCChannelNumber", flags.Input.MCChannelNumber)
56 
57  # Do the xAOD::EventInfo overlay
58  acc.addEventAlgo(CompFactory.xAODMaker.EventInfoOverlay(name, **kwargs))
59 
60  # Add output
61  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
62  if flags.Output.doWriteRDO:
63  acc.merge(OutputStreamCfg(flags, "RDO"))
64 
65  # Add signal output
66  if flags.Output.doWriteRDO_SGNL:
67  acc.merge(OutputStreamCfg(flags, "RDO_SGNL", ItemList=[
68  f"xAOD::EventInfo#{flags.Overlay.SigPrefix}EventInfo",
69  f"xAOD::EventAuxInfo#{flags.Overlay.SigPrefix}EventInfoAux."
70  ]))
71 
72  return acc
73 
74 

◆ EventInfoOverlayCfg()

def python.xAODEventInfoCnvConfig.EventInfoOverlayCfg (   flags,
**  kwargs 
)
Return a ComponentAccumulator for the full EventInfoOverlay algorithm accumulator

Definition at line 75 of file xAODEventInfoCnvConfig.py.

75 def EventInfoOverlayCfg(flags, **kwargs):
76  """Return a ComponentAccumulator for the full EventInfoOverlay algorithm accumulator"""
77 
78  acc = ComponentAccumulator()
79  inputs = [f"xAOD::EventInfo#{flags.Overlay.BkgPrefix}EventInfo"]
80  # Check if running on legacy HITS
81  if "EventInfo" not in flags.Input.Collections and "EventInfo" not in flags.Input.SecondaryCollections:
82  acc.merge(EventInfoCnvAlgCfg(flags,
83  inputKey=f"{flags.Overlay.SigPrefix}McEventInfo",
84  outputKey=f"{flags.Overlay.SigPrefix}EventInfo",
85  **kwargs))
86  # Re-map signal address
87  from SGComps.AddressRemappingConfig import AddressRemappingCfg
88  acc.merge(AddressRemappingCfg([
89  f"EventInfo#McEventInfo->{flags.Overlay.SigPrefix}McEventInfo",
90  ]))
91 
92  inputs.append(f"EventInfo#{flags.Overlay.SigPrefix}McEventInfo")
93  else:
94  if not flags.Overlay.FastChain:
95  # Re-map signal address
96  from SGComps.AddressRemappingConfig import AddressRemappingCfg
97  acc.merge(AddressRemappingCfg([
98  f"xAOD::EventInfo#EventInfo->{flags.Overlay.SigPrefix}EventInfo",
99  f"xAOD::EventAuxInfo#EventInfoAux.->{flags.Overlay.SigPrefix}EventInfoAux.",
100  ]))
101 
102  inputs.append(f"xAOD::EventInfo#{flags.Overlay.SigPrefix}EventInfo")
103 
104  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
105  acc.merge(SGInputLoaderCfg(flags, inputs))
106 
107  acc.merge(EventInfoOverlayAlgCfg(flags, **kwargs))
108  return acc
109 
110 

◆ EventInfoUpdateFromContextAlgCfg()

def python.xAODEventInfoCnvConfig.EventInfoUpdateFromContextAlgCfg (   flags,
  name = "EventInfoUpdateFromContextAlg",
**  kwargs 
)
Return a ComponentAccumulator for EventInfoUpdateFromContext algorithm

Definition at line 111 of file xAODEventInfoCnvConfig.py.

111 def EventInfoUpdateFromContextAlgCfg(flags, name="EventInfoUpdateFromContextAlg", **kwargs):
112  """Return a ComponentAccumulator for EventInfoUpdateFromContext algorithm"""
113  acc = ComponentAccumulator()
114 
115  # Add beam spot conditions
116  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
117  acc.merge(BeamSpotCondAlgCfg(flags))
118 
119  kwargs.setdefault("SignalInputKey", "Input_EventInfo")
120  from AthenaConfiguration.Enums import ProductionStep
121  kwargs.setdefault("OutputKey", f"{flags.Overlay.SigPrefix}EventInfo" if flags.Common.ProductionStep == ProductionStep.FastChain and flags.Overlay.FastChain else "EventInfo")
122 
123  if flags.Input.MCChannelNumber > 0:
124  kwargs.setdefault("MCChannelNumber", flags.Input.MCChannelNumber)
125 
126  # Do the xAOD::EventInfo overlay
127  acc.addEventAlgo(CompFactory.xAODMaker.EventInfoUpdateFromContextAlg(name, **kwargs))
128 
129  # Re-map signal address
130  from SGComps.AddressRemappingConfig import AddressRemappingCfg
131  acc.merge(AddressRemappingCfg([
132  "xAOD::EventInfo#EventInfo->" + "Input_EventInfo",
133  "xAOD::EventAuxInfo#EventInfoAux.->" + "Input_EventInfoAux.",
134  ]))
135 
136  return acc
137 
138 
AddressRemappingConfig.AddressRemappingCfg
def AddressRemappingCfg(renameMaps=[], overwriteMaps=[])
Definition: AddressRemappingConfig.py:10
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.BeamSpotConditionsConfig.BeamSpotCondAlgCfg
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs)
Definition: BeamSpotConditionsConfig.py:7
python.xAODEventInfoCnvConfig.EventInfoUpdateFromContextAlgCfg
def EventInfoUpdateFromContextAlgCfg(flags, name="EventInfoUpdateFromContextAlg", **kwargs)
Definition: xAODEventInfoCnvConfig.py:111
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.xAODEventInfoCnvConfig.EventInfoBeamSpotDecoratorAlgCfg
def EventInfoBeamSpotDecoratorAlgCfg(flags, name="EventInfoBeamSpotDecoratorAlg", eventInfoKey="EventInfo", **kwargs)
Definition: xAODEventInfoCnvConfig.py:139
python.xAODEventInfoCnvConfig.EventInfoOverlayCfg
def EventInfoOverlayCfg(flags, **kwargs)
Definition: xAODEventInfoCnvConfig.py:75
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
python.xAODEventInfoCnvConfig.EventInfoOverlayAlgCfg
def EventInfoOverlayAlgCfg(flags, name="EventInfoOverlay", **kwargs)
Definition: xAODEventInfoCnvConfig.py:39