About accessing the energy of the particle

you can access the primary vertex of each event as described here:

and from there you can access the energy the primary (“the photon at the beginning of the event”) was equipped with.