1 Introduction

In high-energy hadronic collisions heavy quarks are produced by hard scatterings between partons of the two incoming hadrons. The production cross section of hadrons with charm or beauty quarks is calculated in the framework of Quantum Chromodynamics (QCD) and factorised as a convolution of the hard scattering cross sections at partonic level, the parton distribution functions (PDFs) of the incoming hadrons and the non-perturbative fragmentation functions of heavy quarks to heavy-flavour hadrons. Factorisation is implemented in terms of the squared momentum transfer \(Q^2\) (collinear factorisation) [1] or of the partonic transverse momentum \(k_\mathrm{T}\) [2]. The hard scattering cross section is expanded in a perturbative series in powers of the strong coupling constant \(\alpha _\mathrm{s}\). State-of-the-art calculations based on collinear factorisation implement a perturbative expansion up to next-to-leading order (NLO) in \(\alpha _\mathrm{s}\), such as the general-mass variable flavour number scheme (GM-VFNS) [3,4,5], or next-to-leading order in \(\alpha _\mathrm{s}\) with all-order resummation of the logarithms of \(p_\mathrm{T}/m_Q\) (FONLL) [6, 7], where \(p_\mathrm{T}\) and \(m_Q\) are the heavy-quark transverse momentum and mass, respectively. Calculations based on \(k_\mathrm{T}\) factorisation exist only at leading order (LO) in \(\alpha _\mathrm{s}\) [2, 8, 9]. All these calculations provide a good description of the production cross sections of D and B mesons in proton–proton (and proton–antiproton) collisions at centre-of-mass energies from 0.2 to 13 TeV over a wide \(p_\mathrm{T}\) range at both central and forward rapidities (see e.g. [10] and references therein). In the case of charm production the uncertainties of the theoretical calculations, dominated by the perturbative scale uncertainties, are significantly larger than the experimental ones [11,12,13,14,15,16,17,18,19,20,21]. However, it was recently pointed out that in ratios of cross sections at different LHC energies and in different rapidity intervals the perturbative uncertainty becomes subdominant with respect to the uncertainty on the PDFs [22], thus making the measurement sensitive in particular to the gluon PDF at values of Bjorken-x down to \(10^{-5}\) when the D-meson \(p_\mathrm{T}\) approaches 0. This represents a strong motivation for pursuing precise measurements of D-meson production in pp collisions at LHC energies. Charm hadroproduction measurements are also required for cosmic-ray and neutrino astrophysics, where high-energy neutrinos from the decay of charmed hadrons produced in particle showers in the atmosphere constitute an important background for neutrinos from astrophysical sources [23,24,25,26].

In the context of the heavy-ion programme at the LHC, D-meson measurements in pp collisions represent an essential reference for the study of effects induced by cold and hot strongly-interacting matter in the case of proton–nucleus and nucleus–nucleus collisions (see e.g. the recent reviews [10, 27]). In addition, the \(\mathrm{c}{\overline{\mathrm{c}}}\) production cross section per nucleon–nucleon collision is a basic ingredient for the determination of the amount of charmonium production by (re)generation in a quark-gluon plasma [28,29,30], a mechanism that is supported by \(\mathrm{J}/\psi \) measurements in nucleus–nucleus collisions at the LHC [31, 32]. A precise measurement of the \(\mathrm{c}{\overline{\mathrm{c}}}\) production cross section in pp collisions would enable a more stringent comparison of model calculations with data.

In this article, we report the measurement of the production cross sections of prompt \(\mathrm{D}^0\), \(\mathrm{D}^+\), \(\mathrm{D}^{*+}\) and \(\mathrm{D}_s^+\) mesons (as average of particles and anti-particles), and of their ratios, in pp collisions at the centre-of-mass energy \(\sqrt{s}=7~{\mathrm {TeV}}\) using the ALICE detector at the LHC. The measurements cover mid-rapidity (\(|y|<0.5\)) and the intervals \(0<p_\mathrm{T}<36~{\mathrm {GeV}}/c\) for \(\mathrm{D}^0\) mesons, \(1<p_\mathrm{T}<24~{\mathrm {GeV}}/c\) for \(\mathrm{D}^+\) and \(\mathrm{D}^{*+}\)mesons, and \(2<p_\mathrm{T}<12~{\mathrm {GeV}}/c\) for \(\mathrm{D}^+_s\) mesons. The measurements cover complementary intervals in \(p_\mathrm{T}\) and rapidity with respect to those published by the ATLAS (\(3.5<p_\mathrm{T}<100~{\mathrm {GeV}}/c\), \(|\eta |<2.1\) [13]) and LHCb (\(0<p_\mathrm{T}<8~{\mathrm {GeV}}/c\), \(2<y<4.5\) [19]) Collaborations at the same centre-of-mass energy. In comparison to previous ALICE publications based on the same data sample [14, 16, 17], the present results have a significantly extended \(p_\mathrm{T}\) coverage (for example, the previous coverage for \(\mathrm{D}^0\) mesons was 0–16 \({\mathrm {GeV}}/c\)) and total uncertainties reduced by a factor of about two. These improvements have several sources: (i) changes in the detector calibration, alignment and track reconstruction algorithm, which resulted in better \(p_\mathrm{T}\) resolution, thus higher signal-to-background ratio; (ii) optimization of the D-meson selection procedure; (iii) refinements in the estimation of the systematic uncertainties, which is now more data-driven; (iv) a data sample with 20% larger integrated luminosity.

The article is organised as follows: the data sample and the analysis procedure are described in Sect. 2, the estimation of the systematic uncertainties is discussed in Sect. 3 and the results are presented and compared to theoretical calculations in Sect. 4.

2 Analysis

A complete description of the ALICE experimental setup and of its performance can be found in [33, 34]. D mesons were reconstructed at mid-rapidity from their decay products, using the tracking and particle identification capabilities of the ALICE central barrel detectors located within a large solenoidal magnet, providing a field \(\hbox {B} = 0.5~{\mathrm {T}}\) parallel to the beam line (z axis of the ALICE reference frame). The innermost detector, the Inner Tracking System (ITS), is used to track charged particles within the pseudorapidity interval \(|\eta | < 0.9\) as well as for primary and secondary vertex reconstruction. It consists of six cylindrical layers equipped with Silicon Pixel Detectors (SPD), Silicon Drift Detectors (SDD) and Silicon Strip Detectors (SSD) from inner to outer layers. The ITS provides a resolution on the track impact parameter \(d_0\) to the primary vertex in the transverse plane (\(r\varphi \)) better than 75 \(\upmu \)m for transverse momentum \(p_\mathrm{T}>1~{\mathrm {GeV}}/c\). As compared to previous publications based on the same data sample [14, 16], the alignment of the ITS sensor modules was improved and a new procedure for the calibration of the drift velocity and of the non-uniformities of the drift field in the SDD was used. The Time Projection Chamber (TPC) provides track reconstruction as well as particle identification via the measurement of the specific ionisation energy loss dE/dx. The Time-Of-Flight detector (TOF) extends the charged particle identification capabilities of the TPC via the measurement of the flight time of the particles from the interaction point. The event collision time is measured with the T0 detector, which consists of two arrays of Cherenkov counters located at \(+350\) cm and \(-70\) cm along the beam line, or, for the events with sufficiently large multiplicity, it is estimated using the particle arrival times at the TOF [35]. The V0 detector, used in the online trigger and offline event selection, consists of two arrays of 32 scintillators each, covering the pseudorapidity intervals \(-3.7< \eta < -1.7\) and \(2.8< \eta < 5.1\), placed around the beam vacuum tube on either side of the interaction region. A minimum-bias (MB) trigger was used to collect the data sample, by requiring at least one hit in either of the V0 counters or in the SPD (\(|\eta | < 2\)). Events were selected off-line by using the timing information from the V0 and the correlation between the number of hits and track segments in the SPD detector to remove background due to beam–gas interactions. Only events with a primary vertex reconstructed within \(\pm 10~\mathrm{cm}\) from the centre of the detector along the beam line were used for the analysis. The analysed data sample consists of about 370 million MB events, corresponding to an integrated luminosity \(L_\mathrm{int} = (6.0 \pm 0.2)\) nb\(^{-1}\), collected during the 2010 pp run at \(\sqrt{s}= 7\) TeV.

