ATLAS Offline Software
IsoOutputConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 __doc__ = "Prepare isolation output list (density)"
4 
5 from AthenaCommon.Logging import logging
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 
8 def IsoOutputCfg(flags, name="IsoOutputList"):
9 
10  mlog = logging.getLogger(name)
11  mlog.info('Starting isolation Output configuration')
12 
13  acc = ComponentAccumulator()
14 
15  toESD = []
16  toAOD = []
17 
18  DensityAODSupp = "-DensityArea.-DensitySigma"
19 
20  if flags.Detector.EnableCalo:
21  toESD += [
22  "xAOD::EventShape#TopoClusterIsoCentralEventShape",
23  "xAOD::EventShapeAuxInfo#TopoClusterIsoCentralEventShapeAux."]
24  toESD += [
25  "xAOD::EventShape#TopoClusterIsoForwardEventShape",
26  "xAOD::EventShapeAuxInfo#TopoClusterIsoForwardEventShapeAux."]
27  if flags.Reco.EnablePFlow:
28  toESD += [
29  "xAOD::EventShape#NeutralParticleFlowIsoCentralEventShape",
30  "xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoCentralEventShapeAux."]
31  toESD += [
32  "xAOD::EventShape#NeutralParticleFlowIsoForwardEventShape",
33  "xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoForwardEventShapeAux."]
34 
35  toAOD = [ i.replace('Aux.',f'Aux.{DensityAODSupp}') for i in toESD ]
36 
37  if flags.Output.doWriteESD:
38  from OutputStreamAthenaPool.OutputStreamConfig import addToESD
39  acc.merge(addToESD(flags, toESD))
40  mlog.info('isoDensityESDList: %s ', toESD)
41 
42  if flags.Output.doWriteAOD:
43  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
44  acc.merge(addToAOD(flags, toAOD))
45  mlog.info('isoDensityAODList: %s ', toAOD)
46 
47  mlog.info("Isolation Output configured")
48  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
IsoOutputConfig.IsoOutputCfg
def IsoOutputCfg(flags, name="IsoOutputList")
Definition: IsoOutputConfig.py:8
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142