Energy calibration and resolution of the CMS electromagnetic calorimeter in pp collisions at √s = 7 TeV

The article is the pre-print version of the final publishing paper that is available from the link below.


Introduction Introduction
The Compact Muon Solenoid (CMS) experiment [1] is designed to search for new physics at the TeV energy scale, exploiting the proton-proton and heavy-ion collisions produced by the Large Hadron Collider (LHC) [2] at CERN. A key part of the research programme is the investigation of electroweak symmetry breaking through the direct search for the standard model (SM) Higgs boson. The two-photon decay (H → γγ) is one of the most sensitive channels in the search for a low-mass Higgs boson (m H < 150 GeV) [3], and was an essential contributor to the discovery of the new boson in 2012 [4]. Its distinctive experimental signature is a narrow peak -with a width dominated by the instrumental resolution, the natural width of a low-mass Higgs boson being less than 10 MeV-in the invariant mass distribution of two isolated photons with high momentum component transverse to the beam axis, on top of a large irreducible background from direct production of two photons. Events where at least one of the photon candidates originates from misidentification of jet fragments contribute to an additional, reducible background. The electromagnetic calorimeter (ECAL) [5] of CMS has been specifically designed to provide excellent invariant mass resolution, via precise determination of energy and position, and fine transverse granularity for photon identification purposes, to enhance the sensitivity to the H → γγ decay. In this paper, we discuss the instrumental and operational aspects of the CMS ECAL that are particularly relevant to the observation of the H → γγ decay. Emphasis is given to single-channel response stability and uniformity within the ECAL, and to the calibration of the energy of electrons and photons in CMS, as these directly contribute to the overall energy resolution.
The central feature of the CMS detector is a superconducting solenoid 13 m long, with an internal diameter of 6 m. The solenoid generates a 3.8 T magnetic field along the axis of the LHC beams. Within the field volume are a silicon pixel and strip tracker, a lead tungstate scintillating crystal electromagnetic calorimeter and a brass/scintillator hadron calorimeter. A lead/silicon strip preshower detector is installed in front of the crystal calorimeter in the forward sections. Muons are identified and measured in gas-ionization detectors embedded in the outer steel magnetic flux return yoke. The detector is subdivided into a cylindrical barrel part, and endcap disks on each side of the interaction point. Forward calorimeters complement the coverage provided by the barrel and endcap detectors. CMS uses a two-level online trigger system to reduce the event rate from about 20 MHz to about 300 Hz. The first level (L1) uses custom electronics close to the detector to analyze coarse information from the calorimeters and muon detectors to reduce the rate to 100 kHz or less. The second level (known as the high-level trigger) uses a computing farm to analyse the full information from all subdetectors in order to make the final decision on whether to record an event. A detailed description of the CMS detector can be found in [1].
The CMS experiment uses a right-handed coordinate system, with the origin at the nominal interaction point in the centre of CMS, the x axis pointing to the centre of the LHC ring, the y axis pointing vertically up (perpendicular to the LHC plane), and the z axis along the anticlockwisebeam direction. The pseudorapidity η is defined as η = − ln [tan(θ/2)], where θ is the polar angle measured from the x axis. The azimuthal angle, φ, is measured in the x-y plane.
The installation of the ECAL crystal calorimeter inside the CMS detector was completed in August 2008. The preshower detector was installed in 2009. Early commissioning and initial calibrations were performed with cosmic-ray muons [6] and using a special data sample collected before collisions were achieved, where bunches of 10 9 protons from the LHC were dumped in the collimators 150 m upstream of CMS. These results are summarized in [7][8][9].
The results presented in this paper make use of proton-proton collision data from LHC oper- Figure 1: Layout of the CMS ECAL, showing the barrel supermodules, the two endcaps and the preshower detectors. The ECAL barrel coverage is up to |η| = 1.48; the endcaps extend the coverage to |η| = 3.0; the preshower detector fiducial area is approximately 1.65 < |η| < 2.6. ation in 2010 and 2011 at a centre-of-mass energy √ s = 7 TeV with integrated luminosities of 36 pb −1 and 4.98 fb −1 , respectively. The LHC bunch spacing was 50 ns throughout this period. After a brief description of the CMS ECAL (Section 2) we summarize its status during 2010 and 2011 (Section 3), paying particular attention to the quantities influencing the energy resolution. Section 4 describes the monitoring and calibration techniques employed, whilst Section 5 describes the energy resolution achieved. The energy resolution, estimated from the analysis of Z-boson decays into electrons, is compared to Monte Carlo (MC) simulation. The energy resolution for photons relevant to the H → γγ analysis is discussed.

The CMS electromagnetic calorimeter
The CMS ECAL ( Fig. 1) [1,5] is a homogeneous and hermetic calorimeter containing 61200 lead tungstate (PbWO 4 ) scintillating crystals mounted in the barrel (EB), closed at each end by endcaps (EE) each containing 7324 crystals. A preshower detector (ES), based on lead absorbers equipped with silicon strip sensors, is placed in front of the endcap crystals, to enhance photon identification capabilities. Avalanche photodiodes (APDs) [10,11] and vacuum phototriodes (VPTs) [12] are used as photodetectors in the EB and EE respectively. The high-density (8.28 g/cm 3 ), short radiation length (X 0 = 0.89 cm), and small Molière radius (R M = 2.2 cm) of PbWO 4 allow the construction of a compact calorimeter with fine granularity. The PbWO 4 properties were improved during a long R&D project in collaboration with the producers in Russia (BTCP in Bogoroditsk) and China (SIC in Shanghai), leading to the mass production of optically clear, fast, and radiation-tolerant crystals [13,14].
The PbWO 4 crystals emit blue-green scintillation light with a broad maximum at wavelengths 420-430 nm. A particle depositing 1 MeV of energy in a crystal produces a signal of about 4.5 photoelectrons in the photodetectors. The stability of the temperature and of the photodetector gain are critical for an accurate determination of the energy deposited in the crystals, as described in Section 3. The crystals have to withstand the damage to the crystal lattice caused by radiation expected throughout the duration of LHC operation. The expected integrated ion-izing dose in the ECAL is up to 4 kGy in the barrel and 200 kGy at |η| = 3 after 10 years of LHC operation corresponding to an integrated luminosity of 500 fb −1 [5]. The expected hadron fluence varies between about 10 13 cm −2 in the barrel and 10 14 cm −2 at |η| = 3. The main observable effect of the radiation is a wavelength-dependent loss of crystal transparency but without changes to the scintillation mechanism [15]. A second effect of the radiation is that the VPT response decreases with accumulated photocathode charge to a plateau [16]. Radiation does not affect the gain of the APDs but in large doses induces dark currents which cause small reductions in the bias voltage at the APDs if not compensated for. In order to measure and correct for response change during LHC operation, the ECAL is equipped with a light monitoring system [17,18].
The EB crystals have a truncated pyramidal shape and are mounted in a quasi-projective geometry, to minimize inter-crystal gaps aligned to particle trajectories. The geometric construction of the EE is based on a right-sided crystal with two tapering sides. The EB uses 23 cm long crystals with front face cross sections of around 2.2 cm×2.2 cm, whilst the EE comprises 22 cm long crystals with front face cross sections of 2.86 cm×2.86 cm. In the EB the crystals are organized in 36 supermodules, 18 on each side of the beam interaction point, and provide 360-fold granularity in φ and 85-fold granularity in each eta direction up to |η| = 1.48. Each supermodule is made up of four modules along η. The EE extends the coverage to |η| = 3.0, with the crystals arranged in an x-y grid to form an approximately circular shape. The ES fiducial area is approximately 1.65 < |η| < 2.6. The ES contains two active planes of silicon strip sensors and associated mechanics, cooling and front-end electronics. The sensors have an active area of 61 mm×61 mm, divided into 32 strips. The planes closer to the interaction point have their strips aligned vertically while the farther plane strips are horizontal, to provide accurate position measurement and fine granularity in both coordinates. Electron and photon separation is possible up to |η| = 2.5, the limit of the region covered by the silicon tracker.
The ECAL barrel energy (E) resolution for electrons in beam tests has been measured to be [19]: where the three contributions correspond to the stochastic, noise, and constant terms. This result was obtained reconstructing the showers in a matrix of 3×3 crystals where the electron impact point on the calorimeter was tightly localized in a region of 4 mm ×4 mm to give maximum containment of the shower energy within the 3×3 crystal matrix. The noise term of 12% at 1 GeV corresponds to a single-channel noise of about 40 MeV, giving 120 MeV in a matrix of 3×3 crystals. The constant term, which dominates the energy resolution for high-energy electron and photon showers, depends on non-uniformity of the longitudinal light collection, energy leakage from the back of the calorimeter, single-channel response uniformity and stability. The beam test setup was without magnetic field, no inert material in front of the calorimeter, and accurate equalization and stability of the single-channel response (better than 0.3%) [20]. The specification for the ECAL barrel crystals was chosen to ensure that the non-uniformity of the longitudinal light collection and the energy leakage from the back of the calorimeter contributed less than 0.3% to the constant term [5,21]. The beam test resolution studies show that this target was met.
During CMS operation, the contributions to the resolution due to detector instabilities and to the channel-to-channel response spread must be kept to within 0.4%, in order to retain the excellent intrinsic resolution of the ECAL. The 'intercalibration constants', used to equalize the channel-to-channel response, must be measured with appropriate calibration procedures for single-channel response and stability. Moreover, the intense field of the CMS magnet and inert material upstream of the ECAL affect the stochastic term of the resolution, for electrons and photons that interact before reaching the calorimeter. Energy deposits from multiple interactions per LHC bunch crossing (pileup) and APD dark current changes induced by radiation damage contribute to the noise term, but these were negligible in 2010 and 2011.
In studying the energy resolution of the ECAL inside CMS, discussed in Section 5, the in-situ data have been compared to the predictions of a full MC simulation of the CMS detector based on GEANT4 [22,23]. The simulation of the ECAL standalone response has been tuned to match beam test results, and includes a detailed description of the single-channel noise measured in situ, a spread of the single-channel response corresponding to the estimated intercalibration precision for the 2010-2011 data, and an additional constant term of 0.3% to account for longitudinal non-uniformity of light collection. The simulation also includes the few non-responding channels identified in data.

