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