Isolated prompt photon purity as a function of cluster $p_{\rm T}$. The purity in p--Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ TeV (left) is calculated using the template fit approach, whereas for $\sqrt{s_{\rm NN}}=8 $ and 8.16 TeV (right) the purity is obtained using the ABCD method. The purity is fitted using a modified sigmoid function given in Eq.(11) and an error function for $\sqrt{s_{\rm NN}}=5.02$ TeV. Vertical lines and boxes denote statistical and systematic uncertainties, respectively.