ECAL operation and stability
The ECAL has been efficiently operating since installation. have been classified as problematic, due to high levels of electronic noise. These channels were suppressed in the trigger and in the offline reconstruction.
Triggers for electron/photon candidates were provided by the two-level trigger system of CMS. At L1, electromagnetic candidates are formed from the sum of the transverse energy in two adjacent trigger towers (i.e., arrays of 5×5 crystals in EB). Coarse information on the lateral extent of the energy deposit inside each trigger tower is exploited to suppress spurious triggers, such as those arising from direct ionization in the APD sensitive region [24,25]. This feature has allowed the single-photon L1 trigger to be operated unprescaled at a low threshold of E T = 15 GeV in 2011. From data analysis, this trigger has been verified to be fully efficient (>99%) for E T > 20 GeV, causing no inefficiencies to, e.g., the H → γγ analysis, for which events are retained if the leading photon has transverse energy E T > 35 GeV.
The operating temperature of ECAL of 18 • C is maintained by a dedicated cooling system [26]. The temperature dependence of the crystal light yield (−2%/ • C) and of the APD gain (−2%/ • C) demand a precise temperature stabilization of better than 0.05 • C in the EB. In the endcaps, the dependence of the VPT response on the temperature is negligible, and a stabilization of better than 0.1 • C for the crystals is sufficient. These specifications limit the contribution to the constant term of the energy resolution to be less than 0.2%. The measured temperature stability throughout 2010 and 2011 is better than 0.03 • C in EB and 0.08 • C in EE.
The APD working point, of nominal gain 50, has been chosen to provide a good signal-to-noise ratio with an acceptable sensitivity of the gain to the bias voltage of 3.1%/V. This is achieved with a high voltage (HV) of around 380 V [27]. The contribution of the gain variation to the constant term is required to be less than 0.2%, implying an HV stability of around 65 mV. The measured fluctuation during 2011 was around 33 mV. The VPTs operate in a region where the response variation with HV is less than 0.1%/V. The stability of the EE HV supplies is better than 0.1 V over 100 days so the contribution to the constant term from this source is negligible.
The ECAL response varies under irradiation due to the formation of colour centres that reduce the transparency of the lead tungstate. The crystal transparency recovers in the periods without irradiation through spontaneous annealing [15]. A monitoring system, based on the injection of laser light at 440 nm, close to the emission peak of scintillation light from PbWO 4 , into each crystal, is used to track and correct for response changes during LHC operation [17,18]. Additional laser, and LED in the EE, light sources provide ancillary information on the system stability. The evolution of the ECAL response to the laser light in 2011 is shown in Fig. 2, as a function of time. An average value is shown for each of six pseudorapidity ranges. The data are normalized to the measurements at the start of 2011. The corresponding instantaneous luminosity is also shown. The response drops during periods of LHC operation, but for a given dose-rate the compensating self-annealing of the crystals reduces the rate of loss of response. These observations correspond to changes in crystal transparency [15], coupled with a more gradual loss in VPT response in EE due to the radiation environment at the LHC [16]. The average drop in response to laser light, by the end of 2011, was 2-3% in EB rising to 40% in the range 2.7 ≤ |η| ≤ 3.0 in EE.
The last data-taking period covered in Fig. 2, in November 2011, was for low luminosity heavyion data-taking, when the crystal transparencies partially recovered due to self-annealing. During this period the precision of the monitoring system was measured. The laser cycle provides a measurement from each channel every 20 to 30 minutes. By taking three consecutive measurements, the middle point can be compared to the interpolated value from the other two. The RMS for the difference is on average 3 × 10 −4 for each channel. This is well within the required precision of 0.2%. The system stability was measured prior to proton-proton collisions, for periods of 30 days, with 99.8% of the monitored channels in EB and 98.3% in EE exhibiting stability within requirements, of better than 0.2% [9]. Using quasi-online processing of the monitoring data, single-channel response corrections are delivered in less than 48 h for prompt reconstruction of the CMS data. The complete set of corrections used for final calibration of the ECAL is discussed in this paper.

