  In a hadron collider environment identification of prompt photons originating
in a hard partonic scattering process and rejection of non-prompt photons
coming from hadronic jets or from beam related sources, is the first step for
study of processes with photons in final state. Photons coming from decay of
$\pi_0$'s produced inside a hadronic jet and photons produced in catastrophic
bremsstrahlung by beam halo muons are two major sources of non-prompt photons.
In this paper the potential of deep learning methods for separating the prompt
photons from beam halo and $\pi^0$'s in the electromagnetic calorimeter of a
collider detector is investigated, using an approximate description of the CMS
detector. It is shown that, using only calorimetric information as images with
a Convolutional Neural Network, beam halo (and $\pi^{0}$) can be separated from
photon with 99.96\% (97.7\%) background rejection for 99.00\% (90.0\%) signal
efficiency which is much better than traditionally employed variables.