D mesons were reconstructed via their hadronic decay channels \(\mathrm{D}^0 \rightarrow \mathrm{K}^-\pi ^+\) (with branching ratio, BR \(=\) 3.93 ± 0.04%), \(\mathrm{D}^+\rightarrow \mathrm{K}^-\pi ^+\pi ^+\) (BR \(=\) 9.46 ± 0.24%), \(\mathrm{D^{*+}(2010)\rightarrow D^0\pi ^+}\) (strong decay with BR \(=\) 67.7 ± 0.5%) with \(\mathrm{D}^0 \rightarrow \mathrm{K}^-\pi ^+\) and \(\mathrm{D_s^{+}\rightarrow \phi \pi ^+}\) with \(\mathrm{\phi \rightarrow K^-K^+}\) (BR \(=\) 2.27 ± 0.08%), together with their charge conjugates [36].

D-meson candidates were defined using pairs or triplets of tracks with the proper charge-sign combination. Tracks were required to have \(|\eta | < 0.8\), \(p_\mathrm{T}> 0.3~{\mathrm {GeV}}/c\), at least 70 associated TPC space points (out of a maximum of 159), \(\chi ^{2}/\mathrm{ndf} < 2\) in the TPC (where ndf is the number of degrees of freedom involved in the track fit procedure), and at least one hit in either of the two layers of the SPD. For the soft pion produced in \(\mathrm{D^{*+}}\) decay, also tracks reconstructed only with the ITS, with at least four hits, including at least one in the SPD, and \(p_\mathrm{T}>80~{\mathrm {MeV}}/c\) were considered. With these track selection criteria, the acceptance in rapidity for D mesons drops steeply to zero for \(|y|>0.5\) at low \(p_\mathrm{T}\) and \(|y|>0.8\) at \(p_\mathrm{T}>5~{\mathrm {GeV}}/c\). A \(p_\mathrm{T}\)-dependent fiducial acceptance cut was therefore applied on the D-meson rapidity, \(|y| < y_\mathrm{fid}(p_\mathrm{T})\), with \(y_{\mathrm {fid}}(p_\mathrm{T})\) increasing from 0.5 to 0.8 in the transverse momentum range \(0< p_\mathrm{T}< 5~{\mathrm {GeV}}/c\) according to a second-order polynomial function, and \(y_{\mathrm {fid}}=0.8\) for \(p_\mathrm{T}> 5~{\mathrm {GeV}}/c\).

\(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) mesons have mean proper decay lengths \(c\tau \) of about 123, 312 and 150 \(\upmu \)m, respectively [36]. Their decay vertices are therefore typically displaced by a few hundred \(\upmu \)m from the primary vertex of the interaction. Geometrical selections on the D-meson decay topology were applied to reduce the combinatorial background. The selection requirements were tuned so as to provide a large statistical significance for the signal and to keep the selection efficiency as high as possible. The latter requirement was dictated also by the fact that too tight cuts result in an increased contribution to the raw yield from feed-down D mesons originating from decays of B mesons. In the \(\mathrm{D}^{*+} \rightarrow \mathrm{D}^0 \pi ^+\) case, the decay vertex cannot be resolved from the primary vertex and geometrical selections were applied on the secondary vertex topology of the produced \(\mathrm{D^0}\). The geometrical selections were mainly based on the displacement of the tracks from the interaction vertex, the distance between the D-meson decay vertex and the primary vertex (decay length, L), and the pointing of the reconstructed D-meson momentum to the primary vertex. The pointing condition is applied by requiring a small value for the angle \(\theta _\mathrm{pointing}\) between the directions of the reconstructed momentum of the candidate and its flight line, defined by the vector from the primary to the secondary vertex. In comparison to the previous analysis of the same data sample, additional selection criteria were introduced. In particular, the projections of the pointing angle and of the decay length in the transverse plane (\(\theta _\mathrm{pointing}^{r\varphi }\) and \(L^{r\varphi }\)) were considered. Moreover, a cut on the normalised difference between the measured and expected impact parameters of each of the decay particles \((d^\mathrm{reco}_{0,\mathrm{tr}} - d^\mathrm{exp}_{0,\mathrm{tr}}\))/\(\sigma _{\Delta }\) was applied, where \(d^\mathrm{reco}_{0,\mathrm{tr}}\) is the measured track impact parameter, \(d^\mathrm{exp}_{0,\mathrm{tr}}\) is defined as \(L^{r\varphi } \sin (\theta _\mathrm{tr,D}^{r\varphi })\), \(\theta _\mathrm{tr,D}^{r\varphi }\) is the measured angle between the momenta of the D meson and of the considered track, and \(\sigma _{\Delta }\) is the combination of the uncertainties on the measured and expected \(d_{0}\). By requiring \((d^\mathrm{reco}_{0,\mathrm{tr}} - d^\mathrm{exp}_{0,\mathrm{tr}})/\sigma _{\Delta }<3\), a significant rejection of background candidates (15–40% depending on D-meson species and \(p_\mathrm{T}\)) and feed-down D mesons (up to 50% at high \(p_\mathrm{T}\)) is achieved while keeping almost 100% of the prompt D mesons.

Further reduction of the combinatorial background was obtained by applying particle identification (PID) to the decay tracks. A \(3 \sigma \) compatibility cut was applied on the difference between the measured and expected signals for pions and kaons for both the \({\mathrm {d}}E/{\mathrm {d}}x\) and time-of-flight. Tracks without TOF hits were identified using only the TPC information with a \(3\,\sigma \) selection for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D^{*+}}\) decay products, and a \(2\,\sigma \) selection for the \(\mathrm{D_s^+}\). This stricter PID selection strategy was needed in the \(\mathrm{D_s^+}\) case due to the large background of track triplets and the short \(\mathrm{D_s^+}\) lifetime, which limits the effectiveness of the geometrical selections on the displaced decay-vertex topology. Based on the PID information and the charge sign of the decay tracks, \(\mathrm{D^0}\) candidates were accepted (as \(\mathrm{D}^{0}\), \({\overline{\mathrm{D}^0}}\), or both) or rejected, according to the compatibility with the K\(^{\mp }\) \(\pi ^{\pm }\) final state. For the \(\mathrm{D^{*+}}\) reconstruction, this ambiguity is resolved using the charge of the soft pion. In the cases of the \(\mathrm{D_s^{+} \rightarrow K^-K^+\pi ^+}\) and \(\mathrm{D}^+\rightarrow \mathrm{K}^-\pi ^+\pi ^+\) decays, a candidate was rejected if the track with charge opposite to that of the D meson was not compatible with the kaon PID hypothesis.