Reconstruction and energy calibration
The front-end electronics of the EB, EE, and ES use 12-bit analogue-to-digital converters (ADC) to sample the analogue signals from the detectors (APDs, VPTs, and silicon sensors) at 40 MHz. In EB and EE ten consecutive samples are stored for each trigger received, whilst in the ES only three samples are stored. The delays of the EB/EE readout pipelines, common for 5×5 channels, are adjusted in steps of 1.04 ns such that the signal pulse is expected to start from the fourth sample and the baseline pedestal value can be estimated from the first three samples [24]. In the ES the pedestal is in the first sample and the signal is in the two following samples. In both cases the amplitude of the signal is reconstructed in the same way using a linear combination of the samples [28]: A = ∑ j w j · s j , where s j is the sample value in ADC counts and w j is a weight, optimized using the average pulse shapes measured in beam tests in the respective detectors.
The fast time constants of PbWO 4 scintillation and the response of the readout electronics provide excellent time resolution capabilities [7]. The signal arrival time is measured from the relative phase of the signal samples to the expected shape of an in-time signal, with an algorithm using ratios of consecutive samples. Residual channel-to-channel time offsets are corrected with appropriate constants derived from in-situ data [7,24]. The timing resolution is measured from data using electrons from Z-boson decays (Z → e + e − ). By comparing the time difference between the channels with highest amplitude in each of the two electron showers, we deduce  the single-channel timing resolution to be 190 ps and 280 ps in EB and EE respectively, for the energy range of electrons from the Z-boson decays.
The ECAL crystals are approximately one Molière radius in lateral dimension; thus high energy electromagnetic showers spread laterally over several crystals. Furthermore, in CMS, the presence of material in front of the electromagnetic calorimeter (corresponding to 1-2 X 0 depending on the η region) causes conversion of photons and bremsstrahlung from electrons. The strong magnetic field of the experiment tends to spread this radiated energy along φ. Clustering algorithms are used to sum together energy deposits in adjacent crystals belonging to the same electromagnetic shower. The clustering algorithm proceeds first with the formation of "basic clusters", corresponding to local maxima of energy deposits. The basic clusters are then merged together to form a "supercluster", which is extended in φ, to recover the radiated energy. Because of the differences between the geometric arrangement of the crystals in the barrel and endcap regions, a different clustering algorithm is used in each region. The clustering algorithm used in EB, called the 'hybrid' algorithm, is described in [29]. In EE and ES, the algorithm merges together fixed-size 5×5 crystal basic clusters and associates each with corresponding ES energy deposits.
The energy in a supercluster can be expressed as: where the sum is over the crystals i belonging to the supercluster. The energy deposited in each crystal is given by the pulse amplitude (A i ), in ADC counts, multiplied by ADC-to-GeV conversion factors (G), measured separately for EB and EE, by the intercalibration coefficients (C i ) of the corresponding channel, and by S i (t), a correction term due to radiation-induced channel response changes as a function of time t. The preshower energy (E ES ) computation and calibration procedure are described in Section 4.3. The term F e,γ represents the energy correction, applied to the superclusters to take into account the η-and φ-dependent geometry and material effects as well as the fact that electrons and photons shower slightly differently. This factorization of the various contributions to the electromagnetic energy determination enables stability and intercalibration to be studied separately from material and geometry effects.
For the purpose of studying the ECAL calibration and performance, the energy of both electrons and photons is estimated from the supercluster energy. For electrons, this is different from the default energy reconstruction in CMS, which uses the combination of the supercluster energy and the momentum of the track matched to the supercluster [30]. This combination is mainly relevant for transverse energies below 25 GeV.
Electron identification relies upon matching the measurements in the ECAL and the Tracker to better than 0.02 rad in φ and 4×10 −3 units in η [31]. The accurate position measurement of photons impacting on the calorimeter is used in determining their direction with respect to the collision vertex. The accuracy of the measurement of the opening angle between the two decay photons from the Higgs boson contributes to its reconstructed invariant mass resolution. The ECAL alignment and position resolution measurement is performed with isolated electrons from W-boson decays using both the ECAL and tracker information. The achieved position resolution in EB (EE) is 3 (5) mrad in φ and 1×10 −3 (2×10 −3 ) units in η, and matches the position resolution of a MC simulation with perfectly aligned geometry. Efficient clustering and total energy measurement in the endcaps requires the alignment between EE and ES to be known to better than the ES strip pitch (≈2 mm). The measured alignment uncertainty is better than 0.15 mm.

Corrections for changes in response, S i (t)
The ECAL light monitoring (LM) system [17,18] is used to determine corrections, denoted by S i (t) in Eq. (2), to response changes in the ECAL. The laser light is injected through optical fibres in each EB and EE crystal through the front and rear face respectively. The spectral composition and the path for the collection of laser light at the photodetector are different from those for scintillation light. A conversion factor is required to relate the changes in the ECAL response to laser light to the changes in the scintillation signal. The relationship is described by a power law [5]: where S(t) is the channel response to scintillation light at a particular time t, S 0 is the initial response, and R(t) and R 0 are the corresponding response to laser light. The exponent α is independent of the loss for small transparency losses.
The value of α has been measured in a beam test for a limited set of crystals under irradiation. Average values of 1.52 and 1.0 were found for crystals from the two producers, BTCP and SIC, respectively [32][33][34]. The values are in qualitative agreement with a ray-tracing simulation program [35] and are due to the different initial transparency of the two sets of crystals. The spread in α was found to be 10% [34], which arises from residual differences in transparency and different surface treatments of the crystals. Given the response loss to laser light, shown in Fig. 2, the spread in α limits the precision of the response correction by the end of 2011 running for a single channel to 0.3% in EB, and between 0.5% and a few percent at high pseudorapidity in EE.

Validation of the response corrections using collision data
The response corrections were tuned and validated using the energy of electrons from W-boson decays, the reconstructed mass from η decays to two photons, and the energy resolution measured with Z → e + e − events. The tuning involves the optimization of the value of α, for BTCP and SIC crystals in EB and EE separately, to obtain the best in-situ resolution of the invariant mass of the Z-boson.
The η meson data are used to provide fast feedback, to validate the LM corrections for prompt data reconstruction. The events are selected online by a dedicated calibration trigger and recorded with reduced event content. A fit is carried out on the invariant mass distribution of the photon pairs in the mass range of the η meson. The fit comprises a polynomial function to describe the background and a Gaussian distribution to describe the resonance peak. Figure 3 shows an example of the η-meson peak with the fit superimposed, and the relative value of the fitted η mass versus time in EB for a period of 60 hours. The plot shows the data before (red points) and after (green points) the LM corrections applied. A number of measurements are possible for each LHC fill, owing to the high rate for recording η events. This permits shortterm changes in the ECAL response to be verified before prompt data reconstruction takes place. Isolated electrons from W-boson decays are used to provide an energy scale to validate response corrections over periods of days to weeks. The event selection is described in [31,36]. The ratio of the electron energy, E, measured in the ECAL, to the electron momentum, p, measured in the tracker, is computed in each event, and a reference E/p distribution is obtained from the entire data set after applying LM corrections. The width of the E/p reference distribution is dominated by the energy and momentum resolution and is not biased by residual imperfections in the LM corrections. This reference distribution is then scaled to fit E/p distributions obtained by dividing the same data in groups of 12000 consecutive events. The scale factors provide a measure of the relative response and are shown in Fig. 4 for 2011, as a function of time. The data are shown before (red points) and after (green points) LM corrections to the ECAL channel response are applied. The magnitude of the average correction for each point is indicated by the continuous blue line. A stable response to electromagnetic showers is achieved throughout 2011 with an RMS of 0.12% in EB and 0.35% in EE. This method does not require a knowledge of the absolute calibration of both the energy and the momentum.
The response corrections for EE were calculated using an 'effective' α value of 1.16 for all BTCP crystals. This value of α was shown to give the most stable and optimal mass resolution as a function of time by minimizing the resolution of the invariant mass for Z → e + e − decays, and evaluating the stability of the E/p evolution with time for different values of α. The value of the effective α is smaller than the value measured in beam tests, of 1.52. This is attributed to the larger crystal transparency losses in EE and the VPT response losses. Large transparency losses reduce the difference between the path lengths for injected light and scintillation light. For the same path length α is expected to be 1. VPT response losses give rise to a proportional loss of the ECAL response, and correspond to α = 1.  The validation of the response corrections was also carried out by monitoring the ECAL energy resolution during 2011 using events with a Z-boson decaying into two electrons. The selection of these events is described in [31,36]. The invariant mass was calculated from the energy deposits of the two electrons and the angle between them using track and vertex information. The mass resolution is dominated by the energy resolution of the electron reconstruction. Figure 5 shows the contribution to the instrumental mass resolution for the Z-boson peak, σ CB /M Z , as a function of time for events with both electrons in EB (left) or both in EE (right). The fits to the Z-boson peak, based on the Crystal Ball parameterization [37] of the resolution function, and the fit parameters are described in Section 4.5.1. The mass resolution, after the application of the response corrections, is stable within an RMS spread of 0.1% and 0.2% for events with both electrons in EB or EE, respectively. The observed spread of the points is consistent with the uncertainty on the resolution from the fit.

