ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleTest.py
Go to the documentation of this file.
9
10# init application mgr
11theApp.initialize()
12
13# run 1 event
14theApp.nextEvent()
15
16# get ElectronContainer from AOD
17econ = PyParticleTools.getElectrons("ElectronCollection")
18print ("Electron")
19print (econ.size())
20
21for i in range(econ.size()):
22 eobj = econ[i]
23 print ("Electron pt:%f" % eobj.pt())
24 # get TrackParticle via ElementLink
25 tp = eobj.track()
26 print ("TrackParticle px:%f" % tp.px())
27 # get egamma via Navigation
28 # this should be retrieved from ESD
29 eg = eobj.eg()
30 print ("egamma eta:%f" % eg.eta())