ATLAS Offline Software
Functions | Variables
python.runEgammaOnlyESD Namespace Reference

Functions

def _run (args)
 

Variables

 statusCode = None
 
 parser = ArgumentParser("egammaFromESD")
 
 default
 
 type
 
 help
 
 nargs
 
 action
 
 args = parser.parse_args()
 

Function Documentation

◆ _run()

def python.runEgammaOnlyESD._run (   args)
private

Definition at line 19 of file runEgammaOnlyESD.py.

19 def _run(args):
20  from AthenaConfiguration.AllConfigFlags import initConfigFlags
21 
22  flags = initConfigFlags()
23  # input
24  from AthenaConfiguration.TestDefaults import defaultTestFiles
25 
26  flags.Exec.MaxEvents = args.maxEvents
27  if not args.inputFileList:
28  flags.Input.Files = defaultTestFiles.ESD
29  else:
30  flags.Input.Files = args.inputFileList
31 
32  from AthenaConfiguration.Enums import ProductionStep
33 
34  flags.Common.ProductionStep = ProductionStep.Reconstruction
35  # Disable detectors we do not need
36  flags.Detector.GeometryMuon = False
37  flags.Detector.EnableAFP = False
38  flags.Detector.EnableLucid = False
39  flags.Detector.EnableZDC = False
40  flags.Input.isMC = True
41 
42  # output
43  flags.Output.AODFileName = args.outputAODFile
44 
45  #
46  flags.Egamma.Keys.Output.CaloClusters = "new_egammaClusters"
47  flags.Egamma.Keys.Output.Electrons = "new_Electrons"
48  flags.Egamma.Keys.Output.Photons = "new_Photons"
49 
50  # Setup detector flags
51  from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
52 
54  flags, None, use_metadata=True, toggle_geometry=True, keep_beampipe=True
55  )
56 
57  flags.lock()
58 
59  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
60 
61  acc = MainServicesCfg(flags)
62 
63  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
64 
65  acc.merge(GeoModelCfg(flags))
66 
67  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
68 
69  acc.merge(PoolReadCfg(flags))
70 
71  if flags.Detector.EnablePixel:
72  from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
73 
74  acc.merge(PixelReadoutGeometryCfg(flags))
75  if flags.Detector.EnableSCT:
76  from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
77 
78  acc.merge(SCT_ReadoutGeometryCfg(flags))
79  if flags.Detector.EnableTRT:
80  from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
81 
82  acc.merge(TRT_ReadoutGeometryCfg(flags))
83 
84  if flags.Detector.EnableLAr:
85  from LArBadChannelTool.LArBadChannelConfig import LArBadFebCfg
86 
87  acc.merge(LArBadFebCfg(flags))
88 
89  # Special message service configuration
90  from DigitizationConfig.DigitizationSteering import DigitizationMessageSvcCfg
91 
92  acc.merge(DigitizationMessageSvcCfg(flags))
93 
94  # Algorithms to run
95 
96  # For being able to read pre Run-3 data w/ Trk objects
97  from TrkEventCnvTools.TrkEventCnvToolsConfig import TrkEventCnvSuperToolCfg
98 
99  acc.merge(TrkEventCnvSuperToolCfg(flags))
100 
101  # Redo topo
102  from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
103 
104  acc.merge(CaloTopoClusterCfg(flags))
105 
106  from egammaAlgs.egammaTopoClusterCopierConfig import egammaTopoClusterCopierCfg
107 
108  acc.merge(egammaTopoClusterCopierCfg(flags))
109 
110  from egammaAlgs.egammaRecBuilderConfig import egammaRecBuilderCfg
111 
112  acc.merge(egammaRecBuilderCfg(flags))
113 
114  from egammaAlgs.egammaSuperClusterBuilderConfig import (
115  electronSuperClusterBuilderCfg,
116  photonSuperClusterBuilderCfg,
117  )
118 
119  acc.merge(electronSuperClusterBuilderCfg(flags))
120  acc.merge(photonSuperClusterBuilderCfg(flags))
121 
122  from egammaAlgs.xAODEgammaBuilderConfig import xAODEgammaBuilderCfg
123 
124  acc.merge(xAODEgammaBuilderCfg(flags, name="xAODEgammaBuilder", sequenceName=None))
125 
126  from egammaConfig.egammaOutputConfig import egammaOutputCfg
127 
128  acc.merge(egammaOutputCfg(flags))
129 
130  from AthenaConfiguration.Utils import setupLoggingLevels
131 
132  setupLoggingLevels(flags, acc)
133 
134  if args.doCopyOriginalCollections:
135  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
136 
137  toAOD = [
138  "xAOD::PhotonContainer#Photons",
139  "xAOD::PhotonAuxContainer#Photons"
140  f"Aux.{flags.Egamma.Keys.Output.PhotonsSuppAOD}",
141  "xAOD::ElectronContainer#Electrons",
142  "xAOD::ElectronAuxContainer#Electrons"
143  f"Aux.{flags.Egamma.Keys.Output.ElectronsSuppAOD}",
144  ]
145  acc.merge(addToAOD(flags, toAOD))
146 
147  # running
148  statusCode = acc.run()
149  return statusCode
150 
151 