Response correction summary
Excellent energy response and resolution stability have been achieved for 2011 after the application of LM corrections. In EE an effective value of α has been derived to stabilize and optimize the invariant mass resolution with Z → e + e − decays. The various cross-checks, using reconstructed masses from particle decays, have confirmed the validity of the LM corrections.
The contributions to the constant term of the energy resolution due to the monitoring corrections at the single-crystal level comprise: • The precision of an individual LM correction measurement, which is better than 0.1%, and the long-term instability of a single channel, which is < 0.2% (Section 3). • The 10% spread in α, from channel-to-channel, translates to a contribution to the resolution of 0.3% for EB by the end of 2011. • In EE, the introduction of an effective α compensates for the average VPT response loss, which is not separated from the contribution due to crystal transparency change.
Both the channel-to-channel variation of the VPT loss and the channel-to-channel difference in the value of α contribute to the single-channel uncertainty on the value of the effective α, which is estimated to be approximately 10%. Given the impact of the high LHC radiation levels on the EE response, this uncertainty translates into a contribution to the energy resolution of about 1.5% on average, and ranging from about 0.5% at |η| ≈ 1.6 to about 2.5% at |η| ≈ 2.5 by the end of 2011.
In addition to the effects listed above, the residual instabilities of 0.12% in EB and 0.35% in EE in the mean-energy response observed during 2011 (see Fig. 4) also contribute to the constant term of the energy resolution.

Single-channel intercalibration, C i
The ECAL channels are calibrated by using relative and absolute calibrations. Relative calibrations, C i , between one channel and another, are referred to as intercalibrations and are described in this section. Absolute calibrations are obtained by referring the intercalibrations to a mass scale by using Z-boson decays, as described Section 4.5. The intercalibration constants in EB and EE are divided by their average value, to provide a set of numbers with a mean value of unity. A number of methods are used for intercalibration and are then combined to provide a weighted mean intercalibration constant for each channel.
An initial set of calibrations, known as the 'pre-calibration', were obtained from laboratory measurements, beam tests, and from exposure to cosmic rays. The laboratory measurements included the crystal light yield and photodetector gain. Nine out of 36 EB supermodules and about 500 EE crystals were intercalibrated with high-energy electrons in beam tests. All channels in the EB supermodules were calibrated with cosmic-ray muons [20]. After installation at the LHC, the "beam splash" events were used to improve further the EB and EE calibrations [9]. The intercalibration constants from each method were cross-checked for consistency and combined to provide a weighted average for the channel. The precision of the intercalibration for each channel at the start of 7 TeV operation in 2010 is estimated to be: • EB: about 0.5% for the nine supermodules calibrated in beam tests and 1.4% to 1.8%, depending on pseudorapidity, for the other 27 supermodules; • EE: below 1% for the ≈500 crystals calibrated in beam tests and about 5% for all other channels; • ES: about 2.5% in all silicon modules from the calibration with cosmic rays prior to installation.
Intercalibration with collision data involves the following methods [38]: • The φ-symmetry method is based on the expectation that, for a large sample of minimum bias events, the total deposited transverse energy should be the same in all crystals at the same pseudorapidity. In CMS this corresponds to crystals located in a particular η ring. The method provides a fast intercalibration of crystals located within the same ring. • The π 0 and η calibrations use the invariant mass of photon pairs from these mesons to intercalibrate the channel response. • Intercalibrations with isolated electrons from W-and Z-boson decays are based on the comparison of the energy measured in ECAL to the track momentum measured in the silicon tracker.
All these methods are used to intercalibrate channels at the same pseudorapidity. Isolated electrons are also exploited to derive the relative response of the various η rings.
The precision of the intercalibrations quoted in the following sections has been studied for each method with the aid of MC simulations, and validated using the pre-calibration data and by a channel-by-channel comparison of the intercalibrations derived with each method.

Intercalibration using the φ-symmetry method
The intercalibration in φ is taken from the ratio of the total transverse energy deposited in one crystal to the mean of the total transverse energy collected by all crystals at the same value of η [38]. Events used for this calibration are acquired with a special minimum bias trigger.
All single-crystal energy deposits above 150 MeV in EB, and above 650 MeV in EE are recorded, while the rest of the event is dropped to limit the trigger bandwidth required.
The data analysis is restricted to deposits with transverse energies between a lower and an upper threshold. The lower threshold is applied to remove the noise contribution and is derived by studying the noise spectrum in randomly triggered events. It is set to about six times the channel RMS noise (e.g., 250 MeV for channels in EB). The upper threshold is applied to minimize the fluctuations induced by rare deposits of very high E T and is set to 1 GeV above the lower threshold, in both EB and EE. Because the transverse energy scalar sum is obtained from a truncated E T distribution, a given fractional change in the E T sum does not correspond to the same fractional change in the value of the intercalibration constant. This is accounted for with an empirical correction [39]. Corrections are also applied to compensate for known azimuthal inhomogeneities of the CMS detector, related to the intermodule gaps in the ECAL and to the tracker support system. Figure 6 shows the estimated precision (red circles) for the φ-symmetry intercalibration as a function of |η| for EB and EE in 2011. For a typical sample of about 10 8 events, the precision of the method is limited by a systematic uncertainty of 1.5% in the central part of EB, growing to above 3% at larger |η|, due to residual effects of the azimuthal inhomogeneities of the material in front of ECAL. These are larger in the region where the material budget is largest (see Fig. 9). By using the ratio of φ-symmetry intercalibrations over periods of about one week, the systematic uncertainties from the inhomogeneities largely cancel, and a relative precision between successive periods of 0.3% is achieved. This method is used to monitor the stability of the intercalibration constants or to improve the intercalibration constants obtained with other analyses.  Figure 6: The intercalibration precision obtained in 2011 using φ symmetry, the E/p ratio with electrons, π 0 /η decays, and the resultant precision, with its uncertainty, for the combination of the methods, in EB (left) and EE (right).

Intercalibration using π 0 → γγ and η → γγ decays
The decays of π 0 and η mesons to two photons are exploited to intercalibrate the ECAL crystals using the peak of the γγ invariant mass distribution [38]. A special data stream is used to profit from the copious production of π 0 and η mesons at the LHC. Candidate diphoton decays are directly selected online from events passing the single-e/γ and single-jet L1 triggers. After selection, only limited data, in the vicinity of the photon candidates, are kept in order to collect π 0 and η meson candidates at a rate of the order of 10 kHz with minimal impact on the CMS readout bandwidth and storage space.
The individual photon energy is obtained from the sum of energy in a 3×3 matrix of crystals centred on the crystal with the highest energy deposit (seed). The seed is required to have an energy greater than 0.5 GeV. The single-crystal energy deposits are small and corrections are applied to these deposits to account for the effects of the noise suppression algorithm used in the readout [29].
For the π 0 sample, the photons are required to have transverse energies above 0.8 GeV in EB and 0.5 GeV in EE. The transverse energy of the π 0 candidate is required to be above 1.6 GeV in EB and 2.0 GeV in EE. For the η sample, the photons are required to have transverse energies above 0.8 GeV in EB and 1.0 GeV in EE. The transverse energy of the η candidate is required to be above 3.0 GeV in both EB and EE. Moreover, to suppress photons converted in the material in front of the ECAL, the transverse shape of the energy deposition is required to be consistent with that of an electromagnetic shower produced by a photon and be isolated from other ECAL energy deposits [38]. This calibration method is only indirectly affected by tracker material, through an efficiency loss and a worsening of the signal to background ratio in the detector regions where the material thickness is large.
An iterative procedure is used to determine the intercalibration constants. For each crystal, the invariant mass distribution is obtained from all π 0 /η candidates for which one of the photons is centred on the crystal. The distribution is fitted with a Gaussian function, for the signal, and a fourth-order polynomial for the background. The intercalibration constants are updated iteratively to correct the fitted mass value in each channel. The quality of the calibration depends on the number of selected candidates per crystal and on the signal-to-background ratio. The results from each resonance are combined to form an average weighted by precision.
The precision of the intercalibration constants in 2010 was estimated by comparing the π 0 /η intercalibrations to those derived from the pre-calibration and it was found to be at the systematic limit of the methods employed. Figure 6 shows the estimated precision of intercalibration constants in EB (left) and EE (right), in 2011, as a function of pseudorapidity using the π 0 /η method. The large 2011 data set provides intercalibration constants with a precision of 0.5-1% each month in the EB, with a pattern along η related to the distribution of the tracker material. A precision of 2-4% is achieved every 2-3 months in the EE.

