running periods and their subsequent recovery are monitored continuously and corrected for, using light injected from the laser and LED systems [@Chatrchyan:2013dga].

A multivariate regression technique is used to correct for the partial containment of the shower in a supercluster, the shower losses for photons that convert in the material upstream of the calorimeter, and the effects of pileup. Training is performed on simulated events using shower shape and position variables of the photon as inputs. The photon energy response distribution is parametrized by an extended form of the Crystal Ball function [@Gaiser:1982yw] built out of a Gaussian core and two power law tails. The regression provides a per-photon estimate of the function parameters, and therefore a prediction of the distribution of the ratio of true energy to the uncorrected supercluster energy. The most probable value of this distribution is taken as the photon energy correction. The width of the Gaussian core is used as a per-photon estimator of the relative energy resolution $\sigma_E/E$.

In order to obtain the best energy resolution, the calorimeter signals are calibrated and corrected for several detector effects [@Chatrchyan:2013dga]. Calibration of the ECAL uses photons from $\PGpz\to\gamma\gamma$ and ${\ensuremath{\eta^0}\xspace}\to\gamma\gamma$ decays, and electrons from [$\PW\to\Pe\Pgn$]{}and [$\cPZ\to\Pep\Pem$]{}decays. 