The D-meson raw yields, including both particles and anti-particles, were obtained from fits to the \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) candidate invariant-mass distributions and to the mass difference \(\Delta M = M ({\mathrm {K}} \pi \pi ) - M({\mathrm {K}} \pi )\) distributions for \(\mathrm{D^{*+}}\) candidates. In the fit function, the signal was modeled with a Gaussian and the background was described by an exponential term for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) candidates and by the function \(a \sqrt{\Delta M - m_{\pi }} \cdot \mathrm{e}^{b(\Delta M - m_{\pi })}\) for \(\mathrm{D^{*+}}\) candidates. In the case of \(\mathrm{D^0}\) mesons, an additional term was included in the fit function to account for the contribution of signal candidates that are present in the invariant mass distribution with the wrong daughter particle mass assignment (reflections). A study with Monte Carlo simulations showed that about 70\(\%\) of these reflections are rejected by the PID selections. The residual contribution was accounted for by including in the fit a template consisting of the sum of two wide Gaussians with centroids and widths fixed to values obtained in the simulation and with amplitudes normalised using the signal observed in data.

Figure 1 shows fits to the invariant-mass (mass-difference) distributions in three \(p_\mathrm{T}\) intervals for \(\mathrm{D^0}\), \(\mathrm{D^+}\), (\(\mathrm{D^{*+}}\)) and \(\mathrm{D_s^+}\) candidates from top to bottom. The mean values of the Gaussians in all transverse-momentum intervals were found to be compatible within uncertainties with the world average rest mass values for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) and with the difference \(M_{\mathrm{D^{*+}}} - M_{\mathrm{D^0}}\) for the \(\mathrm{D^{*+}}\) [36]. The widths are consistent with the results from Monte Carlo simulations and smaller by 10–20% than the values in [14, 16], as a consequence of the improved \(p_\mathrm{T}\) resolution.

Fig. 1
figure 1

Invariant-mass (mass-difference) distributions of \(\mathrm{D^0}\), \(\mathrm{D^+}\), (\(\mathrm{D^{*+}}\)) and \(\mathrm{D_s^+}\) candidates and charge conjugates in three \(p_\mathrm{T}\) intervals for a sample of pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\) with \(L_\mathrm{int}=6.0~\mathrm{nb}^{-1}\). The curves show the fit functions as described in the text. The contribution of reflections for the \(\mathrm{D^0}\) meson is included. The values of mean (\(\mu \)) and width (\(\sigma \)) of the signal peak are reported together with the signal counts (S) in the mass interval (\(\mu - 3\sigma ,\mu + 3\sigma \))

The \(p_\mathrm{T}\)-differential cross section of prompt D mesons was computed as:

$$\begin{aligned} \frac{\mathrm{d}^2 \sigma ^{\mathrm{D}}}{\mathrm{d}p_\mathrm{T}\mathrm{d} y}= \frac{1}{c_{\Delta y} ~\Delta p_\mathrm{T}}\frac{1}{\mathrm{BR}} \frac{\frac{1}{2} \, \left. f_\mathrm{prompt}\cdot N^{\mathrm{D}+{\overline{\mathrm{D}}},\mathrm{raw}}\right| _{|y|<y_\mathrm{fid}}}{ (\mathrm{Acc}\times \varepsilon )_\mathrm{prompt}} \frac{1}{L_\mathrm{int}},\nonumber \\ \end{aligned}$$
(1)

where \(f_\mathrm{prompt}\), \(N^{\mathrm{D}+{\overline{\mathrm{D}}},\mathrm{raw}}\) and \((\mathrm{Acc}\times \varepsilon )_\mathrm{prompt}\) are \(p_\mathrm{T}\)-interval dependent quantities. The raw yield values (sum of particles and antiparticles, \(N^{\mathrm{D}+{\overline{\mathrm{D}}},\mathrm{raw}}\)) were corrected for the B-meson decay feed-down contribution (i.e. multiplied by the prompt fraction \(f_{\mathrm{prompt}}\) in the raw yield), divided by the acceptance-times-efficiency for prompt D mesons \((\mathrm{Acc} \times \varepsilon )_{\mathrm{prompt}}\), and divided by a factor of two to obtain the particle and antiparticle averaged yields. The \(p_\mathrm{T}\)-differential yields for each D-meson species, measured separately for particles and anti-particles, were found to be in agreement within statistical uncertainties. The corrected yields were divided by the decay channel BR, the \(p_\mathrm{T}\) interval width \(\Delta p_\mathrm{T}\), the correction factor for the rapidity coverage \(c_{\Delta y}\), and the integrated luminosity \(L_\mathrm{int}=N_\mathrm{ev} / \sigma _\mathrm{MB} \), where \(N_\mathrm{ev}\) is the number of analysed events and \(\sigma _\mathrm{MB}=62.2\) mb is the cross section for the MB trigger condition [37].

The \((\mathrm{Acc} \times \varepsilon )\) correction factor was determined using simulations of pp collisions generated with the PYTHIA 6.4.21 event generator [38] (Perugia-0 tune [39]), and particle transport through the apparatus using GEANT3 [40]. The luminous region distribution and the conditions of all the ALICE detectors were included in the simulations. The \((\mathrm{Acc} \times \varepsilon )\) for prompt and feed-down \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons with \(|y| < y_\mathrm{fid}\) is shown in Fig. 2 as a function of \(p_\mathrm{T}\). The efficiencies for feed-down D mesons are higher than those for prompt D mesons in most of the \(p_\mathrm{T}\) intervals, because the decay vertices of the feed-down D mesons are on average more displaced from the primary vertex due to the large B-meson lifetime (\(c\tau \approx 500~\upmu \hbox {m}\) [36]). However, the selection on the difference between measured and expected decay-track impact parameters rejects more efficiently feed-down D mesons, thus reducing the difference between prompt and feed-down efficiencies as compared to the previous analyses.

The rapidity acceptance correction factor \(c_{\Delta y}\) was computed with the PYTHIA 6.4.21 event generator with Perugia-0 tune as the ratio between the generated D-meson yield in \(\Delta y = 2\,y_\mathrm{fid}\), (with \(y_\mathrm{fid}\) varying from 0.5 at low \(p_\mathrm{T}\) to 0.8 at high \(p_\mathrm{T}\)) and that in \(|y|<0.5\). It was checked that calculations of the \(c_{\Delta y}\) correction factor based on FONLL pQCD calculations [7] or on the assumption of uniform D-meson rapidity distribution in \(|y|<y_\mathrm{fid}\) would give the same result, because both in PYTHIA and in FONLL the D-meson yield is uniform within 1% in the range \(|y|<0.8\).

Fig. 2
figure 2