Intercalibration using electrons from W-and Z-boson decays
The ratio of the supercluster energy, E, of an electron measured by ECAL to the momentum, p, measured by the tracker, is used to provide E/p intercalibrations in φ and along η. Isolated electrons were selected from W-boson and Z-boson decays, as described in Section 4.1.1. The data comprise 7.5 million isolated electrons collected during 2011, corresponding approximately to each crystal being struck by 100 electrons. The estimated background due to misidentified jets is below 1%.
The intercalibration constants in φ were calculated using an iterative procedure that derives constants for all the channels [40,41]. Once convergence was reached, the constants were normalized to have a mean value equal to unity in each φ ring at each position in η. In each φ ring, corrections were applied to take into account the effect of the supermodule boundaries in φ and φ-dependent variations of the tracker momentum response. Variations in the amount of material in different regions of φ and η affect the electron momentum measurement due to bremsstrahlung losses. The relative momentum response was calibrated using electrons from Z-boson decays using 2011 data. The invariant mass was reconstructed in 360 φ-bins by using the tracker momentum for the electron entering a specific φ-bin, and the ECAL energy for the other electron. The square of the invariant-mass peak position in each φ-bin is proportional to the local momentum scale for the corresponding region of the detector, because the mean contribution from the other electron and from the angle is independent of the φ-bin. Correction factors are between ±1.5% in EB and ±3% in EE. The resulting uncertainty on the relative momentum scale is 0.48% for EB and 1.4% for EE. These uncertainties, added in quadrature to the statistical uncertainty of the method, contribute less than about 10% of the total uncertainty on the intercalibration constants achieved with this method in 2011. Figure 6 shows the precision of the intercalibration for EB and EE. The precision in the central barrel, for |η| < 1.0, is 0.8-1.4% and reaches 4% at |η| = 1.48. The precision in EE is better than 4%, apart from the outer regions, which are calibrated to ≈ 6%. The variation of the precision is due to changes with η of the E/p resolution, and of the tracker material budget, which impacts on the mean number of crystals per supercluster. In contrast to the other methods, this intercalibration method was still limited by the statistical precision in 2011.
Electrons from W-and Z-boson decays are also used for the relative calibration between the rings along η. An E/p reference distribution obtained from the MC simulation is scaled to fit the E/p distributions in data from crystals in the same φ ring. Since the shape of the E/p distribution varies along η, MC reference distributions are made for four |η| regions in EB, corresponding to EB modules, and for five |η| regions in EE. For each φ ring a specific calibration of the local momentum scale for electrons was derived from Z → e + e − events, with the method described above. Corrections to the supercluster energy, described in Section 4.4, were also applied. The scale factors extracted from the fit for each ring of crystals along η are shown in Fig. 7 for MC simulation and data, as a function of electron pseudorapidity. The shaded regions between EB and EE are usually excluded from the acceptance of electrons and photons for physics analyses. The E/p scale factors provide a measure of the relative response to electrons along η. In MC simulation, they are consistent with unity, which shows the self-consistency of the method for MC events. Results from data have been used to scale the intercalibration constants in each ring, although the observed η dependence of the response in EB and EE might indicate the need for further tuning of the energy corrections in data. Deviations from unity for data in EE can be also partly ascribed to the lower precision of pre-calibrations in the endcaps.

Combination of the intercalibration constants
The precision of the combined intercalibration set is shown in Fig. 6. The combination was obtained from a mean of the intercalibration constants in fixed φ rings from the π 0 /η, the E/p, and the φ-symmetry methods, weighted on the respective precisions. The intercalibration set established in 2010 was also included in the combination. The combined intercalibration precision is 0.4% for central EB crystals (|η| < 1), and is 0.7-0.8% for the rest of the EB up to |η| = 1.48. In EE the precision is 1.5% for 1.6 < |η| < 2.3 and better than 2% up to the limit of the electron and photon acceptance at |η| = 2.5. The variation of the precision with pseudorapidity arises partly from the size of the data sample, and partly from the amount of material in front of the ECAL.
The precision of each intercalibration set used in the combination has been derived by means of MC simulation studies. They were validated at low instantaneous luminosity, prior to transparency changes in ECAL, by measuring the spread of the in-situ constants with respect to those derived at beam tests. In addition, the precision was estimated from the cross-comparison of the results of the different intercalibration techniques. In each φ ring, the variance of the difference between the intercalibration constants for every pair of intercalibration sets (i.e., C i (j) − C i (k), where i is a channel index and j and k indicate the intercalibration method) was derived. This variance was assumed to be the sum in quadrature of the uncertainty of the constants in each set. Consequently, the precision of each intercalibration set was extracted by solving three simultaneous equations for the three variances. The values obtained with this method were found to be consistent with the expected precisions based on the simulation studies. The difference between the two estimates has been used to derive the uncertainty on the precision of the combined intercalibration set, shown by the grey band in Fig. 6.

Summary of the intercalibration precision
The supercluster energy is determined from the energy deposited over several crystals. As a consequence, the contribution to the constant term of the energy resolution due to the response spread of the individual channels is smaller than the spread itself. Simulation studies show that the scale factor between the uncertainty in the intercalibration and the constant term is approximately 0.7, corresponding to the average level of energy containment in the central crystal of the supercluster. From the results shown in Fig. 6, the contribution to the constant term, due to the intercalibration precision, is about 0.3% in the central part of EB (|η| < 1.0) and 0.5% for 1.0 < |η| < 1.48. In EE the contribution is about 1.0% for 1.6 < |η| < 2.3 and better than 1.5% up to the limit of electron and photon acceptance at |η| = 2.5.
To illustrate the relative importance of the individual calibrations and corrections, Fig. 8 shows the dielectron invariant mass distributions for various reconstruction scenarios: for singlechannel corrections set to unity (blue), for the final intercalibrations (red), and for the final intercalibrations plus the monitoring corrections (black) in the EB (left) and the EE (right). In all the cases, supercluster-level corrections, F e/γ in Eq. (2) (see Section 4.4), were included in the energy computation.

Calibration of the preshower
The precision required for the calibration of the preshower is largely determined by the fraction of energy deposited in the ES with respect to that in the EE. Approximately 6-8% of the shower energy (decreasing with e/γ energy) is deposited in the ES. As a consequence, to limit the contribution to the combined EE+ES energy resolution to 0.3-0.4%, therequired channel-tochannel calibration precision is 5%.
Prior to installation, all the ES sensors were calibrated with cosmic rays to an accuracy of 2.5%. In situ, the ES sensors are calibrated using charged pions and muons with momentum greater than 1 GeV. These particles are close to being minimum ionizing particles (MIPs), with an average momentum of about 6 GeV, and have a signal-to-noise ratio greater than 10. The pulse height distribution for each channel is fitted to a Landau distribution convolved with a Gaussian function. The fitted peak position is taken as the calibration. There is a good correlation between the cosmic ray and in-situ calibrations. The precision of in-situ calibrations is 2.2%.
Preshower clusters are identified from the position of crystal clusters in the EE. The energies in each ES plane are weighted, and the total ES energy is given by: where E clus1 ES and E clus2 ES are the energies in each preshower plane, expressed in MIPs, and G ES is a coefficient in GeV/MIP. The coefficient α ES defines the relative weight of the second ES plane with respect to the first.
Beam test results showed that the optimal energy resolution of ECAL is achieved for α ES ranging between 0.6 and 0.8. The coefficient α ES has been fixed to 0.7 [42]. The parameter G ES was extracted from a straight line fit to the EE cluster energy versus the associated ES cluster energy using electrons from W-boson decays [38]. The measured value of G ES is 0.023 ± 0.002 (stat.) ± 0.001 (syst.) GeV/MIP. The systematic uncertainty was calculated assuming an uncertainty of 4% on the EE shower energy.

