ATLAS Offline Software
egammaSteeringConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 __doc__ = """
4  Instantiate the
5  Things needed upstream the main egamma Reconstruction,
6  EGamma Reconstruction,
7  Output Item Lists,
8  xAOD related Thinning
9  """
10 
11 from AthenaCommon.Logging import logging
12 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
13 
14 
16  name="EGammaSteering"):
17 
18  mlog = logging.getLogger(name)
19  mlog.info('Starting EGamma Steering')
20 
21  acc = ComponentAccumulator()
22 
23  # e/gamma main Reconstruction
24  from egammaConfig.egammaReconstructionConfig import (
25  egammaReconstructionCfg)
26  acc.merge(egammaReconstructionCfg(flags))
27 
28  # Add e/gamma related containers to the output stream
29  if flags.Output.doWriteESD or flags.Output.doWriteAOD:
30  from egammaConfig.egammaOutputConfig import (
31  egammaOutputCfg)
32  acc.merge(egammaOutputCfg(flags))
33 
34  # LRT Reconstruction
35  if flags.Tracking.doLargeD0:
36  from egammaConfig.egammaLRTReconstructionConfig import (
37  egammaLRTReconstructionCfg)
38  acc.merge(egammaLRTReconstructionCfg(flags))
39 
40  # LRT output
41  if flags.Output.doWriteESD or flags.Output.doWriteAOD:
42  from egammaConfig.egammaLRTOutputConfig import (
43  egammaLRTOutputCfg)
44  acc.merge(egammaLRTOutputCfg(flags))
45 
46  # Add e/gamma xAOD thinning
47  if flags.Output.doWriteAOD:
48  from egammaConfig.egammaxAODThinningConfig import (
49  egammaxAODThinningCfg)
50  acc.merge(egammaxAODThinningCfg(flags))
51 
52  mlog.info("EGamma Steering done")
53  return acc
54 
55 
56 if __name__ == "__main__":
57  from AthenaConfiguration.AllConfigFlags import initConfigFlags
58  from AthenaConfiguration.TestDefaults import defaultTestFiles
59  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
60  flags = initConfigFlags()
61  flags.Input.Files = defaultTestFiles.RDO_RUN2
62  flags.Output.doWriteESD = True # To test the ESD parts
63  flags.Output.doWriteAOD = True # To test the AOD parts
64  flags.lock()
65  acc = MainServicesCfg(flags)
66  acc.merge(EGammaSteeringCfg(flags))
67  acc.printConfig(withDetails=True,
68  printDefaults=True)
69 
70  with open("egammasteeringconfig.pkl", "wb") as f:
71  acc.store(f)
python.egammaOutputConfig.egammaOutputCfg
def egammaOutputCfg(flags, name="EGOutputList")
Definition: egammaOutputConfig.py:8
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.egammaLRTReconstructionConfig.egammaLRTReconstructionCfg
def egammaLRTReconstructionCfg(flags, name="egammaLRTReconstruction")
Definition: egammaLRTReconstructionConfig.py:13
python.egammaSteeringConfig.EGammaSteeringCfg
def EGammaSteeringCfg(flags, name="EGammaSteering")
Definition: egammaSteeringConfig.py:15
python.egammaxAODThinningConfig.egammaxAODThinningCfg
def egammaxAODThinningCfg(flags, name="EGammaxAODThinning")
Definition: egammaxAODThinningConfig.py:10
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.egammaLRTOutputConfig.egammaLRTOutputCfg
def egammaLRTOutputCfg(flags, name="LRTEGOutputList")
Definition: egammaLRTOutputConfig.py:8
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.egammaReconstructionConfig.egammaReconstructionCfg
def egammaReconstructionCfg(flags, name="egammaReconstruction")
Definition: egammaReconstructionConfig.py:11