Acceptance \(\times \) efficiency for \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons, as a function of \(p_\mathrm{T}\). The efficiencies for prompt (solid lines) and feed-down (dotted lines) D mesons are shown

The \(f_\mathrm{prompt}\) fraction was calculated using the B production cross sections from FONLL calculations [6, 41], the \({\mathrm {B}} \rightarrow {\mathrm {D}} + X\) decay kinematics from the EvtGen package [42] and the efficiencies for feed-down D mesons reported in Fig. 2:

$$\begin{aligned} f_{\mathrm {prompt}}= & {} 1- \frac{N^{\text {D~feed-down}}_{\mathrm {raw}}}{N^{\mathrm {D}}_{\mathrm {raw}}}= 1- \left( \frac{\mathrm{d}^2 \sigma }{{{\mathrm {d}}} p_\mathrm{T}{{\mathrm {d}}} y} \right) ^\mathrm{FONLL}_{\text {feed-down}}\nonumber \\&\cdot \frac{({\mathrm {Acc}} \times \varepsilon )_{\text {feed-down}} \cdot c_{\Delta y} \Delta p_\mathrm{T}\cdot {\mathrm {BR}} \cdot L_\mathrm{int}}{N^{\mathrm{D} +\overline{\mathrm{D}},\mathrm{raw}}/2}, \end{aligned}$$
(2)

where the \(p_\mathrm{T}\) dependence of \(f_\mathrm{prompt}\), \(N^{\mathrm{D} +\overline{\mathrm{D}},\mathrm{raw}}\) and \(({\mathrm {Acc}} \times \varepsilon )_{\text {feed-down}}\) is omitted for brevity. The values of \(f_\mathrm{prompt}\) range between 0.85 and 0.97 depending on D-meson species and \(p_\mathrm{T}\).

3 Systematic uncertainties

Systematic uncertainties were estimated considering several sources. A summary is shown in Table 1 for two \(p_\mathrm{T}\) intervals. New or refined procedures were used with respect to the analyses presented in [14, 16], in particular for the uncertainties on the signal yield extraction, the track reconstruction efficiency and the feed-down subtraction.

The systematic uncertainties on the yield extraction obtained from the fits to the invariant-mass distributions (mass difference for \(\mathrm{D^{*+}}\) mesons) were evaluated by repeating the fits several times varying (i) the invariant-mass bin width, (ii) the lower and upper limits of the fit range, (iii) the background fit function (exponential function, first, second and third order polynomials were used for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) and a power law for the \(\mathrm{D^{*+}}\)), for a total of about few hundred fits for each D-meson species and \(p_\mathrm{T}\) interval. In addition, the same approach was used with a bin counting method, in which the signal yield was obtained by integrating the invariant-mass distribution after subtracting the background estimated from a fit to the side-bands. The distributions of the signal yield obtained from these variations are consistent with a Gaussian shape and the mean of the distributions is close to the central value of the yield. The systematic uncertainty was defined as the R.M.S. of this distribution.

Table 1 Summary of relative systematic uncertainties for two \(p_\mathrm{T}\) intervals

The systematic uncertainty on the track reconstruction efficiency was estimated by varying the track-quality selection criteria and by comparing the probability to prolong tracks from the TPC inward to the ITS (‘matching efficiency’) in data and simulations. The variation of the track selection criteria, such as the minimum number of clusters in the TPC, was found to yield a 2% systematic effect on the cross section of \(\mathrm{D^0}\) mesons (two-prong final state) and 3% for the other meson species (three-prong final states). The comparison of the matching efficiency in data and simulations was made after weighting the relative abundances of primary and secondary particles in the simulation to match those observed in data. This weighting is motivated by the observation that the matching efficiency is much larger for primary particles than for secondary particles produced far from the interaction point in decays of strange hadrons and in interactions of primary particles with the material of the detector. The fractions of primary and secondary particles were estimated, as a function of \(p_\mathrm{T}\), by fitting the inclusive track impact parameter distributions in data and in the simulation with a sum of three template distributions for primary particles, for secondary particles from strange-hadron decays and for secondary particles produced in interactions of primary particles in the detector material. The templates were obtained from the simulation. After weighting the relative abundances in the simulation to match those in data, the systematic uncertainty on the matching efficiency was defined as the relative difference of the matching efficiencies in data and in the simulation. The study was made separately for particles identified as pions and as kaons using the TPC and TOF PID selections described in Sect. 2. The systematic uncertainty is 2% per track in the interval \(2<p_\mathrm{T}<6\) GeV/c and 1% at lower and higher \(p_\mathrm{T}\). The per-track uncertainty was then propagated to the D mesons, taking into account the number and transverse momentum of their decay tracks, and added in quadrature to the component estimated from the track selection variation.

Systematic uncertainties can also arise from possible differences in the distributions and resolution of the geometric selection variables between data and the simulation. These uncertainties were evaluated by repeating the analysis with several sets of selection criteria and comparing the resulting corrected cross sections. More details can be found in [14].

To estimate the uncertainty on the PID selection efficiency, for the three non-strange D-meson species the analysis was repeated without PID selection. The resulting cross sections were found to be compatible with those obtained with the PID selection. Therefore, no systematic uncertainty was assigned. For the \(\mathrm{D_s^+}\) meson, the lower signal yield and the larger combinatorial background prevented a signal estimation without particle identification, hence, in this case, a 3\(\sigma \) PID selection, looser with respect to the PID strategy adopted in the analysis, was used to estimate a systematic uncertainty of about 7%.

The systematic effect on the efficiency due to a possible difference between the simulated and real \(p_\mathrm{T}\) distribution of D mesons was estimated by using alternative D-meson \(p_\mathrm{T}\) distributions from the PYTHIA 6 generator with Perugia-0 tune and from the FONLL pQCD calculation. More details can be found in [14].

The systematic uncertainty on the subtraction of feed-down from beauty-hadron decays includes the uncertainties of (i) the B-meson production cross section from FONLL calculations, (ii) the branching ratios of B mesons into D mesons [36] and (iii) the relative abundances of B-meson species produced in the beauty-quark fragmentation [36]. The dominant contribution is the one originating from the FONLL calculations and it was estimated by varying the \(p_\mathrm{T}\)-differential cross section of feed-down D mesons within the theoretical uncertainties of the FONLL calculation. The procedure for the variation of the b-quark mass, of the perturbative scales and of the parton distribution functions is described in [7]. In previous analyses, an alternative method based on the ratio of the FONLL cross sections for feed-down and prompt D mesons was also used in the estimation of the systematic uncertainties. In this analysis it was no longer used, on the basis of the observation that FONLL calculations at LHC energies provide a good description of the production cross sections of \(\mathrm{B}^{0}\), \(\mathrm{B}^{+}\) and \(\mathrm{B}_\mathrm{s}^0\) mesons at both central and forward rapidity, while it underestimates prompt charm production [43,44,45,46,47,48]. Hence, the uncertainty due to the B feed-down correction is significantly reduced and more symmetric as compared to our previous publications.

The uncertainty on the D-meson production cross section normalisation has a contribution from the 3.5% uncertainty on the minimum-bias trigger cross section [37] and a contribution from the uncertainties on the branching ratios of the considered D-meson decay channels (see Table 1).

