{'fraction_non_alphanumeric': 0.037752576917830905, 'fraction_numerical': 0.016728045049784687, 'mean_word_length': 4.3094868611628385, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Measurement of B(B-->X_s {\gamma}), the B-->X_s {\gamma} photon energy spectrum, and the direct CP asymmetry in B-->X_{s+d} {\gamma} decays

The photon spectrum in B -->X_s {\gamma} decay, where X_s is any strange hadronic state, is studied using a data sample of (382.8\pm 4.2) \times 10^6 e^+ e^- -->\Upsilon(4S) -->BBbar events collected by the BABAR experiment at the PEP-II collider. The spectrum is used to measure the branching fraction B(B -->X_s \gamma) = (3.21 \pm 0.15 \pm 0.29 \pm 0.08)\times 10^{-4} and the first, second, and third moments= 2.267 \pm 0.019 \pm 0.032 \pm 0.003 GeV,,<(E_\gamma -)^2>= 0.0484 \pm 0.0053 \pm 0.0077 \pm 0.0005 GeV^2, and<(E_\gamma -)^3>= -0.0048 \pm 0.0011 \pm 0.0011 \pm 0.0004 GeV^3, for the range E_\gamma>1.8 GeV, where E_{\gamma} is the photon energy in the B-meson rest frame. Results are also presented for narrower E_{\gamma} ranges. In addition, the direct CP asymmetry A_{CP}(B -->X_{s+d} \gamma) is measured to be 0.057 \pm 0.063. The spectrum itself is also unfolded to the B-meson rest frame; that is the frame in which theoretical predictions for its shape are made.


I. INTRODUCTION
In the standard model (SM) the electromagnetic radiative decay of the b quark, b → sγ or b → dγ, proceeds at leading order via the loop diagram shown in Fig. 1 resulting in a photon and a strange or down quark. The rate for b → dγ relative to b → sγ is suppressed by a factor |V td /V ts | 2 where V td and V ts are the Cabibbo-Kobayashi-Maskawa (CKM) matrix elements. Interest in these decays is motivated by the possibility that new heavy particles might enter into the loop at leading order, causing significant deviations from the predicted SM decay rates. There is an extensive theoretical literature evaluating the effects of new physics; some examples are given in references [1][2][3][4][5][6][7][8]. New physics can also significantly enhance the direct CP asymmetry for b → sγ and b → dγ decay [9][10][11][12][13].
The hadronic processeses corresponding to the underlying b → sγ and b → dγ decays are B → X s γ and B → X d γ. Here X s and X d are any final state resulting from the hadronization of the sq or dq quark-level state, respectively, where q is the spectator from the B meson. These are predominantly resonances, including K * (892), K 1 (1270) (X s ) or ρ, ω (X d ) and higher-mass states, but also nonresonant multihadron final states. Theoretical predictions for the rates of such exclusive decays suffer from large uncertainties associated with the form factors of the mesons. In contrast, the inclusive hadronic rates Γ(B → X s γ) and Γ(B → X d γ) can be equated with the precisely-calculable partonic rates Γ(b → sγ) and Γ(b → dγ) at the level of a few percent [14] (quarkhadron duality), leading to significantly more accurate predictions. At next-to-next-to-leading order (up to four loops) the SM prediction for the branching fraction is B(B → X s γ) = (3.15 ± 0.23) × 10 −4 (E γ > 1.6 GeV) [15].
Measurements of the inclusive rates and asymmetries are therefore powerful probes of physics beyond the standard model. The shape of the photon energy spectrum is determined by the strong interaction of the b quark within the B meson and by the hadronization process. The Fermi motion of the quark within the B meson and gluon radiation lead to an E γ distribution, in the B-meson rest frame, that is peaked in the range 2.2 to 2.5 GeV, with a kinematic limit at m B /2 ≈ 2.64 GeV and a rapidlyfalling low-energy tail. The shape is insensitive to non-SM physics [16,17], and can therefore provide information about the strong-interaction dynamics of the b quark. Heavy Quark Effective Theory (HQET) [14,[18][19][20][21][22] has been used most extensively to describe these dynamics. The shape of the photon spectrum provides information on parameters of this theory related to the mass and momentum of the b quark within the B meson; the definitions and hence the values of these parameters differ slightly between the "kinetic scheme" [23] and the "shape function scheme" [24]. The Heavy Flavor Averaging Group (HFAG) [25] has computed world-average values of the parameters in the kinetic scheme based on previous measurements of the inclusive semileptonic Bmeson decay B → X c ℓν (ℓ = e or µ) and of B → X s γ. HFAG has also translated those values to the shape function scheme. These parameters can be used to reduce the error in the extraction of the CKM matrix elements |V cb | and |V ub | from the inclusive semileptonic decays, B → X c ℓν and B → X u ℓν [26][27][28][29]. The B → X s γ spectral shape may also be compared to predictions in the framework of Dressed Gluon Exponentiation [30].
The inclusive decay B → X s γ was first measured by the CLEO collaboration [31][32][33] and has been subsequently studied by the ALEPH [34], Belle [35][36][37][38][39][40] and BABAR [41][42][43] collaborations. All measurements have been made with B mesons produced in e + e − collisions. The theoretical predictions, which assume that the mea-surement is inclusive so that quark-hadron duality holds, are made in the B-meson rest frame for photons with E γ > 1. 6 GeV. This means that ideally the measurement is made for all X s final states and for all photons E γ > 1. 6 GeV. The experimental challenge is to make the measurement as inclusive as possible while suppressing backgrounds from other processes producing photons or fake photons. The backgrounds arise from continuum events (e + e − to qq or τ + τ − pairs, where q = u, d, s or c), with the photon coming from either a π 0 or η decay or from initial state radiation, and from other BB processes. The BB background arises predominantly from π 0 or η decay but also from decays of other light mesons, misreconstructed electrons and hadrons. It is strongly dependent on photon energy and rises steeply at lower E γ . This places a practical lower limit for E γ on the experimental measurements; measurements have been made to date with E γ > 1.7, 1.8, and 1.9 GeV.
Three experimental techniques have been pursued. They differ in the extent to which the final state is reconstructed. The first is the fully inclusive technique in which neither the X s from the signal B nor the recoiling B meson is reconstructed. (Charge conjugates are implied throughout this paper.) The second is the semiinclusive technique, in which as many exclusive X s final states as possible are reconstructed and combined. The recoiling B meson is not reconstructed. The third is the reconstructed recoil-B technique, in which inclusive B events are tagged by fully reconstructing the recoiling B mesons in as many final states as possible, but X s is not reconstructed. Each of the techniques has different strengths and weaknesses.
If the X s is not reconstructed, the sample includes all X s final states, but there are significant backgrounds from other BB decays that must be estimated. It also includes X d states from the Cabbibo-suppressed b → dγ process. These can be subtracted by assuming the b → dγ photon spectrum to have a similar shape to the b → sγ photon spectrum, but scaled by the ratio of the CKM elements (|V td |/|V ts |) 2 = 0.044 ± 0.003. This is believed to be a valid assumption. Also, if the X s is not reconstructed then the signal B cannot be reconstructed. The B mesons have a small momentum in the Υ (4S) rest frame. As the B meson is not reconstructed, the direction of the momentum is not known. This leads to a Doppler smearing of the photon energy. This effect, along with the detector resolution, must be corrected for or unfolded in order to compare to predictions made in the B-meson rest frame. Quantities measured in the Υ (4S) rest frame, i.e., the center-of-mass (CM) frame, such as the photon energy E * γ , are denoted with an asterisk. No semi-inclusive measurement to date has reconstructed more than about 60% of X s decays, due to the high combinatoric background for higher multiplicity decays. Uncertainties in modeling the mix of X s final states result in significant efficiency uncertainties, as well as a large uncertainty in correcting for the final states that are not reconstructed. However, the reconstruction of the X s implies that the signal B can be fully reconstructed, providing kinematic constraints to strongly suppress backgrounds, allowing the measurement to be made directly in the B-meson rest frame.
In the reconstructed recoil-B technique, only about 1% of B 's can be fully reconstructed, due to the presence of neutrinos in semileptonic decays and combinatoric backgrounds to higher multiplicity decays. This severely limits the statistical precision, but does allow the measurement to be made in the B-meson rest frame.
This paper reports a fully inclusive analysis that supersedes the previous BABAR fully-inclusive result [42], which is based on a smaller data sample. The E * γ photon spectrum is measured in B → X s+d γ decays. It is used to measure the branching fraction B(B → X s γ) for E γ > 1.8 GeV and for narrower energy ranges. The effects of detector resolution and Doppler smearing are unfolded to provide an E γ photon spectrum in the Bmeson rest frame that can be used to fit to theoretical predictions for the spectral shape. The unfolded spectrum is also used to measure the first, second and third moments, given respectively by 2 (1) Although the SM predicts quite different asymmetries for B → X s γ and B → X d γ, the X s and X d final states cannot be distinguished in the fully inclusive technique. Hence the B → X d γ contribution to the fully-inclusive measurement cannot be corrected for, and only the combination A CP (B → X s+d γ) can be measured: This asymmetry is approximately 10 −6 in the SM, with nearly exact cancellation of opposite asymmetries for b → sγ and b → dγ. A CP (B → X s+d γ) is sensitive to different new physics scenarios than A CP (B → X s γ) [11]. Thus measurements of this joint asymmetry complement those of A CP in b → sγ [32,36,44,45] to constrain new physics models.

II. DATASETS, DETECTOR, SIMULATION AND SIGNAL MODELS
The results presented are based on data samples of e + e − → Υ (4S) → BB collisions collected with the BABAR detector at the PEP-II asymmetric-energy e + e − collider. The on-resonance integrated luminosity is 347.1 fb −1 , corresponding to 382.8 million BB events. The continuum background is estimated with an offresonance data sample of 36.4 fb −1 collected 40 MeV below the Υ (4S) resonance energy. The BABAR detector is described in detail in reference [46]. Charged-particle momenta are measured with a 5-layer, double-sided silicon vertex tracker (SVT) and a 40-layer drift chamber (DCH) inside a 1.5-T superconducting solenoidal magnet. A high resolution totalabsorption electromagnetic calorimeter (EMC), consisting of 6580 CsI(Tl) crystals, is used to measure localized electromagnetic energy deposits and hence to identify photons and electrons. The EMC energy resolution for high-energy photons in the current measurement is about 2.6%. A ring-imaging Cherenkov radiation detector (DIRC), aided by measurements of ionization energy loss, dE/dx, in the SVT and DCH, is used for particle identification (PID) of charged particles. Muons are identified in the instrumented flux return (IFR), which consists of 18 layers of steel interleaved with single-gap resistive-plate chambers. For the last 38% of the data collected, 1/3 of these chambers in the central region of the detector were replaced by 12 layers of limited-streamer tubes, interspersed with 6 layers of brass (to increase absorption).
The BABAR Monte Carlo (MC) simulation, based on GEANT4 [47], EVTGEN [48] and JETSET [49], is used to generate samples of B + B − and B 0 B 0 , qq (where q is a u, d, s or c quark), τ + τ − , and signal events (BB events in which at least one B decays to X s γ). To model beam backgrounds, each simulated event is overlaid with one of a set of of random background data events collected using a periodic trigger.
The signal models used to determine selection efficiencies are based on QCD calculations of references [23] (kinetic scheme) and [27] (shape function scheme) and on an earlier calculation by Kagan and Neubert [9] ("KN"). Each model uses an ansatz for the shape that is constrained by calculations of the first and second moments of the spectra. The models approximate the hadronic mass (m Xs ) spectrum, which contains a number of overlapping resonances, as a smooth distribution. This is reasonable, except at the lowest masses, where the K * (892) dominates the spectrum. Hence the portion of the m Xs spectrum below 1.1 GeV/c 2 is replaced by a Breit-Wigner K * (892) distribution, normalized to yield the same fraction of the integrated spectrum. A particular signal model is defined as the theoretical spectrum for specific HQET parameters, with this K * (892) at low m Xs . The photon energy in the B-meson rest frame is related to m Xs via High-statistics MC signal samples for the non-K * (892) part of the spectrum are generated uniformly in E γ -separately for each of the two B-meson charge states -and then weighted according to any particular model of interest. Monte Carlo samples of B + B − and B 0 B 0 events are needed for background evaluation. They are produced, with nearly three times the effective luminosity of the data sample, and include all known B decays, except for events in which either B decays via B → X s+d γ. Monte Carlo samples of continuum events (qq , separately for cc and for the light quarks, and τ + τ − ) are used to optimize the event selection criteria, but are not otherwise relied upon.

III. ANALYSIS OVERVIEW
The event selection is described in detail in Sec. IV. The analysis begins by selecting hadronic events. A high-energy photon, characteristic of B → X s γ decays, is then required, while photons from π 0 and η decays are vetoed, reducing both the continuum and BB backgrounds. The background from continuum events is significantly suppressed by charged lepton tagging (requiring a high-momentum lepton, as would be expected from the semileptonic decay of a B meson) and by exploiting the more jet-like topology of the qq or τ + τ − events compared to the isotropic BB decays.
The continuum MC simulation does not adequately model the actual continuum background, primarily because it omits QED and two-photon processes. Hence the continuum background is estimated with off-resonance data (Sec. V), which limits the statistical precision of the signal-yield measurement. However, the continuum simulation is used to optimize some of the event-selection criteria (which must be done without reference to actual data). After preliminary event selection, which reduces the unmodeled backgrounds, a simple scaling of the continuum-MC predictions adequately models the eventyield distributions relevant for optimization.
The lepton tagging and event topology criteria do not substantially reduce the BB background relative to the signal, as these processes have similar characteristics. The remaining BB background is estimated using MC simulation. There are several different B-meson decays that contribute. Section VI describes how each significant component is compared to an independent data control sample and weighted to replicate those data. The uncertainty in these weighting procedures is the dominant source of systematic uncertainty.
After the event selection, the continuum and reweighted BB backgrounds are subtracted from the on-resonance data sample, resulting in the raw B → X s+d γ photon spectrum (Sec. VII). The analysis was done "blind" in the range of reconstructed photon energy E * γ from 1.8 to 2.9 GeV; that is, the data were not looked at until all selection requirements were set and the corrected backgrounds determined. The choice of signal range is limited by high BB backgrounds at low E * γ . The regions 1.53 < E * γ < 1.8 GeV and 2.9 < E * γ < 3.5 GeV are dominated by BB and continuum backgrounds respectively. They provide control regions to validate the background estimation for the signal region.
The raw spectrum is used to extract the direct CP asymmetry (Sec. IX) and the partial branching fraction for 1.8 < E γ < 2.8 GeV (Sec. X). Finally, in Sec. XI the effects of detector resolution and Doppler smearing are unfolded in order to measure the shape of the photon energy spectrum in the B-meson rest frame.

IV. EVENT SELECTION
The event selection was developed using MC samples of signal and background events. The model used for signal simulation, as defined in Sec. II, is based on a KN spectrum with m b = 4.65 GeV/c 2 .

A. Selection of Hadronic Events
For each event, the analysis considers good-quality reconstructed tracks, which have momenta transverse to the beam direction of at least 0.1 GeV/c and originate from the vicinity of the interaction point (point of closest approach within 10 cm along the beam axis and 1.5 cm in the transverse plane), and EMC clusters of at least 30 MeV in the laboratory frame. Hadronic events are selected by requiring at least three reconstructed charged particles and the normalized second Fox-Wolfram moment [50] R * 2 to be less than 0.90. To reduce radiative Bhabha and two-photon backgrounds, the number of charged particles plus half the number of photons with laboratory-frame energy above 0.08 GeV is required to be greater than 4.5.

B. Requirements on the High-Energy Photon
The photon selection requires at least one photon candidate with 1.53 < E * γ < 3.5 GeV in the event. A photon candidate is a neutral EMC energy cluster with a lateral moment consistent with that of a single photon [51]. The latter requirement rejects most background from neutral hadrons, which at these energies is dominated by antineutrons that annihilate in the EMC. The photon location is assigned at a depth of 12.5 cm in the EMC, where it is required to be isolated by 25 cm from any other energy deposit (the lateral dimensions of the crystals are approximately 5 cm by 5 cm). The cluster must also be well-contained in the calorimeter (−0.74 < cos θ γ < 0.94, where θ γ is the laboratory-frame polar angle with respect to the direction of the electron beam). A likelihood variable (L π 0 ) based on the energy profile of the EMC cluster is used to suppress the contribution of π 0 's in which the two daughter photons are not resolved. The requirement on L π 0 retains essentially all isolated high-energy photons. These photon quality criteria are determined from studies of photons in µµγ events and of p's (p's) from Λ (Λ) decays. (Antiprotons are used to estimate the detector response to background antineutrons.) High-energy photons that are consistent with originating from π 0 → γγ or η → γγ decays are vetoed if the other π 0 or η daughter is found. For the π 0 (η) veto, combinations are formed of the high-energy photon with all other photon candidates that have laboratory-frame energy greater than 30 (230) MeV; it is required that the invariant mass not lie within a window around the nominal π 0 (η) mass, 115(508) < m γ γ < 155(588) MeV/c 2 .
The simulated distributions of signal and background at this stage of the event selection are shown in Fig. 2(a). The cumulative signal efficiency up to this point is approximately 50%, while 1.6% of continuum and 0.4% of BB backgrounds are retained. The remaining continuum background arises predominantly from unvetoed π 0 and η decays, or initial-state radiation in qq events. The BB background is also dominated by unvetoed decays of π 0 (η) from B → Xπ 0 (η), but also has a significant contribution from misidentified electrons, and smaller components from antineutrons and radiative ω and η ′ decays.

C. Lepton Tagging
About 20% of B mesons decay semileptonically to either an electron or muon, predominantly via B → X c ℓν. An additional 4% of B decays result in an electron or muon via B → X c τ ν. Since the tagging lepton comes from the recoiling B meson, this requirement does not compromise the inclusiveness of the B → X s γ selection.
Electrons are identified with a likelihood algorithm that incorporates properties of the deposited energy and shower shapes of the EMC clusters, the Cherenkov angles associated with the charged particle passing through the DIRC, and the dE/dx energy loss of the track. Muons are identified using a neural-network selector containing variables that discriminate between muons and electrons, primarily through differences in EMC energy deposition, and those which discriminate between muons and hadrons, mainly through differences in IFR signatures.
The left plots of Fig. 3 show that leptons from hadronic decays in continuum events tend to be at lower momentum. Hence the tagging lepton is required to have momentum p * e,µ > 1.05 GeV/c. As seen in the right plots of Fig. 3, additionally requiring the cosine of the CMframe angle between the lepton and the high-energy photon cos θ * γℓ > −0.7 removes more continuum background, in which the lepton and photon candidates tend to be back-to-back. The peak at cos θ * γℓ ≈ 1.0 for electrons in continuum events arises predominantly from π 0 (η) → γγ decays in which one photon satisfies the high-energy photon requirements and the other converts to an e + e − pair. The peaks at cos θ * γ ℓ ≈ −1.0 for the BB background arise from B decays in which the photon and lepton come from the same B. A similar smaller peak for muon tags in signal events is due to pions faking the muon signature. These tag selection requirements are designed as a loose preselection; a more stringent tag discrimination is achieved by the multivariate selectors described in Sec. IV D.
The presence of a relatively high-energy neutrino in semileptonic B decays is exploited by requiring the missing energy of the event (E * miss ) to be greater than 0.7 GeV. The lepton-tag requirements retain approximately 12% of signal and BB background events after the photon selection, while retaining only 2.2% of continuum backgrounds.

D. Event Topology Requirement
As the continuum backgrounds are different for electron and muon tags, each sample is divided according to the tag. For each lepton type the continuum backgrounds are then further suppressed by combining the p * e,µ and cos θ * γℓ for the leptons with event topology variables into a neural-network (NN) discriminant.
Several alternative choices of input variables were considered. For each alternative, the electron and muon NN's are trained, and the requirements on their output parameter optimized (see below). The choice of variables is designed to minimize the total error on the branching fraction and spectral moment measurements, based on combining in quadrature preliminary estimates of statistical, systematic and model-dependence errors. The latter refers to a variation of the event-selection efficiency with the choice of MC spectrum ("model" in the sense of Sec. II) used to compute it. It arises primarily from the increase in efficiency as a function of E * γ ; the stronger this trend, the larger the model-dependence uncertainty. The selection strategy aims for best signal precision, while minimizing the dependence of efficiency on E * γ . Since the backgrounds rise sharply as E * γ decreases, it is impossible to completely eliminate the E * γ dependence. Of several multivariate discriminants (with different sets of input variables) which were found to give approximately the same signal precision, the one resulting in the least E * γ dependence was chosen. The eight topology variables chosen for the NN include R ′ 2 /R * 2 , where R ′ 2 is the normalized second Fox-Wolfram moment calculated in the frame recoiling against the photon, which for ISR events is the qq rest frame. Also included are three momentum-weighted polar-angle moments, L j /L 0 , j = 1, 2, 3, where Here p i and cos θ i are the momentum and angle, respectively, of the ith reconstructed particle with respect to the high-energy photon axis in the recoil frame. Summation over i includes every reconstructed charged and neutral particle except the high-energy photon. The last four topology variables are derived from the eigenvalues (λ 1 , λ 2 , λ 3 ) and eigenvectors of the momentum tensor [52] where p n i is the nth component of the ith reconstructed particle's 3-momentum in the recoil frame. The high- energy photon candidate is excluded. The derived quantities used as NN inputs are: where V max is the eigenvector associated with the largest eigenvalue and z is the electron beam direction.
The electron and muon NN's are trained with MC samples of continuum and signal (KN model with m b = 4.65 GeV/c 2 ) events that contain a photon with energy in the range 1.9 < E * γ < 2.7 GeV. The BB background simulation sample is excluded from the training because this sample is used for background subtraction and is topologically very similar to the signal. Training with background and signal samples normalized to the expected event yields at this stage of the event selection provides slightly better statistical precision for signal (see Sec. IV E) than does training with background and signal samples with the same normalization. For an NN with equally-normalized training samples, the NN output distributions would peak toward 0 and 1, respectively, for background-and signal-like events. Neural-network training based on expected event yields, however, produces output distributions that are qualitatively different, as demonstrated in Fig. 4, which shows the output distributions for signal and continuum events, separated according to lepton tag. Events with an electron (muon) tag are required to have an NN output greater than 0.53 (0.47). This selection accepts 42% of signal events (1.8 < E * γ < 2.8 GeV) that have passed the photon and lepton selection requirements while retaining 1.7% of continuum and 27% of BB background. Events with more than one photon candidate after the NN requirement are discarded (0.16% of signal events).

E. Optimization of the Event Selection
The optimization for the selection criteria was performed iteratively on five variables: the two NN outputs (Sec. IV D), the minimum energy of the lower energy photon in the π 0 and η vetoes (Sec. IV B) and the missing energy (Sec. IV C). The figure of merit (FOM) is the anticipated ratio of the signal yield to its statistical uncertainty for E * γ between 1.8 and 2.8 GeV, taking into account the limited size of the off-resonance sample used for continuum subtraction: Here S, B and C are the estimated yields in the onresonance data of signal, BB background and continuum background events, respectively (after event selection), based on MC simulation, and f off is the fraction of total luminosity accumulated off-resonance, L off /(L on + L off ) = 0.0949. The selection criterion for each of the five variables was optimized in turn, while holding the criteria for the others fixed, and the process repeated until a stable optimal selection was found.

F. Overall Signal Efficiency
The probability that a signal event is observed and survives the event-selection process is approximately 2.5%, while only 0.0005% of the continuum and 0.013% of the BB backgrounds remain in the sample. Figure 2(b) shows the expected signal and background distributions after all selection criteria.
The photon spectrum is measured in bins of reconstructed E * γ . Hence the signal efficiency is presented here in terms of that quantity. The selection efficiency  for MC signal events, i.e., the fraction of the events in a given range of E * γ that survive all the selection criteria described above, is calculated in 100-MeV bins of reconstructed E * γ and also for wide ranges (such as 1.8 to 2.8 GeV). The overall signal efficiency also includes an acceptance component, the probability for the photon to enter the fiducial region of the EMC. This is available only as a function of true E * γ (the photon energy before resolution smearing), since reconstructed E * γ is defined only for accepted photons. However, because the variation of the acceptance efficiency is weak, it can be combined with the selection efficiency to provide an overall efficiency in bins or ranges of reconstructed E * γ . Figure 5 shows the result.

V. CONTINUUM BACKGROUNDS
The continuum background is estimated using offresonance data scaled according to the ratio of the luminosity times the e + e − → qq cross section for the onand off-resonance data sets. Since continuum data are collected 40 MeV below the Υ (4S) resonance, the centerof-mass energy is 0.4% lower than the center-of-mass energies for a typical BB event. In order to account for this difference, the energy of a high-energy photon candidate in off-resonance data is scaled by m Υ (4S) / √ s off , where m Υ (4S) and √ s off are the mass of the Υ (4S) system and the center-of-mass energy of the off-resonance data event, respectively.

A. Overview
The background from non-signal BB events arises either from real photons from the decays of low-mass mesons (with π 0 and η responsible for most of the background) or from other particles faking photons.
The BB background remaining after event selection is estimated using the MC simulation as an approximate starting point. Various control samples are then used to correct most of the significant components of this background according to data/MC yield ratios measured as a function of appropriate kinematic variables. The corrections are applied in 100-MeV bins of E * γ . The uncertainties of these factors (along with small uncertainties from MC statistics) constitute the BB systematic errors. These can be highly correlated between E * γ bins. The remainder of Sec. VI details the individual corrections, as well as a more global correction to the lepton-tagging efficiency.
The event simulation tells us the true (generated) particle that most closely corresponds to the reconstructed high-energy photon candidate. This allows the categorization of selected events according to the origin of that candidate. Table I lists the MC fractions by category and the corresponding correction factors averaged over two broad E * γ intervals, covering the BB control region and the signal region.
B. π 0 and η Corrections About 80% of MC-predicted BB background in the signal region arises from B → Xπ 0 (η) with π 0 (η) → γγ. This contribution is dominated by highly-asymmetric π 0 (η) decays, in which a second photon has much lower energy than the selected high-energy photon. To correct MC predictions for these inclusive B decays in the phase space region selected for the B → X s γ analysis, inclusive π 0 and η samples are defined by applying the same selection criteria but omitting the π 0 and η vetoes. To enhance statistics for these studies the minimum requirement on E * γ is relaxed from 1.53 GeV to 1.03 GeV, and for η's the minimum laboratory-frame energy for the low-energy photon is relaxed from 230 MeV to 75 MeV.
1. Scaling of MC π 0 and η yields to data The yields of π 0 (η) are measured in bins of E * π 0 (η) by fitting the distributions of γγ mass (m) in simulated BB background, on-resonance data and off-resonance data.
The signal shape for π 0 is the sum of two Gaussian functions (G 1 and G 2 ) with different means (µ 1 and µ 2 ) and rms widths (σ 1 and σ 2 ) plus a low-mass power-law I: The BB background composition after all selection cuts, according to the BABAR Monte Carlo simulation, and the correction factors determined for each component. Classification is according to the true MC particle associated with the high-energy photon, and to the true parent of that particle. The "B" category under "Parent" corresponds to high-energy photons from final-state radiation. The "Other" category consists of hadrons other than n's. The "None" category consists of backgrounds unassociated with the primary event, mostly from out-of-time Bhabha-scattering events; such "photons" appear in the simulation via the beam-background mixing described in Sec. II. While all numbers are actually computed and applied in 100-MeV bins of E * γ , they are illustrated here for the overall signal region (1.80 to 2.80 GeV) and BB control region (1.53 to 1.80 GeV). The "Subsection" column refers to where each correction is discussed. Note that the π 0 and η correction factors implicitly include the tagging efficiency correction described in Sec. VI H; this tagging correction is not included elsewhere in the where m 0 ≡ (µ 1 − λσ 1 ), A and f 1 govern the normalizations of the two Gaussian functions, and B is set by requiring continuity at m = m 0 . The signal shape for η is a single Gaussian with two such power-law tails with separate parameters.
The fit is carried out in several stages. First, a signal shape is determined for BB MC events in which the reconstructed γγ pair derive from a true π 0 or η. For purposes of this study, these events are termed "signal". Next, for both MC and on-resonance data events, the mass spectrum of all γγ pairs which include the highenergy photon is fit in the π 0 (η) mass region to signal plus a background shape, with some signal tail parameters fixed to their values from the signal-only fit. This procedure is validated by comparing the extracted signal yields from this MC fit to those of true signal: averaging the absolute values of the differences over energy bins, the agreement is 1.3% of the yield for π 0 and 2.1% for η. The fits to on-resonance data are shown in Figs. 6 and 7. Finally, the off-resonance data are fit with all signal-shape parameters fixed to their on-resonance fit values, with only the signal yield and background parameters left free.
Then, in each E * π 0 (η) bin, the π 0 (η) correction factor is the ratio of the on-resonance minus luminosity-weighted off-resonance π 0 (η) yield to the luminosity-weighted MC π 0 (η) yield. Systematic uncertainties from the fit are found by individually varying the fixed parameters in the on-resonance data fits, and also allowing for the MC fitvalidation checks. The resulting correction factors and their uncertainties are shown in Tables II and III. Correction factors to the BB MC predictions in 100 MeV bins of E * γ , along with their uncertainties and correlations, are determined by applying the above factors event-by-event to MC events passing the B → X s γ selection criteria.  For the first few bins the signal shape doesn't precisely reproduce the center of the peak, an effect also seen in fits to MC π 0 signal only, but this does not affect the integrated signal yield.

Additional corrections for low-energy photon efficiency
While the procedure described above accounts for data-MC differences in the produced π 0 and η yields after the full selection, including the efficiencies for lepton tagging and for detecting the high-energy photon, it does not properly account for data-MC differences in the detection efficiency for the low-energy photon from a π 0 or η decay. This is because the fits to the samples studied above count events in which that photon is detected and forms a γγ pair in the π 0 (η) mass peak, whereas in the B → X s γ analysis a B → Xπ 0 (η) background event is accepted if the low-energy photon is not found (or forms a reconstructed γγ pair mass outside the veto window). Thus the procedure corrects in the wrong direction for data-MC differences in low-energy photon detection efficiency.
Correcting for low-energy photon efficiency is another multi-step process. First, BABAR measurements of π 0 detection efficiency are taken from studies of the initialstate radiation (ISR) process e + e − → ωγ with ω → π + π − π 0 . Here the precise knowledge of the beam energies and the measured charged pions and high-energy ISR photon allow the four-momentum of the π 0 to be predicted. The measured efficiency difference between data and MC events is adjusted to match the π 0 CM-frame momentum distributions for B → Xπ 0 background in the B → X s γ analysis and for the inclusive-π 0 studies described in section VI B 1. The result is a data-MC fractional efficiency difference of (−4.1 ± 0.7)% for the B → X s γ selection and (−3.5 ± 0.6)% in the inclusive π 0 studies. Part of these data-MC efficiency differences are accounted for by a data-MC difference of (−1.15 ± 0.65)% measured for the high-energy photon, as detailed in Sec. X A 1 below. Subtracting this and combining the errors in quadrature leaves (−2.95 ± 0.95)% (B → X s γ selection) and (−2.35 ± 0.9)% (B → Xπ 0 selection) as due to the low-energy photon.
Finally, the B → Xπ 0 samples are used to separately study the roughly 25% of low-energy photons in the current measurements that have laboratory-frame energies below 80 MeV. This is necessary because, in order to suppress backgrounds, the ISR analysis effectively covers cosines of the π 0 helicity angle (which equals the decay energy asymmetry) only up to about 0.9. Because of this, low-energy photons below ≈ 80 MeV are not ade-quately represented in the ISR analysis. The data/MC ratios for B → Xπ 0 samples are sensitive to branching fractions and detection efficiencies for high-energy and low-energy photons. These ratios in π 0 energy bins can be used to determine the relative efficiency corrections for low-energy photons below 80 MeV compared to those above 80 MeV, since both sets of low-energy photons derive from π 0 mesons with the same kinematic properties, and the accompanying high-energy photons hardly differ. This is accomplished by separately applying the π 0 mass-spectrum fitting technique for π 0 mass combinations involving low-energy photons in these two regions. An additional data-MC fractional efficiency correction of (−3.6±1.1)% is derived for only those π 0 decays involving these photons below 80 MeV. There is no corresponding effect for η's, where the minimum photon energy is always at least 75 MeV.
To determine the effect of these low-energy-photon efficiency differences on the analysis, the BB simulation is rerun with the specified fractions of low-energy photons from π 0 (η) decays discarded. The result is an additional factor of 1.105 ± 0.029 for the π 0 component of BB background in the B → X s γ analysis, and 1.041 ± 0.015 for the η component. The π 0 and η errors are mostly correlated. These factors multiply those obtained from the inclusive π 0 (η) data/MC yield comparisons.

C. Other Meson Decays
Radiative decays of inclusively produced ω (in the π 0 γ mode) and η ′ (in various decay modes) can lead to highenergy photons not already accounted for among the inclusive π 0 's. As seen in Table I, these contribute several percent of the simulated BB background. We have studied inclusive ω and η ′ production in Υ (4S) events. Correction factors are determined in bins of CM-frame meson momentum (p * ω or p * η ′ ) as the ratios of measured inclusive branching fractions to the values used in the MC simulation for the current analysis.
The ω measurements cover the p * ω range from 0 to 2.25 GeV/c in 0.25 GeV/c bins. Correction factors range from 0.7 to 1.3, with uncertainties averaging 0.17.
Results for η ′ are divided into two regions of reduced Both ω and η ′ corrections are applied event-by-event in the BB simulation in order to obtain correction factors in E * γ bins.

D. Electron Backgrounds
Electrons and positrons contribute to the photon background in two ways (see Table I). First, there are events in which the reconstructed photon is from hard bremsstrahlung from an e ± interacting with the material in the inner portion of the BABAR detector (beam pipe, SVT, and material between the SVT and the active area of the DCH). Second, there are events in which the reconstructed photon is faked by an electron due to a failure to reconstruct a track or to match a track to the calorimeter energy deposit. The primary source of the e ± in both of these categories is semileptonic B decay.
The bremsstrahlung process is reliably simulated by GEANT4, so there is no correction to the simulation for this background. But a 3% systematic error is assigned based on the precision with which the amount of detector material has been measured.
The misreconstructed electron background is measured using a tag and probe method with B → XJ/ψ(J/ψ → e + e − ) data. This sample closely models the particle multiplicity in B → X s γ events. The J/ψ in this decay mode is normally reconstructed by requiring two electrons with tracks associated with EMC clusters. If the track is misreconstructed there will still be a cluster but without an associated track. In this case the J/ψ is reconstructed from this unassociated cluster along with the other electron, which has a track matched to a cluster. Because either of the two leptons could have a misreconstructed track, the track inefficiency may be measured as where N (J/ψ(eClus, eTrk)) and N (J/ψ(eTrk, eTrk)) are the numbers of J/ψ → e + e − events with one and two reconstructed tracks, respectively. These yields are extracted from fits to distributions of e + e − invariant mass, computed from the four-momenta of the track found for one lepton (the "tag") and the EMC cluster for the other. The value of 1 − ǫ is compared between data and MC samples to derive a correction factor for the simulation. There is a large combinatoric background in the onetrack (eClus, eTrk) sample due to actual photons. However, when an electron track has been misreconstructed there are still a number of DCH hits around the trajectory from the vertex to the EMC cluster. The background is significantly reduced by requiring a minimum number of 20 hits in a road of 1-cm radius around this trajectory. Figure 8 shows an example of fits to the e + e − mass combinations corresponding to the numerator and denominator of Eq. (7) for data and MC simulation. The mass is computed from the track associated with a tag lepton and the EMC cluster associated with the other lepton; hence (eTrk, eTrk) combinations are entered twice, with different masses, once for each tag. The simulation underestimates the fraction of misreconstructed tracks by a factor of 1.57 ± 0.27(stat) ± 0.22(syst), where "stat" and "syst" denote the statistical and systematic uncertainties, respectively. The systematic error comes predominantly from uncertainties in the line shape assumed in the invariant mass fit and from varying the requirements on the road width and the number of DCH hits. Consequently, the MC estimate of the BB background to B → X s γ from misreconstructed electrons is increased by a factor of 1.57 ± 0.35.

E. Antineutrons
The only significant hadron background to high-energy photons is from antineutrons, which have a neutral signature and can, by annihilating in or just before the EMC, deposit a large amount of energy. A large fraction of such background is removed by the requirement on maximum lateral moment (Sec. IV B). There are two sources of potential bias in the predicted yield: the inclusive B → Xn branching fraction and n momentum spectrum in the event simulation, and the GEANT4 simulation of the deposited energy and its distribution in the EMC. Because it is not possible to identify or measure the fourmomentum of an n in the BABAR detector, there are no control samples of n's available to study these effects. Hence estimates of their size have been based on comparison of data to simulated events involving B decays to p's.
The inclusive n production spectrum in the BB simulation is corrected by the ratio of a measured inclusive p spectrum to its corresponding simulation. Correction factors are applied as a function of CM-frame antibaryon momentum. They are close to 1.0 at momenta above about 0.9 GeV/c, increasing to 2.0 for momenta from 0.5 GeV/c down to the lowest measured momentum of about 0.3 GeV/c. Uncertainties are typically 8% to 12%. Below 0.3 GeV/c, a factor of 2.0 is assigned, with a larger uncertainty. In addition, while the production of p and n from direct B decays is related via isospin conservation, many of the antibaryons arise from decays of ∆'s or hyperons, which would require separate correction factors. An additional uncertainty of 3% accounts for differences in fractions of direct B vs. ∆ vs. hyperon parentage of n and p.
Control samples of p's from the decay of Λ's are used to compare data and MC EMC response to p's as a function of laboratory-frame p momentum. Most p's are rejected by imposing the same upper limit on the lateral moment of their EMC energy deposition pattern as used in the B → X s γ photon selection. Correction factors are determined in bins of laboratory-frame momentum p p vs.
x EMC , where is that fraction of the total energy from annihilation on a nucleon that is deposited in the EMC. Corrections are computed as the ratio of data to MC probability distribution functions (PDFs) for x EMC > 0.5, the only region that can yield an apparent E * γ above 1.53 GeV. The primary data-MC differences result from the larger average lateral moment in data, an effect accentuated by restricting the lateral moment to low (photon-like) values. Hence the data have a considerably smaller proportion of p's satisfying the selection than is the case for MC events. This inaccuracy of the simulation, and to a lesser extent an overestimate of the energy deposit itself, increases with increasing x EMC , hence the data/MC correction factor becomes small as x EMC increases. Figure 9 illustrates the p correction factors in this twodimensional space. Note that in inclusive B decays there are relatively few antibaryons with laboratory-frame momentum above 1.5 GeV/c. There are several difficulties in applying these results to antineutrons. First, because of energy loss in the beam pipe and inner detector components, p's do not provide useful energy-deposit information for laboratory-frame momenta below 0.5 GeV/c, whereas one-third of n's from B decay have momenta below 0.5 GeV/c. A constant extrapolation of correction factors to lower momenta is assumed, with a systematic uncertainty set by including an additional factor of 1/2. Second, p's enter the EMC crystals at a larger angle of incidence than do n's, because of the magnetic field, resulting in a larger lateral moment for p's with p T < 0.7 GeV/c than for n's. A systematic uncertainty is assigned by increasing correction factors with laboratory p p in this region to their values at just-higher, unaffected, p p . Third, because of a mistake in the version of GEANT4 implemented in BABAR, simulated p's that stop before annihilating do not then annihilate. This has been dealt with by increasing the MC PDFs (decreasing the correction factors) according to the fraction of p's that annihilate for a given momentum. Half of this correction is adopted as its systematic uncertainty.
Correction factors to the simulated n background in E * γ bins are computed by applying event-by-event corrections for both the branching fraction and the EMC response. Systematic uncertainties are obtained by redoing this for each of the systematic changes outlined above. The resulting correction factors vary from about 0.4 to 0.04 as E * γ increases from 1.53 to 2.8 GeV, with uncertainties ranging from 1/4 to 1/2 of the correction factors.

F. Final-State Radiation
Final-state radiation, most importantly from leptons, is incorporated into the BB background simulation with PHOTOS [53]. The contribution is labeled as having B parentage in Table I. No correction is applied for this small component. Radiation from light quarks during the hadronization process is not incorporated into the simulation. However, this contribution was computed for the previous B → X s γ analysis [42], where a photon spectrum based on the calculation in Ref. [54] was passed through the detector simulation and selection criteria. This contribution was found to be less than 0.3%.

G. Semileptonic Branching Fraction
The dominant source of tagging leptons above the minimum required momenta (Sec. IV C) in both signal and BB background events, and also of electrons that fake high-energy photons (Table I) is the semileptonic decay of B mesons. The MC simulation models B semileptonic decays as a sum of exclusive processes. But this sum does not accurately reproduce inclusive measurements of semileptonic decays [55]. A BABAR inclusive electron measurement [56,57] is used to renormalize the simulated branching fractions as a function of CM-frame lepton momentum p * ℓ . Figure 10 shows the data and MC points and their ratio. Correction factors are applied based on the polynomial fit. For most leptons relevant to this analysis the correction is larger than unity.
This correction enters in two places in the analysis. First, it affects tagging efficiency. By integrating over all lepton tags in events passing selection criteria, a correction factor of 1.047 ± 0.013 is obtained, for B → X s γ signal events, while for the BB MC sample the factor is 1.051±0.013. This correction is independent of E * γ . However, the procedure for normalizing the π 0 and η background components to data implicitly takes this into account. Hence the correction is applied only to other BB components. (However, the corrections given in Table I for these components are derived before applying this additional semileptonic correction.) In addition to its effect on lepton tagging, the semileptonic correction affects the two backgrounds in which an e ± fakes a high-energy photon. The corrections (which are included in Table I along with the e ± corrections described in Sec. VI D) depend upon E * γ ; their average value for both backgrounds is 1.058 ± 0.013.
The two effects are taken to be fully correlated in computing their contribution to the overall BB yield uncertainty.

H. Overall BB corrections
The above subsections describe corrections by BB component for all but a few percent of the predicted  Table I. Several other small categories (e.g., "J/ψ" and "Other") are left as-predicted. Finally, several small corrections computed in the context of signal efficiency are also applicable to BB backgrounds: a high-energy photon efficiency correction of 0.9885 ± 0.0065 (Sec. X A 1), and a correction of 0.989 ± 0.004 for lepton identification efficiency in a multiparticle environment (Sec. X A 3). Like the semileptonic tag correction, these need only be applied to the 20 to 25% of B backgrounds other than π 0 or η, and hence are small effects. More significant is a global factor of 0.991 ± 0.004 from different probabilities between MC and data events of the π 0 veto being activated by a background photon. Uncertainties also include a small contribution from BB MC statistics.
The BB corrections described above are applied to each component and for each 100 MeV bin of E * γ . Correlations between bins, due both to E * γ -independent corrections and to corrections dependent upon parent energies, are tracked, resulting in a table of corrected BB yields and a correlation matrix. This information is used to compute the results presented in the next section. The largest systematic uncertainties on the BB yields are those due to the low-energy photon correction to the π 0 and η components, with uncertainties in the no-track electron component and the π 0 inclusive spectrum next most significant. Figure 11 shows the photon energy spectrum in data after background subtraction. Table IV gives the signal yields and background estimations in bins of E * γ . The bin-to-bin correlations between the errors on the signal yields are given in Table V. The continuum background is estimated with off-resonance data, while the BB background is estimated from MC simulation, with all the corrections described in Sec. VI applied.

VII. SIGNAL YIELDS AND VALIDATION OF BACKGROUND ESTIMATION
To validate the background estimation, two control regions are set aside in the photon spectrum. In the upper control region (2.9 < E * γ < 3.5 GeV), the event yield after subtracting continuum and BB backgrounds is −100 ± 138 (stat) ± 14 (syst) events, where the statistical uncertainty results from off-resonance subtraction. The systematic error is from the uncertainty of out-oftime Bhabha-scattering events in BB background (see Table I caption). This subtracted yield is consistent with the expectation of zero events.
In the lower control region (1.53 < E * γ < 1.8 GeV), there remain 1174 ± 272 (stat) ± 828 (syst) events after background subtraction. The errors in the BB estimates in these E * γ bins are highly correlated; these correlations have been included when computing the control-region systematic error. The agreement with zero in this region is at the 1.4σ level, assuming no signal events. However this energy region contains a few hundred signal events, with the exact number depending on the assumed signal The event yields in bins of E * γ . The continuum background is estimated from off-resonance data normalized to on-resonance luminosity. The BB background is estimated using Monte Carlo simulation, corrected as described in Sec. VI. The extracted signal yield is computed by subtracting the continuum and BB backgrounds from the on-resonance data yield. It is quoted with statistical uncertainties (from on-resonance minus off-resonance subtraction) and BB systematics. The last set of rows show yields in wide E * γ bins, taking into account the correlations of BB backgrounds between 100-MeV bins. model. For example, using predictions based on the kinetic and shape function schemes with parameters close to HFAG's world-average values [25], on average about 275 signal events would be expected in the lower control region. Allowing for this, the data-background difference is reduced to the 1.0σ level.

VIII. OBTAINING PHYSICS RESULTS: AN OVERVIEW
Three physics results are extracted from the measured signal yield: • the CP asymmetry, A CP (B → X s+d γ), • the inclusive branching fraction, B(B → X s γ) (for several wide ranges of true E γ in the B-meson rest frame), and • the true spectral shape and energy moments for B → X s γ (in both the CM frame and the B frame).
The presence of new physics beyond the SM can affect the branching fraction and A CP . The spectral shape, however, depends only on the dynamics of the b quark within the B meson; it is independent of any new physics contributions. Three different approaches are optimal for the three physics results. The branching fraction and spectral shape measurements require corrections for efficiency. The partial branching fraction for signal in any range of measured photon energy E * γ is obtained from the signal yield S in that same range by where ǫ sig is the signal efficiency for that range and N BB is the number of BB events in the on-resonance data set before event selection. B(B → X s γ) is obtained from this by removing the small constant fraction contributed by B → X d γ. Applying Eq. (9) brings in additional systematic uncertainties related to the efficiency and to N BB . The inclusive branching fraction and spectral shape measurements are made in terms of reconstructed E * γ in the CM frame, while theoretical predictions are made for true photon energy E γ in the B frame. These differ due to resolution and Doppler smearing. The measurements must be converted to corresponding measurements in terms of true E * γ or E γ , in order to allow for detector-independent comparisons. Efficiency factors and also the transformation from one definition of photon energy to another depend upon the choice of signal model, i.e., on the values of the HQET parameters in the kinetic or shape function scheme. HFAG [25] has extracted world-average values of these parameters by combined fits to measurements of B → X c ℓν decays and previous B → X s γ measurements. For the present inclusive branching fraction measurement the range of models considered is based on these HFAG central values and errors. On the other hand, for the spectrum measurement such a restriction would prejudice the results; the range of models considered must instead be driven by the data. Put another way, for the branching fraction measurement the MC model plays a subsidiary role, used only to estimate the efficiency and transformation factors, so it makes sense to use the best available information to constrain the model, while for the spectrum the model is itself the object of the measurement. With these procedures, the model-dependence uncertainties for both measurements are small compared to the combined statistical and systematic uncertainties.
In Fig. 12 predictions of three models are superimposes on the measured data. The first resembles the data for measured E * γ above 1.8 GeV. The second, which has HQET parameters very close to the HFAG world-average values in the kinetic scheme, is about one standard deviation ("1σ") below the data in the first few energy bins above 1.8 GeV, where BB background is large. The third is somewhat more than 1σ above the data in this region. Differences between data and a particular model may be due either to the model being an incorrect description or to systematic fluctuations in the BB background contribution. This recognition is a key element of the approaches used to measure both the branching fraction (see below) and the shape of the true energy spectra (Sec. XI A).
Branching fraction results are determined for E * γ > 1.8 GeV. The branching fraction is computed by applying Eq. (9) to a single wide bin, e.g., 1.8 < E * γ < 2.8 GeV, using the average efficiency ǫ sig computed for an HFAGbased model. If 1/ǫ sig factors were instead applied in 100-MeV bins, the smaller values of ǫ sig at low energies (Fig. 5) would amplify the larger systematic uncertainties on the event yield in this region as well as any data-model differences, in effect translating possible background fluctuations into a larger branching fraction bias. Because of the energy-dependent ǫ sig , statistical precision also improves with fewer bins. Note also that the model dependence of the branching fraction computed using 100-MeV bins is comparable to that for a wide bin. Thus, overall, the wide-bin approach is both more accurate and more precise. Full details are in Sec. X.
In contrast, the spectral shape must be determined by applying Eq. 9 in each 100-MeV bin of reconstructed E * γ . This is the first step of a four-step unfolding procedure, detailed in Sec. XI, leading to the true photon energy spectra in the CM and B-meson rest frames. Each model shown in Fig. 12 is used in all four steps, to obtain the measured spectrum and its model dependence. Energy moments and their correlations are computed from the unfolded spectra. This information is a needed input to the HFAG fitting procedure, and may facilitate other potential comparisons with theory.
The effects of efficiency and smearing cancel in the extraction of A CP . A raw asymmetry is thus directly computed from the measured yields vs. E * γ , using the lepton charge to tag B vs. B mesons. Systematic corrections and uncertainties arise only from possible charge dependence of the efficiencies (which would be a bias), as well as from mistagging (which dilutes the asymmetry). The full A CP analysis procedure is described in Sec. IX.

IX. MEASUREMENT OF DIRECT CP ASYMMETRY
The direct CP asymmetry, A CP (B → X s+d γ) is measured by dividing the signal sample into B and B decays according to the charge of the lepton tag and computing where N +(−) are the positively (negatively) tagged signal yields. Figure 13 shows these yields vs. E * γ . The asymmetry must be corrected for the dilution due to the mistag fraction ω: As can be seen in Fig. 2(b) and Table IV, the BB background decreases at higher photon energies. It was determined (prior to looking at the data) that restricting the A CP signal region to 2.1 < E * γ < 2.8 GeV optimizes the  statistical precision, and also the total precision including the uncertainty on the BB background asymmetry described below. Other systematic uncertainties on A CP have negligible variation with E * γ . The theoretical SM prediction of a near-zero asymmetry is not affected for a minimum-energy requirement of 2.1 GeV [9,58]. All of the other selection requirements (Sec. IV) were found to be optimal also for the A CP measurement.
To correct for dilution we compute the mistag fraction The largest contribution is from B 0 −B 0 oscillation, with mixing probability χ d = 0.1863 ± 0.0024 [55]; the factor of 1/2 accounts for the B ± mesons, which do not oscillate. Smaller contributions are ω cascade = 0.0328±0.0035, the fraction of events with wrong-sign leptons from the B decay chain, and ω misID = 0.0073 ± 0.0037, the mistag fraction due to misidentification of hadrons as leptons (almost entirely in muon rather than electron tags). Their values are taken from the MC simulation averaging over electron and muon tags. An additional uncertainty in ω arises because our MC simulation assumes B(Υ (4S) → B 0 B 0 ) = 0.50 which leads to the factor of 1/2 in the first term of Eq. (13). The measured value is B(Υ (4S) → B 0 B 0 ) = 0.484 ± 0.006 [55] so we take as a systematic the difference between the measured and assumed values, ∆ω = 0.016χ d . This and the errors on χ d , ω cascade and ω misID are added in quadrature to give ω = 0.131 ± 0.006. The uncertainty in the BB background estimation described in Sec. VI cancels in the numerator of Eq. (10) but not in the denominator, leading to an uncertainty in A meas CP of 0.022. This uncertainty is combined with the uncertainty in ω to give a multiplicative systematic uncertainty on A CP (B → X s+d γ) of 0.029A CP . Table VI summarizes all of the contributions to ω and to this uncertainty.
The measured asymmetry could be biased if there were (a) an asymmetry in the BB background not modeled in the simulation or (b) a charge asymmetry in the lepton tag efficiency. To assess the potential bias due to BB subtraction, we use the data in the control region 1.53 < E * γ < 1.8 GeV. where the signal yield is much smaller than BB background. After continuum subtraction, A meas CP (B control) = 0.006 ± 0.009(stat). Interpreting this as a bias, it translates to a correction for the A CP signal region of ∆A meas CP (B → X s+d γ) = −0.004 ± 0.006. The B → π 0 X background sample described in Sec. VI B is used to confirm that there is no E * γ dependence to this correction in the signal region. Lepton charge tag asymmetries have been measured in e + e − → e + e − γ, e + e − → µµγ and B → K ( * ) J/ψ(ℓ + ℓ − ) events. No significant asymmetries are observed to a precision of 0.011, which is assigned as a systematic error on A meas CP (B → X s+d γ). Table VII summarizes these additive systematic effects, showing a combined error in quadrature of 0.013.
Since the SM prediction of A CP ≈ 0 depends upon cancellation of B → X s γ and B → X d γ asymmetries, a difference in their selection efficiencies could also cause a bias. We have used MC simulations with the same underlying model (KN with m b = 4.65 GeV/c 2 ) to compare selection efficiencies following sq vs. dq hadronization. For E * γ > 2.1 GeV, the B → X d γ efficiency is larger by a factor of 1.028 ± 0.014, so we conservatively assign a 4.2% uncertainty (MC central value plus one standard deviation) in the yield of B → X d γ events. Given the SM-predicted yields and asymmetries [12], that would change A meas CP by less than 0.0002, which is negligible. Finally the A meas CP (B → X s+d γ) is corrected for mistags and bias to give where the two systematic errors have been combined in quadrature. The result is consistent with no asymmetry.

X. MEASUREMENT OF B(B → Xsγ)
As discussed in Sec. VIII, B(B → X s+d γ) is measured by applying Eq. (9) to a single wide bin in measured E * γ . Results are computed for three choices of energy range: 1.8 to 2.8 GeV, 1.9 to 2.8 GeV and 2.0 to 2.8 GeV. Note that ǫ sig here means the overall signal efficiency, including both acceptance and event-selection, as discussed in Sec. IV F. A small adjustment, by a factor α which is close to 1.0, converts each result to a branching fraction in the same range of the true E γ in the B-meson rest frame. This corrects for the effects of EMC resolution and Doppler smearing. Finally, the factor 1/(1 + (|V td |/|V ts |) 2 ) is applied to account for the contribution of B → X d γ events, yielding a branching fraction for B → X s γ only.
Section X A describes systematic corrections and uncertainties affecting the efficiency ǫ sig in Eq. (9), and computes the total fractional systematic uncertainty on the branching fraction. The choice of the central values for ǫ sig and α depend upon the choice of the signal model used in MC simulation. Section X B addresses this choice and determines the model-dependence uncertainty of the branching fraction. Section X C presents branching fraction results first in terms of measured E * γ , then presents the conversion to the branching fraction in the B-meson rest frame, along with associated uncertainties.

A. Systematic Corrections and Uncertainties
Each of the factors in Eq. (9) can contribute to the uncertainty in the branching fraction. The signal yield has contributions from statistics (of the on-peak and offpeak data yields) and from the systematics of the BB background subtraction. The number of produced Υ (4S) events, N BB , has a systematic uncertainty of 1.1%. The focus here is on the systematic uncertainty of the remaining factor, the signal efficiency ǫ sig . For each eventselection criterion, an efficiency is computed using MC simulation. But the actual efficiency in data may differ from that in the simulation. Systematic corrections are determined by comparing data to MC events for various control samples; the precision of each comparison provides a systematic uncertainty. A summary of these corrections and uncertainties is presented in Table VIII.

Systematics of the High-Energy Photon Selection
Two dedicated studies of high-energy photon detection efficiency have been done using µµγ ISR events. These events are overconstrained, so the measured µ + and µ − tracks, along with known beam kinematics, can be used in a one-constraint fit to predict the three-momentum of the photon. Naively one would look for a detected photon "close" to this predicted photon, and the data/MC correction would be the ratio of the probability of finding such a photon in µµγ data events to the probability of finding one in µµγ MC events. However, this is complicated by the effects of EMC resolution and by the possibility that the likelihood of photon conversion (in detector material) isn't accurately simulated. The earlier and more recent of the µµγ studies took rather different approaches to these issues. The first applied acceptance criteria (particularly a minimum energy) to detected photons, and folded EMC resolution into the predicted photon properties before making the same cuts. That study also in effect measured the conversion fraction, separately for data and MC samples. The second study did not use acceptance cuts for the detected photon, instead loosely matching its parameters to those of the predicted photon, and used an electron veto to suppress photon conversions. Results of the two studies are in good agreement, with the data/MC efficiency corrections differing by 0.3% when weighted by the B → X s γ photon polar angle distribution. Systematic uncertainties on these corrections are 0.65% and 0.55%. The two correction factors are averaged, giving 0.9885, and an uncertainty of 0.65% is assigned. The assigned correction and uncertainty are independent of the photon energy E * γ . Hence they affect the branching fraction, but not the spectral shape or energy moments.
The µµγ samples from data and MC simulation are also used to assess the photon energy scale and resolution, by comparing the distributions for data and MC events of the ratio of detected to predicted photon energy. For the energy scale, the energy balance in the decay B 0 → K * (892)(→ K + π − )γ is also used. After small energy scale adjustments already included in event reconstruction, both processes show no remaining bias for either MC or data events, with a conservative uncertainty of 0.3%. For photon energy resolution, inclusion of an additional 1% energy smearing of MC photons brings the µµγ ratio distribution into good agreement with that for µµγ data. This is taken as a systematic uncertainty. The energy scale and resolution effects translate into the small uncertainties on the inclusive branching fraction shown in Table VIII.
Lastly, the µµγ samples are used to assess shower shape, in particular the efficiency of the selection cut on lateral moment. After a small adjustment of the simulated lateral moment, there is good agreement between MC and data efficiencies of this selection, with the uncertainty given in Table VIII. The high-energy photon efficiency is calibrated using the low-multiplicity µµγ events, but could also be affected by the hadronic-event environment in BB events (including signal). The requirement that the high-energy photon be isolated from any other EMC energy deposition by at least 25 cm is meant to reduce data-MC efficiency differences. The systematic uncertainty of 2% is estimated by embedding high-energy photon signatures into hadronic events, separately for data and MC samples, and determining the fractions of events passing the isolation requirement.

Systematics of the π 0 and η Vetoes
The π 0 and η vetoes can remove events not only if the high-energy photon originates from an actual π 0 or η, but also if there is a random ("background") photon with which the high-energy photon forms a γγ invariant mass combination lying inside one of the veto windows. The efficiencies of the vetoes for simulated events can differ from those for data if the number of background photons in simulation differs from data. Off-resonance-subtracted data and BB MC events are compared for high-energy photons in the control region below 1.8 GeV, with all selection criteria except the vetoes applied. Sidebands of the γγ mass windows are used to estimate the numbers of low-energy background photons that result in masses inside the windows. It is found that there are more such low-energy photons in the data than in the simulation (as much as 8% more at the lowest energies, below 80 MeV, decreasing monotonically with photon energy to approximately 2.5% above 250 MeV).
Monte Carlo studies are used to correct for the effects of these differences on event-selection efficiency when the vetoes are imposed: −0.4% for signal events, and −0.9% for nonsignal generic BB events. Uncertainties are taken to be half of the corrections. Differences between π 0 and η line shapes in data and simulated events could also potentially affect the BB efficiencies, but such differences proved to be negligible.

Systematics of the Lepton Tag Efficiency
There are two contributions to signal efficiency systematics from the lepton tagging. The first is the uncertainty in the semileptonic branching fraction (for the nonsignal B in the event), averaged over the lepton acceptance for the current analysis. This is addressed in Sec. VI G, and results in a systematic correction and uncertainty of 1.047 ± 0.013. The second contribution arises from possible differences between data and MC samples in the lepton identification efficiencies. These identification efficiencies in the simulation are calibrated as a function of lepton momentum to those in data using control samples of lowmultiplicity (Bhabha and µµγ) events. To measure the additional effect of the high-multiplicity environment in signal events, fitted J/ψ yields are compared in data and MC samples of reconstructed B → J/ψ (J/ψ → ℓ + ℓ − ) events, both with and without particle identification requirements applied to the leptons. This is done separately for e + e − and µ + µ − decays. The resulting systematic correction factor for a single lepton, averaged over the mix of electron and muon tags in the current analysis, is 0.989 ± 0.004. This result is also included for the BB background systematics in Sec. VI H.

Other Uncertainties in Event-selection Efficiency
A systematic uncertainty is assigned to the MC computation of the efficiency of the neural-network selection criteria. The control samples used to compare data and MC efficiencies are inclusive π 0 samples, created by applying the standard event selection criteria to data and to BB background events, but with the π 0 veto inverted, i.e., an event is accepted if it has a γγ mass combination inside the veto window. The γγ mass spectra confirm that most of these events are due to actual π 0 production. Off-resonance-subtracted data are compared to the simulated BB sample. The efficiencies of the neuralnetwork criteria for signal MC and BB background MC events show similar increases with E * γ . To validate use of the π 0 control sample, neural-network output distributions for signal and control samples were compared in a narrow range of 1.8 < E * γ < 2.0 GeV and found to be quite similar. Data-MC efficiency comparisons for the control samples are made separately for the electron and muon neural networks, and differences are weighted by the fractions of electron and muon tags in the standard event selection. This average difference of 1.2% is taken as a systematic uncertainty.
Lastly, the signal efficiency has some small variation with the specific final hadronic X s state. The overall efficiency is thus sensitive to whether the JETSET model implemented in the simulation properly describes the hadronization process. Measured data-MC differences from the BABAR sum-of-exclusives B → X s γ analysis [41] are used to reweight the hadronic multiplicity distribution of the simulated X s final state, and, separately, the fraction of final states which contain at least one π 0 . Each efficiency change is taken as a systematic uncertainty. Combining the two effects in quadrature, the total systematic uncertainty due to modeling of the hadronization process is 1.1%.

Overall Efficiency Systematics
Table VIII summarizes the efficiency corrections and their estimated uncertainties. Nearly all of these effects are independent of photon energy E * γ , so the tabulated values apply both to wide bins and 100-MeV bins. The only exceptions are the small energy-scale and resolution uncertainties, which are folded into the yield spectrum (Fig. 11); the Table presents the values for a bin from 1.8 to 2.8 GeV. The correction factors are included in all values of efficiency quoted subsequently in this paper.

Combining Yield and Efficiency Uncertainties
Table IX summarizes all systematic uncertainties for the branching fraction measurement.
The fractional branching fraction uncertainty due to BB background is energy-dependent primarily because the ratio B/S of background yield to signal yield decreases sharply with increasing E * γ .
Similar contributions to efficiency affect the MC computations of both the BB background yield B and the signal efficiency ǫ sig , so some systematic uncertainties are common to both and hence are treated as correlated in evaluating Eq. (9). Because of the direct calibration of π 0 and η contributions to the BB background yield against data, some correlated effects are reduced to an insignificant level. We consider these remaining correlated effects: • the systematic uncertainty due to high-energy photon efficiency, which enters the BB yield predominantly via the low-energy photon efficiency correction to the π 0 and η components; • the π 0 (η) veto efficiency, which affects all background components; • the semileptonic branching fraction, which for BB backgrounds affects lepton tags for non-π 0 /η components, and also those events in which an electron fakes the high-energy photon signature.
These correlated effects result in a cross-term between the uncertainties in ǫ sig and B of 0.0178 B/S for the energy ranges considered in Table IX. Like the BB yield contribution itself, this decreases with increasing E * γ . For the 100-MeV bins used in the spectrum measurements (Sec. XI), an additional energy dependence is allowed for in the semileptonic branching fraction cross-term. It arises because the variation of the uncertainty with lepton energy given in Fig. 10 directly applies to the electron backgrounds. For each of the three cross-term contributions, the uncertainty is treated as fully correlated between energy bins, and the three corresponding error matrices are then summed.
The total systematic uncertainty on the branching fraction, also given in Table IX, is the sum in quadrature of the contributions from yield, efficiency, cross-terms and N BB .

B. Model-dependence Uncertainties of the Signal Efficiency
The signal efficiency ǫ sig is estimated with MC simulated spectra. The central value depends on the B → X s γ model chosen, and thus has an associated modeldependent uncertainty. HFAG [25] has provided world average values of the HQET parameters m b and µ 2 π (and others) in the kinetic scheme, obtained from a combined fits to measurements of B → X c ℓν moments and previous measurements of B → X s γ moments. (The small samples of earlier BABAR B → X s γ data used by HFAG do not lead to significant correlations between the fit results and the data presented here.) The central values of the efficiency in each of three energy ranges for the current analysis are determined by computing efficiencies for several kinetic-scheme models with m b and µ 2 π Three considerations enter the estimate of model dependence. First, the error ellipse associated with the HFAG fit is used to estimate an efficiency uncertainty. Second, the central values for m b and µ 2 π from the HFAG fit to B → X c ℓν moments only, and from a similar fit [59] using B → X s γ moments only but constraining other HQET parameters based on the combined fit, are considered. The largest efficiency deviation is that from the B → X s γ-only fit, so that is assigned as the kineticscheme uncertainty. Third, a procedure which translates HQET parameters from the kinetic scheme to the shape function scheme is applied to the combined-fit results to provided m b and µ 2 π values [25,60] for an efficiency estimate in the shape function scheme. The difference between that estimate and the central value in the kinetic scheme is added to the kinetic-scheme uncertainty (linearly because both effects are systematic shifts rather than random variations), and taken as a symmetric uncertainty. Lastly, this is combined in quadrature with an uncertainty due to the choice of scale factor in the scheme translation. For the range 1.8 to 2.8 GeV, the three effects together yield ∆ǫ sig = (0.00025 + 0.00019) ⊕ 0.00024 = 0.00051.
Another possible source of model-dependence is the choice of the m Xs cutoff used to define the K * (892) region (Sec. II). But changing that cutoff from 1.1 GeV/c 2 to 1.0 or 1.2 GeV/c 2 results in an efficiency change small compared to the other effects computed here.
The signal efficiency, and associated model errors, for three photon energy ranges is given in Table X.

C. Branching Fraction Results
Table XI shows the branching fractions B(B → X s+d γ) for three ranges of measured E * γ , from applying Eq. (9) with the efficiencies obtained in Sec. X B.
In order to compare directly to theoretical predictions, the measurement for each energy range in the CM frame is converted to a branching fraction in the corresponding range of true energy in the B frame. The factor α needed to accomplish this is determined from MC simulation using the same methods for choosing a central value (based XI: Branching fractions in several photon energy ranges of both measured E * γ (CM frame) and true Eγ (B rest frame), along with the adjustment factor α between them. Uncertainties on branching fractions are statistical, systematic and modeldependence, respectively. The error on the adjustment factor α is a model-dependence uncertainty, treated as fully correlated with that on the initial B.
The model-dependence uncertainties on α and 1/ǫ sig are positively correlated: models with a larger fraction of the spectrum at low energy have larger average 1/ǫ sig and usually larger α. Hence the fractional model-dependence errors on ǫ sig and α are linearly added. Should the HFAG values for the kinetic-scheme parameters change in the future, the Appendix provides a prescription for adjusting both ǫ sig and α, and hence the central branching fraction values, for such a change.
Finally, the contribution of B(B → X d γ) is accounted for by multiplying B(B → X s+d γ) by 1/(1 + (|V td |/|V ts |) 2 ) = 0.958 ± 0.003. This leads to the results, also presented in Table XI, for B(B → X s γ) in true-E γ ranges, with the small additional uncertainty from this factor included in the systematic error.
Because the events in the three energy ranges are mostly in common, even the statistical uncertainties on the three branching fractions are highly correlated. The overall correlation matrix for all statistical and systematic effects (including yield-efficiency cross-terms, but excluding model dependence) are given in Table XII.

XI. UNFOLDED SPECTRUM
The theoretical predictions of the photon energy spectrum are made in the B-meson rest frame in terms of the true photon energy E B γ . However the measured spectrum in Fig. 11 is measured in the Υ (4S) frame in terms of the reconstructed E * γ after the event selection require-ments. To convert the measured spectrum to one that can be directly compared to predictions requires correcting for selection efficiency and detector acceptance, and unfolding two resolution effects. These are detector resolution and Doppler smearing of the photon energy. The transformation of the measured E * γ spectrum to an E B γ spectrum thus requires four steps: 1. Correcting for the event selection efficiency.
2. Unfolding the effects of detector resolution.
3. Correcting for the detector acceptance.

Unfolding the Doppler smearing.
Each of these steps requires the use of the MC simulation to either estimate the efficiency and acceptance or model the resolution and smearing. The effects of calorimeter resolution and Doppler smearing on the photon spectrum are unfolded using a simplified version of an iterative method [61]. This simplified method has been used previously by the BABAR collaboration in a measurement of the e + e − → π + π − (γ) cross section [62]. An introduction to this method is followed by a description of the implementation used here and then the results and systematic uncertainties. The notation used for the photon energy is: • E * γ is the energy measured in the Υ (4S) rest frame after event selection.
• E * true γ is the true photon energy in the Υ (4S) rest frame. Its spectrum is obtained after steps 1-3 above.
• E B γ is the true photon energy in the B-meson rest frame. Its spectrum is obtained after steps 1-4 above.

A. Overview of the Unfolding Technique
The effects of detector resolution and Doppler smearing each require a separate unfolding but the procedure for each is identical. In this overview the unfolding of the detector resolution is described. The unfolding of the Doppler smearing uses the same procedure. First some general considerations for the unfolding are given before describing the features of implementation used.
The spectrum is measured in twelve 100-MeV bins between 1.6 and 2.8 GeV and one 70-MeV bin between 1.53 and 1.6 GeV. The detector resolution can cause a migration between bins which is described by a transfer matrix A, whose elements A ij are the number of events generated in bin j that are reconstructed in bin i. Identical binning is used for the generated and smeared spectra so that A ij is a square matrix. The transfer matrix is derived from MC simulation using an assumed model for the spectrum. It is then used to construct a folding matrix P ij and an unfolding matrixP ij where P ij is the probability for an event generated in the bin j to be reconstructed in the bin i andP ij is the probability of the reconstructed event in the bin i coming from the generated bin j. N is the number of bins. In principle the unfolding matrix can now be directly applied to the reconstructed spectrum to unfold the resolution effects. There are, however, two significant problems with this approach. The first is that it assumes the simulated model perfectly describes the data. The second is that any significant statistical fluctuations in the reconstructed spectrum can be unfolded into several bins, causing unstable and unreliable results. The technique adopted mitigates these problems. It begins by simulating an approximate model of the spectrum that is normalized to data in the range 1.8 < E * γ < 2.8 GeV. This model is referred to as the initial model. The difference between this model and the data is then divided into two parts. The first part is attributed to a genuine difference between the model and the true data spectrum and is used to modify the transfer matrix, equivalent to changing the initial model. The second is attributed to statistical and systematic fluctuations and is not unfolded using the unfolding matrix, but rather used to correct the model spectrum so that significant fluctuations in the reconstructed spectrum are propagated to the unfolded true data spectrum. The division of the difference into these two parts is accomplished using a bin-dependent regularization function f with a tunable parameter λ. The value of f varies from 0 to 1 according to the value of λ so that a fraction f comprises the true model-to-data difference and a fraction 1 − f the statistical and systematic fluctuation. A priori the value of λ is unknown, but can be estimated using an MC technique described in Sec. XI B.
The technique has been tested extensively in simulated data and found to give reliable and stable results.

B. Implementation of the Unfolding
This nominal initial model is found by comparing the data to a set of models in the kinetic, shape function, and KN schemes using different values of HQET parameters. Each model is passed through the full simulation and event selection. Figure 12 shows the comparison of the data to a range of models that describe the data at the one-σ level. The closest match is chosen by constructing a χ 2 function formed from the bin-by-bin differences of the data and the generated spectrum using 100-Mev bins in the signal range 1.8 < E * γ < 2.8 GeV and the full covariance matrix. It is found that a model in the shape function scheme with (m b = 4.51 GeV, µ 2 π = 0.46 GeV 2 ) best describes the data. The other models shown in Fig. 12 are used to optimize the λ parameters for the two unfolding steps and to estimate model-dependence systematic uncertainties.
The unfolding method begins by correcting the measured data spectrum for selection efficiency in each bin. It is then compared with the reconstructed simulated spectrum of the initial model by computing the difference Here d i is the number of efficiency-corrected reconstructed data events in the i th bin, r i is the number of efficiency-corrected reconstructed simulated events and C normalizes the initial model spectrum to the data in the signal range 1.8 < E * γ < 2.8 GeV. A fraction f of ∆d i comes from a true difference between the model and the data spectrum, while the remaining fraction 1 − f is due to a fluctuation in either the signal or in the background subtraction. The function f is a regularization function with a tunable parameter λ: where σ i is the error in d i . There are several choices of regularization functions suggested in reference [61]. Each function has the property that it varies monotonically between 0 and 1 as the combination ∆d i /(λσ i ) changes from 0 to ∞. The procedure is found to be insensitive to the particular choice, so the simplest is chosen. The value of the regularization parameter λ thus determines the fraction f of the difference that is unfolded in each bin.
An ensemble of 40,000 simulated model spectra is used both to optimize λ and to derive the error matrix for the unfolded spectrum. These spectra have been generated using an error matrix that is constructed from the errors in Table IV, the bin-to-bin correlations in Table V and the correlations between the background subtraction and the efficiency systematics described in Sec. X A 6. Each spectrum is unfolded with a range of values of λ and then corrected for acceptance. The error matrix of the unfolded spectra, O, is computed from the ensemble using the output distributions of energy in each bin and the correlations between these distributions. This is then repeated using different models to construct the unfolding matrix. A χ 2 function is formed using a vector of the unfolded yields, the inverse of the error matrix O −1 and a vector of the true value of the original generated MC spectra t: Only bins in the signal region 1.8 < E * γ < 2.8 GeV are used for the optimization. The χ 2 function is then used to find the value of λ that most closely reproduces t for all models. The optimal value of λ is then used to unfold the data. The detector resolution unfolding is performed using λ = 0.5.
The unfolding matrix used to unfold the dataP ′ ij is constructed from a modified transfer matrix A ′ ij . It is modified by adding the folded difference between the initial model and the data: The unfolded data spectrum u j is then obtained from It is expressed in terms of a correction to the true value of the initial model (Ct j ). The second term is that part of the difference between the initial model and the data that is to be unfolded using the unfolding matrixP ′ ij . The third term is the part of the difference attributed to statistical or systematic fluctuation that is not unfolded. This procedure was iterated, but its output was found to have converged after just one application, so that first iteration provides the results presented below. The procedure for unfolding the Doppler smearing is identical except that the optimal value of λ = 1.0.

C. Results of the Unfolding
The measured spectrum shown Fig. 11 and the corresponding yields and uncertainties in Table IV are the starting point for the unfolding. First the spectrum is corrected for the selection efficiency, taking into account the additional correlated errors between the efficiency and the background estimation described in Sec. X A 6. Then the resolution smearing is unfolded and the resultant spectrum corrected for detector acceptance to give a spectrum in bins of E * true γ , presented in Table XIII. The estimation of the statistical, systematic and modeldependence uncertainties is described in Sec. XI D. To provide complete yield uncertainties, the 3.1% energyindependent uncertainty on efficiency (see Table IX) is included in the systematic uncertainty. The spectrum is shown in Fig. 14.
The Doppler smearing is then unfolded starting from Fig. 14 and Table XIII. The resulting yields in bins of E B γ are converted to partial branching fractions by dividing by the number of B mesons in the on-resonance data sample, 2N BB . These branching fractions are presented in Table XIV. An additional 1.1% has been included in the systematic error to account for the uncertainty in N BB . Figure 15 shows this photon spectrum in the B rest frame. The spectrum is compared to that for a kinetic-scheme model with parameters m b = 4.60 GeV and µ 2 π = 0.45 GeV 2 , close to HFAG world averages. (The K * (892) has not been substituted for the highestenergy part of the spectrum, because the unfolded data cannot resolve such a peak.) The correlation matrices corresponding to Table XIII  and XIV are given in Tables XV and XVI, respectively. These matrices have a complex structure because many effects contribute. At low energies (the upper left quadrant) they are dominated by the highly-correlated uncertainties in the BB backgrounds. At higher energies, the uncorrelated statistical uncertainty is relatively more im-   Tables XIV and XVI can be used to fit the measured spectral shape to any theoretical prediction in the B-meson rest frame.

D. Statistical, Systematic and Model-Dependence Uncertainties in the Unfolding
The dominant uncertainty in the bins of the unfolded spectrum is due to the BB subtraction described in Sec. VII. The statistical and systematic errors on the efficiency-corrected yields are propagated using the ensemble MC technique described previously. A number of possible uncertainties in the unfolding procedure were considered. These included changing the regularization parameter λ to zero which changes f to 1.0 in all bins, changing the normalization factor C according to the 10% uncertainty in the measured value of B(B → X s γ), varying the energy scale by ±0.3%, and smearing the calorimeter resolution in the MC simulation by an additional 1%, as determined by data comparisons in Sec. X A 1. The only significant effects are found to be in the photon energy scale shift. Table XVII shows the bin-by-bin change in the event yields due to the photon energy shift. For each bin, the absolute value of the largest difference (+ or −) is taken as the systematic  uncertainty, and 100% bin-to-bin correlation is assumed. This error is combined in quadrature with the systematic error propagated from the measured E * γ spectrum and is included in Tables XIII and XIV. To assess the model dependence, the unfolding is performed with a range of models. In each case the same model is used for the entire procedure including efficiency and acceptance corrections, and unfolding the detector resolution and Doppler smearing. Figure 12 shows two models that could plausibly describe the data at the one-sigma level. These are a shape function model with (m b = 4.40 GeV, µ 2 π = 0.52 GeV 2 ) and a kineticscheme model (m b = 4.60 GeV, µ 2 π = 0.45 GeV 2 , µ 2 G = 0.27 GeV 2 ). To set the model-dependence error we unfold the nominal simulated model (shape function: m b = 4.51 GeV, µ 2 π = 0.46 GeV 2 ) with one of these two models. The larger bin-by-bin difference is taken as the model error in the unfolded spectrum with 100% correlation be-tween each bin. The model-dependence error is generally much smaller than the systematic error except for the unfolding of the Doppler smearing close to the kinematic limit (E B γ ≈ m B /2). The steeply falling spectrum at this limit leads to a much greater sensitivity to the model, which results in a large error that is anti-correlated between the 2.4-2.5 GeV and 2.5-2.6 GeV bins. To avoid this edge effect the two bins are summed. This is also done for the 2.6-2.8 GeV range.

E. Crosscheck of Branching Fraction
The numbers in Table XIV are used to obtain integrated branching fractions B(B → X s γ) for purposes of comparison with the reported results from Sec. X C. The ∆B(B → X s+d γ) values are summed over E B γ intervals, with the errors combined including correlations (Ta- ble XVI). Lastly, a factor of 0.958 is applied to account for the B → X d γ contribution. As explained in Sec. VIII, the unfolded yields are based on a different choice of model than that used to extract the B(B → X s γ) results for this analysis, and hence are not intended to be used for such results. This procedure has been carried out for one energy range, 1.8 < E B γ < 2.8 GeV. There are two contributions to the uncertainty beyond those implied by Tables XIV and XVI. First, there is the small (1.1%) uncertainty on N BB . Second, because the range of models used to estimate model-dependence uncertainty is data-driven, that uncertainty is positively correlated with the systematic uncertainty on the signal yield. This gives a B(B → X s γ) for 1.8 < E B γ < 2.8 GeV of (3.36±0.19±0.34±0.08)×10 −4 = (3.36±0.43)×10 −4 , where the first set of errors are statistical, systematic and model, and their combination in the second form takes the model-systematic correlation into account.
This value may be compared to the reported branching fraction of (3.20 ± 0.15 ± 0.29 ± 0.08) × 10 −4 = (3.20 ± 0.33) × 10 −4 from Table XI; the three uncertainties (independent in that case) are added in quadrature. The difference in the central values is due to the different choice of the central model; if a data-like model had been used in Sec. X, the extracted branching fraction would have been 3.36 × 10 −4 , the same value obtained with unfolding.
The smaller statistical and systematic uncertainties on the branching fraction from Table XI are in large part a consequence of applying the efficiency correction to a sin-gle wide bin of photon energy. As discussed in Sec. VIII, this de-emphasizes the importance of the uncertainties in the lowest-energy region, where signal efficiency is lowest and background uncertainties are largest. The branching fraction as derived from the unfolded spectrum of necessity relies upon efficiency corrections in 100-MeV bins. In addition, the combined uncertainty on the latter result is increased by the model-background correlation discussed above, an effect which does not occur when the model range is chosen as described in Sec. X B.

F. Moments of the Spectrum
The moments of the spectrum provide information to measure the HQET parameters m b and µ 2 π in the kinetic scheme [23]. The first, second and third spectral moments, E 1 , E 2 , E 3 are defined in Sec. I, Eq. (1). They are measured for three photon energy ranges: 1.8 to 2.8 GeV, 1.9 to 2.8 GeV and 2.0 to 2.8 GeV. The moments are computed directly from the unfolded spectrum in 100-MeV bins given in Tables XIII and XIV using the correlation matrices given in Tables XV and XVI.
The behavior of the moments for different photon energy ranges has been studied theoretically in the kinetic scheme. The spectral moments in E * true γ are given in Table XVIII. The correlations between the moments are given in Table XX to allow fits to predictions of the moments. The E B γ spectral moments and correlations between the moments are given in Tables XIX and XXI.

XII. CONCLUSIONS
In summary, the B → X s+d γ photon energy spectrum in the CM frame has been measured in 347.1 fb −1 of data taken with the BABAR experiment. It is used to extract measurements of the direct CP asymmetry for the sum of B → X s γ and B → X d γ, the branching fraction for B → X s γ, and the spectral shape and its energy moments in the B-meson rest frame. The result for CP asymmetry is A CP = 0.057 ± 0.060(stat) ± 0.018(syst) .
The branching fraction and moments are presented for three ranges of the photon energy in the B-meson rest frame, 1.8, 1.9 and 2.0 to 2.8 GeV (Tables XI and XIX). For example, in the 1.8 to 2.8 GeV range: B(B → X s γ) = (3.21 ± 0.15 ± 0.29 ± 0.08) × 10 −4 , E 1 = (2.267 ± 0.019 ± 0.032 ± 0.003) GeV and E 2 = (0.0484 ± 0.0053 ± 0.0077 ± 0.0005) GeV 2 , where the errors are from ststistics, systematics and model dependence, respectively, and the moments are defined in Eq. 1. Figure 16 compares the measured A CP (B → X s+d γ) to previous measurements and to the SM prediction. No  [42], [43] and [32], respectively. The uppermost result is based on a subset of the data used in the current analysis.
asymmetry is observed, consistent with SM expectation. The current measurement is the most precise to date.  17: The measured branching fraction for this analysis ( ) compared to previous measurements for different Eγ ranges (minimum energies E B γ given on the left axis). The previous measurements are from CLEO ( * ) [33], Belle (△) [40], and BABAR using the semi-inclusive technique ( ) [41]. Error bars show total uncertainties. Figure 17 compares the measured branching fraction to previous measurements performed for different E γ ranges. This measurement supersedes the previous fully inclusive measurement from BABAR. It is consistent with previous measurements and of comparable precision to the recent Belle measurement [40]. In order to compare with theoretical predictions the measurement for E B γ > 1.8 GeV can be extrapolated down to 1.6 GeV using a factor provided by the HFAG collaboration [25]. They fit results from previous measurements of B → X s γ and B → X c ℓν to predictions in the kinetic scheme to yield average values of m b and µ 2 π . These parameters are then used to generate a B → X s γ model in the kinetic scheme which gives an extrapolation factor of 1/(0.968 ± 0.006). When applied to the present result this gives B(B → X s γ) = (3.31 ± 0.16 ± 0.30 ± 0.10) × 10 −4 (E B γ > 1.6 GeV) which is in excellent agreement with the SM prediction B(B → X s γ) = (3.15 ± 0.23) × 10 −4 (E γ > 1.6 GeV) [15] and can be used to provide stringent constraints on new physics. An example is shown in Figure 18. The effects of a type-II two-Higgs-doublet model (THDM) on B(B → X s γ) at next-to-leading order are presented in Refs. [15,63]. Software provided by the author of Ref. [63] computes an excluded region, following a procedure described in Ref. [64]. The branching fraction, including both the SM and the THDM contributions, is calculated for each point in the M H ± vs. tan β plane. The various theoretical uncertainties are assumed to have Gaussian distributions, and are combined in quadrature. A point is then excluded if the negative 1σ deviation of the prediction lies above the 95% confidence-level upper limit of the measured branching fraction extrapolated to 1.6 GeV. The region M H ± < 327 GeV is excluded at the 95% confidence level, independent of tan β.
The effects of detector resolution and Doppler smearing are unfolded to present the photon spectrum in the B-meson rest frame for the first time in Fig. 15. This spectrum may be used to extract information on HQET parameters in two ways. First, the full covariance matrix FIG. 18: The shaded area shows the excluded region (at the 95% confidence level) in charged Higgs mass vs. tan β for a type-II two-Higgs-doublet model, using the measured value of B(B → Xsγ) = (3.31 ± 0.16 ± 0.30 ± 0.10) × 10 −4 (E B γ > 1.6 GeV) from this analysis. This plot is based on predictions in references [15] and [63]. The measured first (top) and second (bottom) moments from this analysis ( ) compared with the previous measurement for different Eγ ranges (minimum energies given on the left axis). These previous measurements are CLEO ( * ) [33], BABAR semi-inclusive ( ) [41], and Belle (△) [40]. Error bars show total uncertainties. is provided to allow any theoretical model to be fit to the entire spectrum. Secondly the moments have been extracted and can be compared to predictions for difference energy ranges. Figure 19 compares the measured moments to previous measurements.