Energy corrections, F e,γ
Superclusters are used to reconstruct the energies of photons and electrons, and to form seeds for electron track reconstruction. A correction function, F e,γ , derived from MC simulation, is applied to the supercluster energy to account for energy containment effects, including both shower containment in the calorimeter, and energy containment in the supercluster for particles that shower in the material in front of ECAL. The energy corrections have been tuned for electrons and photons separately to account for the differences in the way they interact with the material in front of the ECAL.
In this analysis, corrections for photons have been optimized using a multivariate regression technique based on a Boosted Decision Tree (BDT) implementation. The regression has been trained on prompt photons (from γ+jets MC samples) using the ratio of generator level photon energy to the supercluster energy, including the energy in the preshower for the endcaps, as the target variable. The input variables are the η and φ coordinates of the supercluster in CMS, a collection of shower shape variables, and a set of local cluster coordinates to measure the distance of the clusters from ECAL boundaries. The local coordinates provide information on the amount of energy which is likely to be lost in crystal and module gaps and cracks, and drive the level of local containment corrections predicted by the regression. The other variables provide information on the likelihood and location of a photon conversion and the degree of showering in the material. They are correlated with the global η and φ position of the supercluster. These variables drive the degree of global containment correction predicted by the regression. The global and local containment corrections address different effects. However, these corrections are allowed to be correlated in the regression to account for the fact that a photon converted before reaching ECAL is not incident at a single point on the calorimeter face, and is therefore relatively less affected by local containment. This approach leads to better energy resolution than factorized parametric corrections of the different effects. The number of primary vertices is also included as input to the BDT in order to correct for the dependence of the shower energy on spurious energy deposits due to pileup events.
The primary validation tool for the regression is to compare data and MC simulation performance for electrons in Z-and W-boson decays. A BDT with identical training settings and input variables to those described above has been trained on a MC sample of electrons from Z-boson decays. The consequent corrections are different from the ones used for the electron reconstruction in CMS, where tracker information is included in the energy measurement. However, they enabled a direct comparison of the ECAL calibration and resolution in data and MC simulation to be performed, as we discuss in Sections 4.5 and 5.
A cluster shape parameter, R9, is defined in order to distinguish photons that convert upstream of ECAL from those entering ECAL unconverted. It is defined as the ratio of the energy contained within the 3×3 array of crystals centred around the crystal with maximum energy deposit to the total energy of the supercluster. Showers from photons that interact with the tracker material will spread out in the magnetic field reducing the value of R9. A value of 0.94 has been chosen to distinguish between photons that convert in the tracker material (R9 < 0.94) and unconverted photons (R9 ≥ 0.94). According to MC studies, about 70% of the photons with R9 ≥ 0.94 in EB are unconverted [43]. For the purpose of studying the ECAL response, this variable is also used in this paper to separate electrons in two categories with supercluster topology similar to that of photons. On average, electrons with R9 ≥ 0.94 radiate less energy in the material in front of ECAL, and are therefore more representative of the unconverted photon sample than electrons with R9 < 0.94. Figure 9 (left) shows the average value of the F e correction function as a function of supercluster pseudorapidity evaluated from data using electrons from W-boson decays. Events with both low and high values of R9 are shown. The steep increase in the average value of the energy corrections between |η| ≈ 1 and |η| ≈ 2 is dominated by the effects of the tracker material. Figure 9 (right) shows the distribution of the tracker material in front of the ECAL as a function of |η|, which clearly exhibits a steep increase in the material budget at the transition between the tracker barrel and tracker endcap (|η| ≈ 1) and at |η| ≈ 1.8. Correspondingly, the total material budget ranges from 0.4 X 0 in the central part of the barrel to about 2 X 0 at |η| ≈ 1.5. Local structures in Fig. 9 (left) correlate with inter-module boundaries in the barrel (|η| = 0, 0.45, 0.8, and 1.15). In the endcaps the structures at |η| ≈ 1.55, 1.65 and 1.8 correlate with the barrel-endcap transition, the preshower edge, and the distribution of the tracker support tube material in front of EE, respectively.
To illustrate the impact of the different steps in the energy reconstruction, Fig. 10 shows the dielectron invariant mass distribution for Z-boson events, reconstructed applying a fixed-matrix clustering of 5×5 crystals with respect to using the supercluster reconstruction to recover radiated energy, and then applying the energy corrections. For the EE, the effect of adding the preshower energy is also shown. The improvement in the Z-boson mass resolution is clearly demonstrated as the successive steps are applied. This is particularly evident for the supercluster reconstruction, which efficiently recovers the radiated energy and reduces the low-energy tails of the distributions relative to the 5×5 fixed-matrix clustering.

Absolute energy calibration, G
Nine EB supermodules and 500 EE crystals were exposed to high-energy electron beams prior to being installed in CMS. From these data, the absolute energy calibration for the ECAL was established by equalizing the energy sum of a 5×5 crystal matrix to the electron beam energy. This calibration corresponds in CMS to that relevant for unconverted photons. In CMS, the absolute energy calibration (G) is computed in a reference region of the ECAL where the effects of upstream material and uncertainties in the energy corrections are minimal. The reference region in the barrel is defined as the central 150 crystals in the first module of each supermodule (|η| < 0.35), requiring a minimum distance of 5 crystals from the border of each module in both η and in φ. This region is chosen because the material budget in front of the first module is small, the geometry of these crystals is very similar, and the centrality of the crystals in the module is required so that there is no energy leakage due to the gaps between modules or supermodules. In the EE, the reference region is defined as the central region of each endcap (1.7 < |η| < 2.1), to which the crystals exposed to the beam test belong. The absolute energy calibration in the MC simulation is computed using 50 GeV unconverted photons. It is defined such that the energy reconstructed in a 5×5 crystal matrix is equal to the true energy of the photon in the reference region. Decays of Z-bosons into two electrons are used to set the overall energy scale in EB and EE in data relative to the MC simulation, and to validate the energy correction function F e for electrons, using the Z-boson mass constraint. Decays of Z-bosons into two muons where one muon radiates a photon, Z → µµγ, are used to cross-check the energy calibration of photons.

Energy scale calibration with Z → e + e − events
The dielectron invariant mass in Z → e + e − events is calculated from the reconstructed supercluster energy in the ECAL, including the energy corrections derived from MC simulation, and the opening angle measured from tracks at the event vertex. The energy scale and resolution are extracted from the dielectron invariant mass distribution, for events with a reconstructed mass in the range 60-120 GeV. Electrons are selected if their transverse energy is larger than 25 GeV as described in [31,36]. With these selections, a background contamination of about 2% is estimated from MC simulation. The invariant mass distribution is fitted with a Breit-Wigner line shape, convolved with a Crystal Ball (CB) function [37]: where the parameter ∆m represents the displacement of the peak with respect to the true Zboson mass, σ CB is the width of the Gaussian component of the CB function (a measure of the energy resolution) and the parameters α CB and γ of the CB tail function account for showering electrons whose energy is not fully recovered by the clustering algorithms.
An unbinned maximum likelihood fit to the invariant mass distribution is performed. The tail parameters α CB and γ are constrained from MC simulation studies. The mass and width of the Breit-Wigner function are fixed to m Z = 91.188 GeV and Γ Z = 2.495 GeV [44]. Figure 11 shows the fitted invariant mass distributions for data and simulation in EB and EE. The ADC-to-GeV conversion factor G of Eq. (2) for data is adjusted such that the fitted Z → e + e − peak agrees with that of the MC simulation separately for the barrel and endcap calorimeters.
The systematic uncertainty associated to the absolute energy calibration is estimated to be 0.4% in EB and 0.8% in EE for the 2011 data sample, and is dominated by the uncertain knowledge of the energy correction function for the electrons (F e ) in the reference region. In order to determine the size of this uncertainty, the energy scale has been derived from the dielectron invariant mass distributions reconstructed from the raw supercluster energy both in data and MC events. Moreover, the analysis has been repeated using MC samples generated with tracker material budget altered within its uncertainty [45,46]. The observed variation in the results is taken as a systematic uncertainty. In the endcaps, the uncertainty of the ES detector energy calibration also contributes to the systematic uncertainty. The dependence of G on a number of additional effects has been also studied. They include the stability of the result on changes in the event selection and in the functional form used to describe the ECAL response. Each of these effects causes an uncertainty on G of about 0.1% or less, for a total uncertainty of 0.2%.