The total systematic uncertainties, which are obtained as a quadratic sum of the contributions listed in Table 1, are reduced by a factor that ranges from 1.5 to 5, depending on D-meson species and \(p_\mathrm{T}\) interval, with respect to previous publications [14, 16]. The systematic uncertainties on PID, tracking and selection efficiencies are mostly correlated among the different \(p_\mathrm{T}\) intervals, while the raw-yield extraction uncertainty is mostly uncorrelated.

4 Results

The \(p_\mathrm{T}\)-differential cross sections for prompt \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) production in \(|y|<0.5\) are shown in Fig. 3. The error bars represent the statistical uncertainties, while the systematic uncertainties are shown as boxes around the data points. The symbols are positioned horizontally at the centre of each \(p_\mathrm{T}\) interval, with the horizontal bars representing the width of the \(p_\mathrm{T}\) interval. For all D-meson species, the results are consistent within uncertainties with those reported in our previous publications on charmed-meson cross sections in pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\) [14, 16], but the total uncertainties (sum in quadrature of statistical and systematic errors) are reduced by a factor 1.5–4, depending on the D-meson species and the \(p_\mathrm{T}\) interval. The \(\mathrm{D^0}\)-meson cross section in the interval \(0<p_\mathrm{T}<1~{\mathrm {GeV}}/c\) is obtained from the analysis without decay vertex reconstruction described in Ref. [17]. At higher \(p_\mathrm{T}\), the results of the analysis presented in this paper, based on geometrical selections on the displaced decay vertex, are more precise than those obtained without decay vertex reconstruction.

Fig. 3
figure 3

\(p_\mathrm{T}\)-differential inclusive production cross section of prompt \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons in pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\). Statistical uncertainties (bars) and systematic uncertainties (boxes) are shown. The \(\mathrm{D^{*+}}\) cross section is scaled by a factor of 5 for better visibility

In Figs. 4, 5, 6 and 7, the measured \(p_\mathrm{T}\)-differential cross sections are compared with results from perturbative QCD calculations, two of which are based on collinear factorisation (FONLL [6, 7] and GM-VFNS [3,4,5]) and one is a leading order (LO) calculation based on \(k_\mathrm{T}\)-factorisation [9]. The results of these calculations, performed in the same \(p_\mathrm{T}\) intervals of the measurement, are shown as filled boxes spanning the theoretical uncertainties and a solid line representing the values obtained with the central values of the pQCD parameters. The theoretical uncertainties are estimated in all the three frameworks by varying the renormalisation and factorisation scales. In the FONLL and \(k_\mathrm{T}\)-factorisation calculations also the effect of the charm-quark mass uncertainty is considered. In the FONLL and GM-VFNS calculations, the CTEQ6.6 PDFs [49] were used, and the uncertainty on the PDFs was included in the FONLL error boxes. The LO \(k_\mathrm{T}\)-factorisation calculations were performed with an updated set of unintegrated gluon-distribution functions computed from the recent MMHT2014-LO PDFs [50]. For this reason, the comparison to the measured \(\mathrm{D^0}\)-meson cross section differs from that reported in Ref. [17]. In the FONLL calculation, the fragmentation fractions \(f(\mathrm{c}\rightarrow D)\), i.e. the fractions of charm quarks hadronising into each D-meson species, were taken from Ref. [51]. For the \(\mathrm{D_s^+}\) mesons, only the comparisons to GM-VFNS and LO \(k_\mathrm{T}\)-factorisation predictions are shown, because a calculation of the \(\mathrm{D_s^+}\) production cross section within the FONLL framework is not available. The central value of the GM-VFNS predictions lies systematically above the data, while that of the FONLL predictions lies below the data. For FONLL, this feature was observed also at other values of \(\sqrt{s}\), from 0.2 to 13 TeV [11, 12, 15, 19,20,21]. The LO \(k_\mathrm{T}\)-factorisation calculation describes the data within uncertainties for \(p_\mathrm{T}<2~{\mathrm {GeV}}/c\) and \(p_\mathrm{T}>10~{\mathrm {GeV}}/c\), while in the interval \(2<p_\mathrm{T}<10~{\mathrm {GeV}}/c\) the predictions underestimate the measured production cross sections.

Fig. 4
figure 4

\(p_\mathrm{T}\)-differential production cross section of prompt \(\mathrm{D^0}\) mesons with \(|y|<0.5\) in the interval \(0<p_\mathrm{T}<36~{\mathrm {GeV}}/c\), in pp collisions at \(\sqrt{s} =7~{\mathrm {TeV}}\). The data point in \(0<p_\mathrm{T}<1~{\mathrm {GeV}}/c\) is obtained from the analysis without decay vertex reconstruction described in Ref. [17]. The cross section is compared to three pQCD calculations: FONLL [7] (top-left panel), GM-VFNS [5] (top-right panel) and a leading order (LO) calculation based on \(k_\mathrm{T}\)-factorisation [9] (bottom panel). The ratios of the data to the three calculated cross sections are shown in the lower part of each panel. In the data-to-theory ratios the 3.5% normalisation uncertainty due to the luminosity determination is not included in the systematic uncertainty on the data points

Fig. 5
figure 5

\(p_\mathrm{T}\)-differential production cross section of prompt \(\mathrm{D^+}\) mesons with \(|y|<0.5\) in the interval \(1<p_\mathrm{T}<24~{\mathrm {GeV}}/c\), in pp collisions at \(\sqrt{s} =7~{\mathrm {TeV}}\). The cross section is compared to three pQCD calculations: FONLL [7] (top-left panel), GM-VFNS [5] (top-right panel) and a leading order (LO) calculation based on \(k_\mathrm{T}\)-factorisation [9] (bottom panel). The ratios of the data to the three calculated cross sections are shown in the lower part of each panel. In the data-to-theory ratios the 3.5% normalisation uncertainty due to the luminosity determination is not included in the systematic uncertainty on the data points

Fig. 6
figure 6

\(p_\mathrm{T}\)-differential production cross section of prompt \(\mathrm{D^{*+}}\) mesons with \(|y|<0.5\) in the interval \(1<p_\mathrm{T}<24~{\mathrm {GeV}}/c\), in pp collisions at \(\sqrt{s} =7~{\mathrm {TeV}}\). The cross section is compared to three pQCD calculations: FONLL [7] (top-left panel), GM-VFNS [5] (top-right panel) and a leading order (LO) calculation based on \(k_\mathrm{T}\)-factorisation [9] (bottom panel). The ratios of the data to the three calculated cross sections are shown in the lower part of each panel. In the data-to-theory ratios the 3.5% normalisation uncertainty due to the luminosity determination is not included in the systematic uncertainty on the data points

Fig. 7
figure 7

\(p_\mathrm{T}\)-differential production cross section of prompt \(\mathrm{D_s^+}\) mesons with \(|y|<0.5\) in the interval \(2<p_\mathrm{T}<12~{\mathrm {GeV}}/c\), in pp collisions at \(\sqrt{s} =7~{\mathrm {TeV}}\). The cross section is compared to two pQCD calculations: GM-VFNS [5] (left panel) and a leading order (LO) calculation based on \(k_\mathrm{T}\)-factorisation [9] (right panel). The ratios of the data to the calculated cross sections are shown in the lower part of each panel. In the data-to-theory ratios the 3.5% normalisation uncertainty due to the luminosity determination is not included in the systematic uncertainty on the data points

