ATLAS Offline Software
egammaLRTOutputConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 """ Prepare LRT EGamma output list
4 """
5 
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 
8 
9 def egammaLRTOutputCfg(flags, name="LRTEGOutputList"):
10 
11  # This need some work form LRT community
12  # ....
13  acc = ComponentAccumulator()
14 
15  outFlags = flags.Egamma.Keys.Output
16 
17  toESD = []
18  toAOD = []
19 
20  toESD += [
21  f"xAOD::ElectronContainer#LRT{outFlags.Electrons}",
22  f"xAOD::ElectronAuxContainer#LRT{outFlags.Electrons}"
23  f"Aux.{outFlags.ElectronsSuppESD}"]
24  toESD += [
25  f"xAOD::CaloClusterContainer#LRT{outFlags.CaloClusters}",
26  f"xAOD::CaloClusterAuxContainer#LRT{outFlags.CaloClusters}"
27  f"Aux.{outFlags.CaloClustersSuppESD}"]
28  toESD += [
29  f"xAOD::CaloClusterContainer#LRT{outFlags.EgammaLargeClusters}",
30  f"xAOD::CaloClusterAuxContainer#LRT{outFlags.EgammaLargeClusters}"
31  f"Aux.{outFlags.EgammaLargeClustersSuppESD}"]
32  toESD += [
33  f"CaloClusterCellLinkContainer#LRT{outFlags.CaloClusters}"
34  "_links"]
35  toESD += [
36  f"CaloClusterCellLinkContainer#LRT{outFlags.EgammaLargeClusters}"
37  "_links"]
38  toESD += [
39  f"xAOD::TrackParticleContainer#LRT{outFlags.GSFTrackParticles}",
40  f"xAOD::TrackParticleAuxContainer#LRT{outFlags.GSFTrackParticles}"
41  f"Aux.{outFlags.GSFTrackParticlesSuppESD}"]
42  if flags.Egamma.doTruthAssociation:
43  toESD += [
44  f"xAOD::TruthParticleContainer#LRT{outFlags.TruthParticles}",
45  f"xAOD::TruthParticleAuxContainer#LRT{outFlags.TruthParticles}"
46  f"Aux.{outFlags.TruthParticlesSuppESD}"]
47 
48 
49  toAOD += [
50  f"xAOD::ElectronContainer#LRT{outFlags.Electrons}",
51  f"xAOD::ElectronAuxContainer#LRT{outFlags.Electrons}"
52  f"Aux.{outFlags.ElectronsSuppAOD}"]
53  toAOD += [
54  f"xAOD::CaloClusterContainer#LRT{outFlags.CaloClusters}",
55  f"xAOD::CaloClusterAuxContainer#LRT{outFlags.CaloClusters}"
56  f"Aux.{outFlags.CaloClustersSuppAOD}"]
57  toAOD += [
58  f"CaloClusterCellLinkContainer#LRT{outFlags.CaloClusters}"
59  "_links"]
60  toAOD += [
61  f"xAOD::TrackParticleContainer#LRT{outFlags.GSFTrackParticles}",
62  f"xAOD::TrackParticleAuxContainer#LRT{outFlags.GSFTrackParticles}"
63  f"Aux.{outFlags.GSFTrackParticlesSuppAOD}"]
64  if flags.Egamma.doTruthAssociation:
65  toAOD += [
66  f"xAOD::TruthParticleContainer#LRT{outFlags.TruthParticles}",
67  f"xAOD::TruthParticleAuxContainer#LRT{outFlags.TruthParticles}"
68  f"Aux.{outFlags.TruthParticlesSuppAOD}"]
69 
70 
71 
72  if flags.Output.doWriteESD:
73  from OutputStreamAthenaPool.OutputStreamConfig import addToESD
74  acc.merge(addToESD(flags, toESD))
75 
76  if flags.Output.doWriteAOD:
77  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
78  acc.merge(addToAOD(flags, toAOD))
79 
80  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.egammaLRTOutputConfig.egammaLRTOutputCfg
def egammaLRTOutputCfg(flags, name="LRTEGOutputList")
Definition: egammaLRTOutputConfig.py:9
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:135
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:150