Variable Documentation

◆ action

python.runEgammaOnlyESD.action

Definition at line 175 of file runEgammaOnlyESD.py.

◆ args

python.runEgammaOnlyESD.args = parser.parse_args()

Definition at line 178 of file runEgammaOnlyESD.py.

◆ default

python.runEgammaOnlyESD.default

Definition at line 162 of file runEgammaOnlyESD.py.

◆ help

python.runEgammaOnlyESD.help

Definition at line 164 of file runEgammaOnlyESD.py.

◆ nargs

python.runEgammaOnlyESD.nargs

Definition at line 167 of file runEgammaOnlyESD.py.

◆ parser

python.runEgammaOnlyESD.parser = ArgumentParser("egammaFromESD")

Definition at line 158 of file runEgammaOnlyESD.py.

◆ statusCode

def python.runEgammaOnlyESD.statusCode = None

Definition at line 153 of file runEgammaOnlyESD.py.

◆ type

python.runEgammaOnlyESD.type

Definition at line 163 of file runEgammaOnlyESD.py.

python.egammaOutputConfig.egammaOutputCfg
def egammaOutputCfg(flags, name="EGOutputList")
Definition: egammaOutputConfig.py:8
TRT_GeoModelConfig.TRT_ReadoutGeometryCfg
def TRT_ReadoutGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:55
python.DigitizationSteering.DigitizationMessageSvcCfg
def DigitizationMessageSvcCfg(flags)
Definition: DigitizationSteering.py:217
python.LArBadChannelConfig.LArBadFebCfg
def LArBadFebCfg(configFlags, tag=None)
Definition: LArBadChannelConfig.py:45
python.Utils.setupLoggingLevels
def setupLoggingLevels(flags, ca)
Definition: Control/AthenaConfiguration/python/Utils.py:46
python.TrkEventCnvToolsConfig.TrkEventCnvSuperToolCfg
def TrkEventCnvSuperToolCfg(flags, name='EventCnvSuperTool', **kwargs)
Definition: TrkEventCnvToolsConfig.py:51
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:42
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.runEgammaOnlyESD._run
def _run(args)
Definition: runEgammaOnlyESD.py:19
PixelGeoModelConfig.PixelReadoutGeometryCfg
def PixelReadoutGeometryCfg(flags)
Definition: PixelGeoModelConfig.py:42
python.CaloTopoClusterConfig.CaloTopoClusterCfg
def CaloTopoClusterCfg(flags, cellsname="AllCalo", clustersname=None, clustersnapname="CaloTopoClusters")
Definition: CaloTopoClusterConfig.py:318
python.DetectorConfigFlags.setupDetectorFlags
def setupDetectorFlags(flags, custom_list=None, use_metadata=False, toggle_geometry=False, validate_only=False, keep_beampipe=False)
Definition: DetectorConfigFlags.py:286
egammaSuperClusterBuilderConfig.electronSuperClusterBuilderCfg
def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', sequenceName=None, **kwargs)
Definition: egammaSuperClusterBuilderConfig.py:16
xAODEgammaBuilderConfig.xAODEgammaBuilderCfg
def xAODEgammaBuilderCfg(flags, name='xAODEgammaBuilder', sequenceName=None, **kwargs)
Definition: xAODEgammaBuilderConfig.py:19
egammaRecBuilderConfig.egammaRecBuilderCfg
def egammaRecBuilderCfg(flags, name='egammaRecBuilder', sequenceName=None, **kwargs)
Definition: egammaRecBuilderConfig.py:14
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
egammaSuperClusterBuilderConfig.photonSuperClusterBuilderCfg
def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', sequenceName=None, **kwargs)
Definition: egammaSuperClusterBuilderConfig.py:57
egammaTopoClusterCopierConfig.egammaTopoClusterCopierCfg
def egammaTopoClusterCopierCfg(flags, name='', **kwargs)
Definition: egammaTopoClusterCopierConfig.py:10
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16