The average transverse momentum \({\langle p_{ {\mathrm T} } \rangle }\) of prompt \(\mathrm{D^0}\) mesons was measured by fitting the cross section reported in Fig. 4 with a power-law function:

$$\begin{aligned} f(p_\mathrm{T})=C \frac{p_\mathrm{T}}{(1+(p_\mathrm{T}/p_0)^2)^n}, \end{aligned}$$
(3)

where C, \(p_0\) and n are the free parameters. The prompt-\(\mathrm{D^0}\) \({\langle p_{ {\mathrm T} } \rangle }\), defined as the mean value of the fit function, is:

$$\begin{aligned} {\langle p_{ {\mathrm T} } \rangle }^{\mathrm{prompt}\,\mathrm{D}^0}_{\mathrm{pp},\,7\,\mathrm{TeV}} = 2.19 \pm 0.06\,(\mathrm{stat.})\, \pm 0.04\,(\mathrm{syst.})~{\mathrm {GeV}}/c.\nonumber \\ \end{aligned}$$
(4)

The systematic uncertainty on \({\langle p_{ {\mathrm T} } \rangle }\) was estimated as described in Ref. [17] taking into account separately the contributions due to the correlated and uncorrelated systematic uncertainties on the measured \(p_\mathrm{T}\)-differential cross section. The uncertainty due to the fit function was estimated from the spread of the results obtained with different functions and using an alternative method, which is not based on fits to the distribution, but on direct calculations of \({\langle p_{ {\mathrm T} } \rangle }\) from the data points.

The ratios of the \(p_\mathrm{T}\)-differential cross sections of \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons are reported in Fig. 8. In the evaluation of the systematic uncertainties on these ratios, the sources of correlated and uncorrelated systematic effects were treated separately. In particular, the contributions of the yield extraction and cut efficiency were considered as uncorrelated, while those of the feed-down from beauty-hadron decays and the tracking efficiency were treated as fully correlated among the different D-meson species. The measured D-meson ratios do not show a significant \(p_\mathrm{T}\) dependence within the experimental uncertainties, thus suggesting a small difference between the fragmentation functions of charm quarks to pseudoscalar (\(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\)) and vector (\(\mathrm{D^{*+}}\)) mesons and to strange and non-strange mesons. The data are compared to the ratios of the D-meson cross sections from FONLL (only for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D^{*+}}\) mesons), GM-VFNS and LO \(k_\mathrm{T}\)-factorisation pQCD calculations. The ratios of the theoretical predictions were computed assuming their uncertainties to be fully correlated among the D-meson species, which results in an almost complete cancellation of the uncertainties in the ratio. Note that in all these pQCD calculations, the relative abundances of the different D-meson species are not predicted by the theory, but the fragmentation fractions, \(f({\mathrm{c}\rightarrow \mathrm{D}})\), are taken from the experimental measurements [7, 9, 51,52,53,54]. In the FONLL and GM-VFNS frameworks, the \(p_\mathrm{T}\) dependence of the ratios of the D-meson production cross sections arises from the different fragmentation functions used to model the transfer of energy from the charm quark to a specific D-meson species [52, 53, 55], and from the different contribution from decays of higher excited states. The parton fragmentation models used in the calculations provide an adequate description of the measured data. In the LO \(k_\mathrm{T}\)-factorisation calculations, the same fragmentation function (Peterson [56]) is used for \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D_s^+}\) mesons, resulting in the same shape of the \(p_\mathrm{T}\) distributions of these three meson species, while the fragmentation functions for vector mesons from Ref. [57] are used for \(\mathrm{D^{*+}}\) mesons [9].

Fig. 8
figure 8

Ratios of D-meson production cross sections as a function of \(p_\mathrm{T}\). Predictions from FONLL, GM-VFNS and LO \(k_\mathrm{T}\)-factorisation calculations are also shown. For the pQCD calculations the line shows the ratio of the central values of the theoretical cross sections, while the shaded area is defined by the ratios computed from the upper and lower limits of the theoretical uncertainty band

The ratios of \(\mathrm{D^0}\)-meson production cross sections in different rapidity intervals, which are expected to be sensitive to the gluon PDF at small values of Bjorken-x [22], were computed from our measurement in the central rapidity region (\(|y|<0.5\)) and the results reported by the LHCb collaboration for pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\) in different y intervals at forward rapidity [19]. The results are reported in Fig. 9, where the central-to-forward ratios are shown as a function of \(p_\mathrm{T}\) for three different y intervals at forward rapidity: \(2<y<2.5\) (left panel), \(3<y<3.5\) (middle panel), \(4<y<4.5\) (right panel). The error bars represent the total uncertainty obtained from the propagation of the statistical and systematic uncertainties on the \(p_\mathrm{T}\)-differential cross sections. The measured ratios are compared to FONLL calculations, shown as boxes in Fig. 9. The central-to-forward ratios computed using the central values of the factorisation and renormalisation scales are found to describe the data within their uncertainties. The upper edge of the FONLL uncertainty band, which is also in agreement with the measured values of the central-to-forward ratios, is determined by the calculations with factorisation scale \(\mu _\mathrm{F}=2\,m_\mathrm{T}\), where \(m_\mathrm{T}=\sqrt{p_\mathrm{T}^2+m_\mathrm{c}^2}\) and \(m_\mathrm{c}=1.5~{\mathrm {GeV}}/c^2\). The low edge of the FONLL uncertainty band is determined by the calculations with \(\mu _\mathrm{F}=0.5\,m_\mathrm{T}\), which provide a worse description of the measured central-to-forward ratios at low \(p_\mathrm{T}\) for the most forward rapidity interval. Note that in this forward rapidity interval, the FONLL calculation with \(\mu _\mathrm{F}=0.5\,m_\mathrm{T}\) uses the PDFs for Bjorken-x values reaching down to about \(10^{-5}\), a region that is not constrained by experimental data, and below \(Q^2 = (1.3~{\mathrm {GeV}}/c)^2\), where the CTEQ6.6 PDFs [49] are kept constant to their values at \((1.3~{\mathrm {GeV}}/c)^2\).

Fig. 9
figure 9

Ratios of \(\mathrm{D^0}\)-meson production cross section per unit of rapidity at mid-rapidity (\(|y|<0.5\)) to that measured by the LHCb Collaboration [19] in three rapidity ranges, \(2<y<2.5\) (left panel), \(3<y<3.5\) (middle panel), \(4<y<4.5\) (right panel), as a function of \(p_\mathrm{T}\). The LHCb measurement were multiplied by 2 to refer them to one unit of rapidity. The error bars represent the total (statistical and systematic) uncertainty on the measurement. Predictions from FONLL calculations are compared to the data points

