ATLAS Offline Software
RecordExtraInfoConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.Enums import ProductionStep
5 
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD, addToESD
8 
9 spacePointKeys = [ "xAOD::BaseContainer#SpacePoints", "xAOD::AuxContainerBase#SpacePointsAux.x.y.z.tot.csize.module1.module2" ]
10 mbtsBitsKeys = [ "xAOD::TrigT2MbtsBitsContainer#MBTSBits", "xAOD::TrigT2MbtsBitsAuxContainer#MBTSBitsAux." ]
11 
12 def _inRecoOrLater(flags):
13  return flags.Common.ProductionStep is ProductionStep.Reconstruction \
14  or flags.Common.ProductionStep is ProductionStep.Derivation
15 
16 def addSpacePoints(flags):
17  """
18  Adds Space Points data to the AOD/ESD output, if necessary schedule producer algorithm
19  """
20  acc = ComponentAccumulator()
21 
22  if not _inRecoOrLater(flags):
23  return acc
24 
25  acc.merge(addToAOD(flags, spacePointKeys))
26  acc.merge(addToESD(flags, spacePointKeys))
27 
28  if spacePointKeys[0].split("#")[1] not in flags.Input.Collections:
29  copier = CompFactory.SpacePointCopier(maxTracks=20)
30  acc.addEventAlgo(copier)
31  return acc
32 
33 def addMBTS(flags):
34  """
35  Adds MBTS data to the AOD/ESD output, if necessary schedule producer algorithm
36  """
37  acc = ComponentAccumulator()
38  if not _inRecoOrLater(flags):
39  return acc
40 
41  acc.merge(addToAOD(flags, mbtsBitsKeys))
42  acc.merge(addToESD(flags, mbtsBitsKeys))
43 
44  if mbtsBitsKeys[0].split("#")[1] not in flags.Input.Collections:
45  copier = CompFactory.MBTSInfoCopier()
46  acc.addEventAlgo(copier)
47 
48  return acc
49 
51  """
52  Add detail of Topo clusters for UPC analyses
53  """
54  acc = ComponentAccumulator()
55  if not _inRecoOrLater(flags):
56  return acc
57  clusterDetails= ["xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_POS.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.BadChannelList.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING"]
58 
59  acc.merge(addToAOD(flags, clusterDetails))
60  acc.merge(addToESD(flags, clusterDetails))
61  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
RecordExtraInfoConfig._inRecoOrLater
def _inRecoOrLater(flags)
Definition: RecordExtraInfoConfig.py:12
RecordExtraInfoConfig.addSpacePoints
def addSpacePoints(flags)
Definition: RecordExtraInfoConfig.py:16
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
RecordExtraInfoConfig.addDetailedCaloClusterInfo
def addDetailedCaloClusterInfo(flags)
Definition: RecordExtraInfoConfig.py:50
RecordExtraInfoConfig.addMBTS
def addMBTS(flags)
Definition: RecordExtraInfoConfig.py:33
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
Trk::split
@ split
Definition: LayerMaterialProperties.h:38