Verification of the energy calibration and linearity check
The Z → µµγ decays, where the photon arises from muon final-state radiation, are used to cross-check the photon energy calibration. A data sample with about 98% purity has been selected by requiring a pair of identified muons of E T greater than 15 GeV, an isolated photon of E T greater than 25 GeV, a separation ∆R = ∆η 2 + ∆φ 2 between the photon and each muon lower than 0.8, an invariant mass of the µµγ system, computed from the muon momenta and the photon energy measured by ECAL, between 60 GeV and 120 GeV, and the sum of the µµγ and the dimuon invariant masses lower than 180 GeV. The mean E T of the photons in the events selected is approximately 32 GeV; the mean energy is about 42 GeV in EB and 114 GeV in EE.  Figure 12 shows the invariant mass distributions reconstructed from two muons and the radiated photon. In each plot, fitted values of the relative mean deviation of the reconstructed photon energy from that expected from the kinematics of Z → µµγ decays, δ, and the mean energy resolution of the selected events, σ E /E, are listed. The photon energy scale and resolution are extracted simultaneously by unfolding the Z-boson line shape from the detector response function. The response function is modelled from MC samples using a kernel density estimator [47,48]. The scale and resolution dependence of the response function is built by scaling the distribution of the residuals of the true and the reconstructed photon energy. The effective σ, defined as the interval around the most probable value of the normalized residuals of the true and the reconstructed energy containing 68% of the events, is used to measure the resolution. Alternatively, the photon energy scale is estimated from the mean of the distribution of a per-event energy scale estimator defined as s = (m 2 µµγ − m 2 µµ )/(m 2 Z − m 2 µµ ) − 1, where the terms indicate the dimuon and the µµγ invariant masses, and the nominal Z-boson mass. The mean of the distribution is extracted from a fit with a Breit-Wigner distribution convolved with a Gaussian function. A systematic uncertainty of 0.3% on the photon energy scale is ascribed to the analysis, due to the dependence of the result on the fitting method. The effect of the muon momentum calibration uncertainty and the contribution of various backgrounds in data has been checked and found to be negligible.
Given the systematic uncertainty on the absolute energy scale factor, G, extracted from the analysis of Z → e + e − events, which is a common term of the electron and photon calibration schema presented in Eq. (2), the relative mean deviations of the reconstructed photon energy δ listed in the plots of Fig. 12 show that the photon energy is consistently calibrated in data and MC simulation within statistical and systematic uncertainties.
The linearity of the energy response was checked by studying the dependence of E/p as a function of E T with isolated electrons from Z-and W-boson decays. Moreover, using boosted Zboson events, the stability of the Z-boson mass as a function of the scalar sum of the transverse energies of the two electrons, i.e., H T = E 1 T + E 2 T , was studied. In these analyses, the E/p distribution in bins of E T and the dielectron invariant mass in bins of H T from MC simulation were fitted to the corresponding distributions in data. A scale factor was extracted from each fit, which measures the differential non-linearity of the energy response in data relative to the MC samples. This non-linearity is found to vary from −0.2% to +0.2% for E T varying from 30 GeV to 110 GeV. The amount of data collected in 2011 did not permit the measurement to be extended to higher energies.

Inclusive energy resolution from the Z-boson line shape
The energy resolution for electrons is measured using Z → e + e − events. The electron energies are reconstructed from the ECAL energy deposits with the calibrations and corrections described in the previous sections. The dielectron invariant mass resolution (which is dominated by the electron energy resolution) is related to the single-electron energy resolution by an approximate scaling factor of √ 2, verified using MC simulations. The intrinsic detector resolution is estimated by the Gaussian width of the Crystal Ball function, the σ CB parameter in Eq. (5).
The dielectron invariant mass distributions for data and MC samples are shown in Fig. 11. The fitted values of σ CB are reported in Table 1 Similarly, the energy resolution for photons has been studied from the line shape of Z → µµγ events, in an E T range slightly lower, but comparable, to that of Z → e + e − events. Results are shown in Fig. 12, for photons with R9 ≥ 0.94 in EB, and for the inclusive samples of photons in EB and EE separately. Because of the |η| dependence of the material in front of the ECAL, shown in Fig. 9 right, the photon resolution for R9 ≥ 0.94 is dominated by photons with |η| < 1 while the performance for R9 < 0.94 is dominated by photons with |η| > 1. The measured mean energy resolution is 2.5% in the barrel (1.7% for high R9) and 4.7% in the endcaps. As with the electrons from Z-boson decays, the photon energy resolution in data is not correctly described by the MC simulation.
For both the electrons from Z-boson decays and the photons from Z → µµγ, the energy resolution in the data is not correctly described by the MC simulation. The sources of this discrepancy are thought to be common, and are discussed in Section 5.4. These differences are accommodated in CMS analyses by applying additional Gaussian smearing, in bins of η and R9, to the electron and photon energies in MC simulation, as discussed in Sections 5.2 and 5.3.

The energy resolution for electrons as a function of pseudorapidity
A maximum likelihood fit is used to extract the ECAL energy resolution as a function of the pseudorapidity of the final-state electrons, and in two bins of R9. The fit is performed on Z → e + e − decays, with an invariant dielectron mass between 89 GeV and 100 GeV, and the following likelihood function is maximized: where Voigt is a convolution of a Breit-Wigner distribution with a Gaussian function, and the product is run over all the events. The mass resolution σ M ee can be written as: where the average values of σ E /E in several bins of η and two bins of R9 for E T ≈ 45 GeV electrons from Z-boson decays are free parameters in the fit. The narrow mass window used in the fit allows the resolution to be determined mostly from the high energy side of the invariant mass distribution, where the Crystal-Ball function used in Eq. (5) reduces to a Gaussian function. The likelihood function adopted here is numerically simpler than that in Eq. (5) and allows the number of parameters in the fit to be made sufficiently large to extract a detailed map of the energy resolution as a function of |η|. Figure 13 shows the energy resolution extracted using this method for both data and MC simulation. The average resolution σ E /E for electrons from Z-boson decays is plotted as a function of η in the barrel and endcaps, and is shown separately for electrons with R9 ≥ 0.94 and R9 < 0.94. The energy resolution obtained with this method is in agreement with the fits to the Z-boson invariant mass distribution in Fig. 11, assuming a scaling of the mass resolution by √ 2 to obtain the equivalent per-electron energy resolution.
The resolution in the barrel depends on the amount of material in front of the ECAL (see Fig. 9 right), and is degraded in the vicinity of the ECAL module boundaries, as indicated by vertical lines in the plots. The resolution in the endcaps shows an η dependence that is also correlated with the amount of material in front of the ECAL, up to |η| ≈ 2.0. At larger pseudorapidity, single-channel response variations, not fully modelled in simulation, are also contributing to the difference between data and MC simulation.  To accommodate the mismatch in the energy resolution between data and simulation, an additional smearing term is extracted, which is the quadratic difference between the electron resolution in data and MC simulation of Fig. 13. This term is added in quadrature as a constant Gaussian smearing to the electron and photon energy in the MC events, assuming the same degradation in resolution between data and MC events for photons and electrons. The consistency of this method was checked by comparing the mass resolution in Z → e + e − and Z → µµγ events in data and in a MC sample with this smearing term applied. Fig. 14 shows the dielectron invariant mass for Z → e + e − events, for the MC samples with and without this smearing, compared to data. The agreement between data and the smeared MC confirms that the smeared MC sample correctly models the detector response. For Z → µµγ events, the resolution of the smeared MC sample is also consistent with data. This supports the compatibility of the resolution measurements for electrons and photons from Z-boson decays.