The visible cross sections of prompt D mesons, obtained by integrating the \(p_\mathrm{T}\)-differential cross sections in the measured \(p_\mathrm{T}\) range, are reported in Table 2. In addition, for \(\mathrm{D^0}\) mesons the cross sections integrated over the \(p_\mathrm{T}\) intervals of the \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) measurements are shown. The systematic uncertainty was defined by propagating the yield extraction uncertainties as uncorrelated among \(p_\mathrm{T}\) intervals and all the other uncertainties as correlated. These values were used to compute the ratios of the \(p_\mathrm{T}\)-integrated D-meson production cross sections, which are reported in Table 3. The systematic uncertainties on the ratios were computed taking into account the sources correlated and uncorrelated among the different D-meson species as described above. The measured ratios are compatible within uncertainties with the results at \(\sqrt{s}=2.76~{\mathrm {TeV}}\) [15] and with the measurements of the LHCb collaboration at forward rapidity (\(2.0<y<4.5\)) at three different collision energies \(\sqrt{s}=\) 5, 7 and 13 TeV [19,20,21]. The measured \(p_\mathrm{T}\)-integrated production ratios are also compatible with the charm-quark fragmentation fractions \(f(\mathrm{c}\rightarrow \mathrm{D})\) measured in \({\mathrm{e}^+\mathrm{e}^-}\) collisions from the compilation in [51]. These results indicate that the fragmentation fractions of charm quarks into different D-meson species do not vary substantially with rapidity, collision energy and colliding system.

Table 2 Visible production cross sections of prompt D mesons in \(|y| < 0.5\) in pp collisions at \(\sqrt{s}= 7~{\mathrm {TeV}}\)
Table 3 Ratios of the measured \(p_\mathrm{T}\)-integrated cross sections of prompt D mesons in \(|y| < 0.5\) in pp collisions at \(\sqrt{s}= 7~{\mathrm {TeV}}\)
Table 4 Production cross sections of prompt D mesons in \(|y| < 0.5\) and full \(p_\mathrm{T}\) range in pp collisions at \(\sqrt{s}= 7~{\mathrm {TeV}}\)

The production cross sections per unit of rapidity, \(\mathrm{d}\sigma /\mathrm{d}y\), at mid-rapidity were computed for each meson species by extrapolating the visible cross section to the full \(p_\mathrm{T}\) range. The extrapolation factor for a given D-meson species was defined as the ratio between the total production cross section in \(|y|<0.5\) and that in the experimentally covered phase space, both of them calculated with the FONLL central parameters. The systematic uncertainty on the extrapolation factor was estimated by considering the contributions due to (i) the uncertainties on the CTEQ6.6 PDFs [49] and (ii) the variation of the charm-quark mass and the renormalisation and factorisation scales in the FONLL calculation, as proposed in [7]. For \(\mathrm{D^0}\) mesons, which are measured down to \(p_\mathrm{T}=0\), the extrapolation factor accounts only for the very small contribution of D-mesons with \(p_\mathrm{T}>36~{\mathrm {GeV}}/c\) and it has therefore a value very close to unity with negligible uncertainty. In the case of \(\mathrm{D_s^+}\) mesons, for which a FONLL prediction is not available, the central value of the extrapolation factor was computed from the prediction based on the \(p_\mathrm{T}\)-differential cross section of charm quarks from FONLL, the fractions \(f({\mathrm{c}\rightarrow \mathrm{D_s^+}})\) and \(f({\mathrm{c}\rightarrow \mathrm{D}_\mathrm{s}^{*+}})\) from ALEPH [54], and the fragmentation functions from [57], which have one parameter, r, that was set to 0.1 as done in FONLL [53]. The \({\mathrm{D}}_\mathrm{s}^{*+}\) mesons produced in the c quark fragmentation were made to decay with PYTHIA and the resulting \(\mathrm{D_s^+}\) mesons were summed to the primary ones to obtain the prompt yield. An additional contribution to the systematic uncertainty was assigned for \(\mathrm{D_s^+}\) mesons based on the envelope of the results obtained using the FONLL \(p_\mathrm{T}\)-differential cross sections of \(\mathrm{D^0}\), \(\mathrm{D^+}\) and \(\mathrm{D^{*+}}\) mesons to compute the \(\mathrm{D_s^+}\) extrapolation factor. The resulting values for the extrapolation factors and for the prompt D-meson production cross sections per unit of rapidity \(\mathrm{d}\sigma /\mathrm{d}y\) are reported in Table 4.

The \(\mathrm{c}\overline{\mathrm{c}}\) production cross section per unit of rapidity at mid-rapidity (\(|y|<0.5\)) was calculated by dividing the prompt \(\mathrm{D^0}\)-meson cross section by the fraction of charm quarks hadronising into \(\mathrm{D^0}\) mesons \(f(c\rightarrow \mathrm{D^0})\) and correcting for the different shapes of the distributions of \(y_{\mathrm{D^0}}\) and \(y_{\mathrm{c}\overline{\mathrm{c}}}\) (\(\mathrm{c}\overline{\mathrm{c}}\) pair rapidity). The correction factor and its uncertainty were extracted from FONLL and MNR NLO pQCD [58] calculations together with PYTHIA 6 [38] and POWHEG [59] simulations, as described in detail in Ref. [17]. For the fragmentation fraction, the value \(f(\mathrm{c}\rightarrow \mathrm{D^0})=0.542 \pm 0.024\) derived in Ref. [51] by averaging the measurements from e\(^+\)e\(^-\) collisions at LEP was used. As pointed out in Refs. [60, 61], measurements in e\(^+\)e\(^-\), ep and pp collisions agree within uncertainties, supporting the hypothesis that fragmentation is independent of the specific production process.Footnote 1 The resulting \(\mathrm{c}\overline{\mathrm{c}}\) cross section per unit of rapidity at mid-rapidity is:

$$\begin{aligned}&\left. \mathrm{d}\sigma ^{\mathrm{c}\overline{\mathrm{c}}}_\mathrm{pp,\,7\,TeV}/\mathrm{d}y \, \right| _{|y|<0.5} =954 \pm 69 \,(\mathrm{stat}) \pm 74\,(\mathrm{syst})\nonumber \\&\quad \pm \, 33\,(\mathrm{lumi}) \pm 42\,(\mathrm{FF}) \pm 31\,(\mathrm{rap.shape})~\upmu \mathrm{b}. \end{aligned}$$
(5)

We verified that the precision of the \(\mathrm{c}\overline{\mathrm{c}}\) production cross-section determination does not improve if the results calculated from \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons, which have significantly larger extrapolation uncertainties as compared to the \(\mathrm{D^0}\) one, are included via a weighted average procedure, as done in Ref. [15]. The total production cross section of prompt \(\mathrm{D^0}\) mesons (average of particles and antiparticles) was calculated by extrapolating to full phase space the cross section measured at mid-rapidity. The extrapolation factor was defined as the ratio of the \(\mathrm{D^0}\) production cross sections in full rapidity and in \(|y|<0.5\) calculated with the FONLL central parameters: \(8.56 ^{+2.51}_{-0.42}\). The systematic uncertainty on the extrapolation factor was estimated with the same procedure described above for the \(p_\mathrm{T}\) extrapolation. The resulting cross section is:

$$\begin{aligned}&\sigma ^{\mathrm{prompt}\,\mathrm{D}^0}_{\mathrm{pp},\,7\,\mathrm{TeV}}= 4.28 \pm 0.31\,(\mathrm{stat}) \, \pm 0.33\,(\mathrm{syst})\,^{+1.26}_{-0.24}\,(\mathrm{extr.})\nonumber \\&\quad \pm \, 0.15\,(\mathrm{lumi}) \pm 0.04\,(\mathrm{BR})~\mathrm{mb}. \end{aligned}$$
(6)