Energy resolution for photons from simulated H → γγ events
The energy resolution for photons of E T ≈ 60 GeV, predicted by MC simulation of H → γγ events for a 125 GeV Higgs boson, is shown in Fig. 15 with and without the smearing term discussed in the previous section. The photon selection and cluster corrections are identical to those used in the CMS H → γγ analysis of 2011 data [49]. The resolution, σ E /E, is extracted from a fit to the distribution of the ratio of the reconstructed and the true photon energies. The resolution as a function of |η| is plotted separately in EB and EE for photons with R9 ≥ 0.94 and R9 < 0.94, which are samples enhanced in unconverted and converted photons, respectively. The energy resolution for photons from the H → γγ decay in the default MC samples varies between 0.7% for unconverted photons in the central part of the barrel to 1.8% towards the end of the barrel for converted photons. In the endcap the resolution in MC samples varies between 1.5% and 3%. In the MC sample with smearing added, the resolution varies between 1.1% and 2.6% in the barrel and from 2.2% up to 5% in the endcaps.
In this approach the difference in resolution between data and simulation, observed using electrons of E T ≈ 45 GeV from Z-boson decays, has been ascribed to the constant term in the resolution function. With this assumption, the results with smearing shown in Fig. 15 should be regarded as an upper limit to the resolution for photons from H → γγ decays. The smearing required to correctly describe the data is higher where the material budget is higher, suggesting that the effect of the material is not properly simulated or that the material budget is not completely realistic. This indicates that a component of the data to MC simulation difference is related to the interaction of electrons and photons with the material in front of ECAL, whose effect on the resolution has also an E T dependence.

Discussion on the energy resolution in data and simulation
As has been discussed above, the resolution predicted in MC simulation is better than that in data. There is a continuing effort to improve the detector modelling in the MC simulation and to improve the resolution in data. Four specific areas have been identified for further study and will be addressed when additional data become available:

Tracker material description:
The amount of material in front of the ECAL included in the MC simulation has been verified by comparing the number of conversions and nuclear interactions observed in the data with those expected from the simulation. They agree to better than 5% on average, with local differences up to 10% [45,46]. However, as shown in Fig. 13, the energy resolution is better for electrons that do not interact significantly with the tracker material, as characterized by R9 ≥ 0.94. Also, in Fig. 13, the difference in quadrature in the measured resolution between data and MC simulation is larger, in the barrel and in much of the endcaps, in regions which have more upstream tracker material. These observations suggest that the deteriorating effect of the material in front of the ECAL has a larger impact on data than on MC events. Further improvements in the modelling of the material geometry and its effect in MC simulation as well as mitigating the impact of the material in the reconstruction algorithms and corrections are being investigated.

Clustering improvements and energy corrections:
A key element in the mitigation of material effects is a clustering algorithm that efficiently collects all the energy deposits of the electrons and photons, and the subsequent optimization of the energy corrections. The clustering algorithms are very sensitive to the precise modelling of the showering process and the geometric description of the tracker material as well as of the ECAL. A better tuning of the description of electromagnetic showers in the MC simulation is being pursued, using CMS data as input to the simulations. In addition, with increased data size, possible improvements in the determination of cluster corrections may be achieved by measuring them directly from data. In particular, the local effect of module borders in the barrel and 5×5 crystal structures in the endcaps shows differences in the reconstructed energy as a function of the impact point between data and MC samples at the level of 1%, which are not yet accounted for using data-driven corrections.

Conclusions
Imperfect knowledge of the α parameter: The limited knowledge of the channel-to-channel spread in the α parameter in Eq. (3) would degrade the resolution in data. Assuming an uncertainty on α of 10%, the typical response change at the level of 3% in the barrel and 15% on the average in the endcaps (up to 25% at |η| ≈ 2.5) would result in an additional contribution to the resolution of 0.3%, and 1.5% (2.5% at |η| ≈ 2.5), respectively. A first-order correction was performed in the endcaps by optimizing α using events in data, as described in Section 4.1. Further gains are anticipated by measuring α at the per crystal or per φ ring level, using the large sample of events (π 0 /η, W → eν, Z and minimum bias data) collected in 2011 and 2012.

Imperfect knowledge of the intercalibration systematic uncertainty:
The intercalibration constants are determined with several independent methods, which exploit different events, and are then combined. In the combination it is assumed that the methods are completely independent. However some experimental effects, for example those related to the detector geometry, may lead to common systematic uncertainties. The E/p intercalibration method is so far statistically limited, and it also needs a larger event sample to study the systematic uncertainties in detail with data. It is expected that additional data will help clarify whether common sources of systematic uncertainties could lead to an overestimate of the intercalibration precision.
There are also a number of additional small effects that are not modelled in the MC simulation, which may affect the energy resolution when comparing data to MC samples. The crystal transparency change is not implemented in the MC simulation, resulting in an underestimate of the stochastic and constant term in the energy resolution.

Conclusions
The energy calibration and resolution of the electromagnetic calorimeter of the CMS detector have been determined using proton-proton collision data from LHC operation in 2010 and 2011 at a centre-of-mass energy of √ s = 7 TeV with integrated luminosities of about 5 fb −1 .
The stability of the cooling, high voltage and readout electronics has fully met requirements, with an impact on the resolution of less than 0.2%. The spatial alignment with the tracker and the synchronization of the ECAL readout match expectations, and are at the level required for e/γ identification and signal amplitude reconstruction. The laser monitoring system was successfully exploited to correct for changes in channel response due to the radiation damage. The stability of the corrected ECAL response was better than 0.2% in the barrel and 0.4% in the endcaps throughout this period. Physical processes such as π 0 and η decays to two photons, and W-and Z-boson decays to electrons, have been used to monitor the stability and to carry out channel-to-channel intercalibrations. The π 0 and η data were collected on dedicated trigger streams. The contribution to the constant term of the energy resolution, due to the intercalibration uncertainty, is between 0.3-0.5% in EB and 1-1.5% in EE, depending on η.
The energy resolution has been compared in detail to that obtained with the full CMS Monte Carlo simulation. The resolution in simulation is better than in data. The difference is greater in regions where there is a significant amount of material in front of the ECAL. Although the origin of the difference is not fully understood, disagreement between data and MC simulation is removed by applying an additional contribution to the constant term of the energy resolution of electrons and photons in the MC events. The resolution for E T ≈ 45 GeV electrons from Zboson decays is better than 2% in the central region of the ECAL barrel (|η| < 0.8), and is between 2% and 5% elsewhere. For electrons with little bremsstrahlung, where 94% or more of the clustered energy is contained within a 3×3 array of crystals, the energy resolution improves to 1.5% for |η| < 0.8. The mass resolution for Z → e + e − decays, when both electrons are in the barrel, is 1.6% and is 2.6% for decays when both electrons are in the endcaps. The resulting energy resolution for photons with E T ≈ 60 GeV from 125 GeV Higgs boson decays varies across the barrel from 1.1% to 2.6% and from 2.2% to 5% in the endcaps.
The analysis of 2010-2011 proton-proton collisions has shown that, even in the challenging LHC environment, with high radiation and high event pileup, the CMS electromagnetic calorimeter has been successfully operated and calibrated to excellent precision. The achievements on the energy resolution played a vital part in enabling CMS to observe a new boson with a mass of 125 GeV [4].