The total charm production cross section was calculated by dividing the total prompt \(\mathrm{D^0}\)-meson production cross section by the fragmentation fraction reported above. The resulting \(\mathrm{c}\overline{\mathrm{c}}\) production cross section in pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\) is:

$$\begin{aligned}&\sigma ^{\mathrm{c}\overline{\mathrm{c}}}_{\mathrm{pp},\,7\,\mathrm{TeV}}(\mathrm{ALICE})= 7.89 \pm 0.57 \,(\mathrm{stat.})\nonumber \\&\quad \pm \, 0.61\,(\mathrm{syst.}) \,^{+2.32}_{-0.45} (\mathrm{extr.}) \pm 0.28\,(\mathrm{lumi.}) \pm 0.35\,(\mathrm{FF})~\mathrm{mb},\nonumber \\ \end{aligned}$$
(7)

which is consistent with the value of Ref. [17] but has smaller statistical and systematic uncertainties. It is also compatible within uncertainties with the total charm production cross section reported by the ATLAS collaboration [13], which is calculated from \(\mathrm{D^+}\) and \(\mathrm{D^{*+}}\) measurements in \(|\eta |<2.1\) and \(p_\mathrm{T}>3.5~{\mathrm {GeV}}/c\) and has larger uncertainties on the extrapolation to full kinematic phase space as compared to our result.

A more precise determination of the \(\mathrm{c}\overline{\mathrm{c}}\) production cross section can be obtained by summing our measurement of the prompt \(\mathrm{D^0}\)-meson cross section in \(|y|<0.5\) and the LHCb result in \(2<y<4.5\) for \(0<p_\mathrm{T}<8~{\mathrm {GeV}}/c\) [19], and extrapolating to full rapidity and \(p_\mathrm{T}\) via the ratio of FONLL calculations of the cross sections in full phase space and in the measured y and \(p_\mathrm{T}\) intervals exploiting the symmetry around \(y=0\). The result for the \(\mathrm{c}\overline{\mathrm{c}}\) production cross section is:

$$\begin{aligned}&\sigma ^{\mathrm{c}\overline{\mathrm{c}}}_{\mathrm{pp},\,7\,\mathrm{TeV}}(\mathrm{ALICE,LHCb})= 7.44 \pm 0.14 \,(\mathrm{stat.})\nonumber \\&\quad \pm \, 0.46\,(\mathrm{syst.})\,^{+0.13}_{-0.07} (\mathrm{extr.}) \, \pm 0.33\,(\mathrm{FF})~\mathrm{mb}, \end{aligned}$$
(8)

where the +0.13 mb extrapolation uncertainty is determined by FONLL calculations with factorisation scale \(\mu _\mathrm{F}=0.5 \,m_\mathrm{T}\), which do not describe the measured central-to-forward ratios of Fig. 9. If this \(\mu _\mathrm{F}\) value is not considered, the extrapolation uncertainty is reduced to \(\pm 0.07\) mb.

5 Summary

We have presented a new measurement of the inclusive \(p_\mathrm{T}\)-differential production cross sections of prompt \(\mathrm{D^0}\), \(\mathrm{D^+}\), \(\mathrm{D^{*+}}\) and \(\mathrm{D_s^+}\) mesons at mid-rapidity (\(|y|<0.5\)) in pp collisions at a centre-of-mass energy of \(\sqrt{s}=7~{\mathrm {TeV}}\). The measurements cover the transverse-momentum interval \(0<p_\mathrm{T}<36~{\mathrm {GeV}}/c\) for \(\mathrm{D^0}\) mesons, \(1<p_\mathrm{T}<24~{\mathrm {GeV}}/c\) for \(\mathrm{D^+}\) and \(\mathrm{D^{*+}}\) mesons, and \(2<p_\mathrm{T}<12~{\mathrm {GeV}}/c\) for \(\mathrm{D_s^+}\) mesons. As compared to previously published results based on the same data sample [14, 16], the present results have an extended \(p_\mathrm{T}\) coverage and total uncertainties reduced by a factor of about 1.5–4 depending on the D-meson species and \(p_\mathrm{T}\). The measurements cover complementary ranges in \(p_\mathrm{T}\) and y with respect to those of the ATLAS (\(3.5<p_\mathrm{T}<100~{\mathrm {GeV}}/c\), \(|\eta |<2.1\) [13]) and LHCb (\(0<p_\mathrm{T}<8~{\mathrm {GeV}}/c\), \(2<y<4.5\) [19]) Collaborations at the same centre-of-mass energy. The \(p_\mathrm{T}\)-differential cross sections are described within uncertainties in the full \(p_\mathrm{T}\) range by the FONLL and GM-VFNS perturbative QCD calculations, which are based on collinear factorisation, while a leading-order calculation based on \(k_\mathrm{T}\) factorisation underestimates the measured cross sections for \(2<p_\mathrm{T}<10~{\mathrm {GeV}}/c\). The \(p_\mathrm{T}\)-differential ratios of our measurement at mid-rapidity and LHCb measurements at forward rapidity [19] are described by FONLL calculations. These central-to-forward ratios, once complemented with similar measurements at different centre-of-mass energies, could provide sensitivity to the gluon PDF at small values of Bjorken-x [22]. The ratios of the cross sections of the four D-meson species were found to be compatible with the LHCb measurements at forward rapidity and different collision energies as well as with results from \(\mathrm{e^+e^-}\) collisions, indicating that the fragmentation fractions of charm quarks into different D-meson species do not vary substantially with rapidity, collision energy and colliding system.

The new measurement also allowed for a more accurate determination of the \(p_\mathrm{T}\)-integrated \(\mathrm{c}\overline{\mathrm{c}}\) production cross section at mid-rapidity in pp collisions at \(\sqrt{s}=7~{\mathrm {TeV}}\):

$$\begin{aligned} \left. \mathrm{d}\sigma ^{\mathrm{c}\overline{\mathrm{c}}}_\mathrm{pp,\,7\,TeV}/\mathrm{d}y \, \right| _{|y|<0.5} = 954 \pm 69 \,(\mathrm{stat})\, \pm 97 \,(\mathrm{tot.~syst.}) ~\upmu \mathrm{b}. \end{aligned}$$

In particular, the total systematic uncertainty of this measurement is about \(\pm 10\%\), while it was \(^{+13}_{-21}\%\) for the previously-published measurement [17].

The total \(\mathrm{c}\overline{\mathrm{c}}\) production cross section in full phase space was calculated by combining the above measurement at mid-rapidity with that at forward rapidity by the LHCb Collaboration:

$$\begin{aligned} \sigma ^{\mathrm{c}\overline{\mathrm{c}}}_{\mathrm{pp},\,7\,\mathrm{TeV}}(\mathrm{ALICE,LHCb})= & {} 7.44 \pm 0.14 \,(\mathrm{stat.})\nonumber \\&\pm \, 0.58 \,(\mathrm{tot.~syst.})~\mathrm{mb}. \end{aligned}$$