1 Introduction

Previous measurements of charmed mesons production at high energy scattering experiments [1] have shown that inclusive heavy quarks production provides an interesting test for the strong interaction dynamics. Historically, the first results for the charm quark photoproduction cross section \(\sigma (\gamma p\rightarrow c{\bar{c}}+X)\) were presented by ZEUS [2] and H1 [3] Collaborations at ep collider HERA. With the advent of high statistics data from the CERN Large Hadron Collider (LHC), one can expect that it allows to test the predictions of QCD with much higher precision, however, this is not only important for testing QCD itself; but a better understanding of heavy quarks productions is also vital for searches of new physics (NP) phenomena and beyond standard model (BSM) researches [4, 5].

Over the last few years, several experimental collaborations at \(p {\bar{p}}\) and ep colliders have presented data on the differential cross section \(d^2\sigma /(dydp_T)\) for the inclusive production of \(D^0\), \(D^+\) and \(D_s^+\) mesons [1, 6, 7], where y and \(p_T\) refer to the rapidity and transverse momentum of mesons, respectively. On the theoretical side, fragmentation functions (FFs) describing the transition probability of the initial partons into observed hadrons, are needed as nonperturbative inputs for the calculation of all the relevant cross sections measurements [8,9,10,11,12,13]. In the framework of QCD, FFs encode the long-distance dynamics of the interactions among quarks and gluons which lead to their hadronization in a hard-scattering process. Generally speaking, to obtain theoretical predictions for all observables involving identified hadrons in the final state, FFs have to be convoluted with partonic cross-sections encoding the short-distance dynamics of hadron production process.

In Ref. [14], non-perturbative \(D^0\), \(D^+\) and \(D^+_s\) FFs are determined both at leading order (LO) and next-to-leading order (NLO) in the modified minimal subtraction (\(\overline{\mathrm {MS}}\)) factorization scheme by fitting the fractional energy spectra of these mesons measured by the OPAL Collaboration [15, 16] in electron-positron annihilation on the Z-boson resonance at the CERN LEP1 collider. Authors in Ref. [14] have applied the massless scheme or zero-mass variable-flavor-number scheme (ZM-VFNS) where heavy quarks are treated as any other massless parton. This scheme can be applied to the open production of heavy flavors, such as D and B hadrons, provided the hard energy scale characteristic for the production process is sufficiently larger than the heavy-flavors mass. This is certainly the case for our applications, because \(m_D\ll m_Z, m_t\). In Refs. [17, 18], the authors updated their previous results [14] using newer data on charmed meson production presented by the ALEPH [19], BELLE [20] and the CLEO [21] Collaborations. Compared to the data from ALEPH and OPAL, the data from BELLE and CLEO are located much closer to the thresholds \(\sqrt{s}=2m_c\) and \(\sqrt{s}=2m_b\) of the transitions \(c\rightarrow H_c\) and \(b\rightarrow H_b\), where \(H_c\) and \(H_b\) stand for generic c or b hadrons, respectively. However, at the present, the BELLE data included in their analyses have been removed due to an unrecoverable error in the measurements.

In the present analysis, using the ZM-VFN scheme we focus on the hadronization of charm- and bottom-quarks into \(D^0\) and \(D^+\) mesons and provide the first QCD analysis of \((c, b) \rightarrow (D^0, D^+)\) FFs at NNLO accuracy in perturbative QCD. We perform a QCD fit to the electron-positron single inclusive annihilation (SIA) data measured by OPAL Collaboration. It should be mentioned here that, our analysis is restricted to the SIA data only due to the lack of other theoretical partonic cross sections for single inclusive production of partons at NNLO accuracy. We shall also go beyond Refs. [14, 17, 18] by performing a full-fledged error estimation, both for the FFs and the resulting normalized total cross sections, employing the Hessian approach. Furthermore, we include the effects of meson mass on the FFs, which modify the relations between partonic and hadronic variables and reduce the available phase space. Hadron masses are responsible for the low-energy thresholds.

As an application of our analysis, we apply the extracted FFs to make our theoretical predictions for the energy distribution of charmed mesons produced through the top quark decays. In the SM of particle physics, the top quark is the heaviest elementary particle so that its large mass does not allow it to make a constrained state. Therefore, the top quark decays before hadronization takes place, i.e. \(t \rightarrow b W^+ \rightarrow H W^+ + {\text{ Jets }}\), where H refers to the observed colorless hadron in the final state. Therefore, at the CERN LHC, the study of energy distribution of observed hadrons can be considered as a channel to indirect search for detailed study of top quark properties. The study of this energy spectrum can be even considered as a new window towards searches on new physics. In fact, any considerable deviation of energy distribution of mesons from the theoretical predictions in the SM theory can be related to the new physics. In this work, using the obtained results for the charmed meson FFs, we make our predictions for the energy distributions of charmed mesons produced through the decay of unpolarized top quarks at NLO and NNLO accuracies.

The outline of this paper is as follows. In Sect. 2, we shortly describe our theoretical framework to compute charmed meson FFs. In Sect. 3, we describe how one should incorporate the effects of meson mass into the formalism. Sect. 4 includes a detailed description of experimental data sets used in this analysis. The results of this study are presented in Sect. 5. The extracted \(D^0\) and \(D^+\) FFs are discussed in this section and comparisons with other results in literature will be also presented. This section does also include comparisons of analyzed SIA data sets with our NLO and NNLO theoretical predictions for the normalized cross sections along with the one-sigma error bands. In Sect. 6, we will present an example for the application of our analysis. Section 7 includes the summary and conclusions.

2 Theoretical framework

In the present work using the ZM-VFN scheme, where the heavy quarks are treated as other massless partons, we mainly focus on the hadronization of charm- and bottom-quarks into charmed mesons which are of particular relevance in the era of the LHC [22,23,24,25,26]. In particular, we perform a new QCD analysis of OPAL experimental data [15] for \(D^+\) and \(D^0\) mesons up to NNLO accuracy. As usual the optimal way to determine the FFs is to fit them to experimental date extracted from the single-inclusive electron-positron annihilation processes via a virtual photon (\(\gamma \)) or Z boson, i.e.

$$\begin{aligned} e^+ e^- \rightarrow (\gamma , Z) \rightarrow H_c + X, \end{aligned}$$
(1)

where X stands for the residual final state including unobservable jet and \(H_c\) denotes the charmed meson; \(D^0\) and \(D^+\) in our analysis. In comparison with the hadron collisions, for example ep or pp, the SIA process has less contributions from background processes so one does not need to deal with the uncertainties due to the parton distribution functions (PDFs). Hence, SIA would provide the cleanest process for the determinations of FFs rather than the ep of pp processes. The differential cross section of hadron production can be calculated theoretically in the frame work of QCD through the factorization theorem [27]. According to this theorem, the differential cross section of \(e^+ e^-\) annihilation can be written as a convolution of hard scattering subprocess, i.e. \(e^+e^-\rightarrow i{\bar{i}}\), and the non-perturbative meson FFs describing \(i/{\bar{i}}\rightarrow D\), i.e.

$$\begin{aligned}&\frac{d\sigma }{dx_{D}} (e^+ e^- \rightarrow D +X) \nonumber \\&\quad = \sum _{i=g,u/{\bar{u}}, \cdots ,b/{\bar{b}}} \int _{x_D}^{1} \frac{dy}{y} D_{i}^{D} \left( \frac{x_{D}}{y}, \mu _F\right) \frac{d\sigma _{i}}{dy} (y, \mu _{R}, \mu _{F}).\nonumber \\ \end{aligned}$$
(2)

Denoting the four-momenta of the virtual gauge boson and the D meson by q and \(p_D\), respectively, so that \(s=q^2\) and \(p_D^2=m_D^2\), in (2) we introduced the scaling variable \(x_D = 2 (p_D\cdot q)/q^2\). In the center-of-mass (c.m.) frame where \(q = (\sqrt{s}, \vec {0})\) this variable is simplified to as \(x_D = 2 E_D/\sqrt{s}\) where \(E_D\) refers to the energy of D-meson. Thus, \(x_D\) represents the energy of D-meson in units of the beam energy. In Eq. (2), \(\mu _F\) and \(\mu _R\) are the factorization and renormalization scales, respectively. The scale \(\mu _F\) is associated to the divergences due to collinear gluon radiation off a massless primary quark or antiquark. To avoid these divergences which are proportional to \(\ln (s / \mu _F^2)\) we adopt the usual convention \(\mu _F = \mu _R = \sqrt{s}\) [28]. In Eq. (2), \(y = 2 (p_i\cdot q)/q^2\) where \(p_i\) denotes the four-momentum of parton i so by working in the c.m. frame it is simplified as \(y = 2 E_i/\sqrt{s}\). In fact, y refers to the fraction of the beam energy passed on to the parton i. In Eq. (2), the Wilson coefficients \(d\sigma _i/dy\) are the differential cross sections at the parton level which can be calculated perturbatively. Nowadays, these coefficients are known up to NNLO approximation in the perturbative QCD theory, see for example Refs. [29,30,31,32]. Since, most of experimental data are presented in the form of \(1/\sigma _{\texttt {tot}}\times d\sigma /dx_D\), therefore, to be able to compare our theoretical results with experimental data we need to normalize Eq. (2) to the total cross section which reads

$$\begin{aligned} \sigma _{\texttt {tot}}= & {} \frac{4\pi \alpha ^2(Q)}{Q^2} \left( \sum _i^{n_f} {\tilde{e}}_i^2(Q)\right) \nonumber \\&\times \left( 1+ \alpha _s K_{\texttt {QCD}}^{(1)}+\alpha _s^2 K_{\texttt {QCD}}^{(2)}+ \cdots \right) , \end{aligned}$$
(3)

where \({\tilde{e}}_i\) is the effective electroweak charge of quark i, \(\alpha \) and \(\alpha _s\) are the electromagnetic and the strong coupling constants, respectively. The coefficients \(K_{\texttt {QCD}}^{(i)}\) indicate the perturbative QCD corrections to the LO result and are currently computed up to \({{\mathcal {O}}}(\alpha ^3_s)\) [33].

In the factorization formula (2), the \(D_i^D\)-FFs describe the non-perturbative part of the annihilation process (1) which are determined phenomenologically. In our analysis, to perform the best parametrization we adopt the optimal functional form suggested by Bowler [34] for the parametrization of c and b quark FFs. It is given by

$$\begin{aligned} D_i^D(z, \mu _{0}) =N_{i} \, z^{-(1 + \beta _i^{2})} \, (1-z)^{\alpha _{i}} \, e^{-\beta _i^{2}/z}, \end{aligned}$$
(4)

where \(i = c,{\overline{c}}, b, {\overline{b}}\). This parameterization form includes three free parameters \(\alpha _i\), \(\beta _i\) and \(N_i\) which should be determined phenomenologically from the QCD fit to the SIA data sets. In the proposed form, \(\mu _0\) is the initial fragmentation scale which is taken to be \(\mu _0^2 = 18.5\) GeV\(^2\) for heavy flavors b and c. The advantage of choosing this amount for the initial scale \(\mu _0\), which is a little larger than \(m_b^2\), is due to the fact that the time-like matching conditions are currently known up to NLO accuracy and with this input scale the heavy quark thresholds should not be crossed in the QCD evolution. The FFs of gluon and light flavors (uds) are taken to be zero at the initial scale and are generated at higher scales through the Dokshitzer–Gribov–Lipatov–Alteralli–Parisi (DGLAP) evolution equations [35,36,37,38,39]. For the value of strong coupling constant, we adopt \(\alpha _s^{(n_f = 5)}(M_{\texttt {Z}}) = 0.118\) at the Z boson mass scale [40].

In this analysis, we employ the publicly available APFEL package [41] in order to the evolution of \(zD^{D^0}(z, \mu ^2)\) and \(zD^{D^+}(z, \mu ^2)\) FFs as well as for the calculation of the SIA cross sections up to NNLO accuracy. To determine the free parameters, we applied the CERN program MINUIT [42, 43] to minimize the \(\chi ^2_{\texttt {global}}\) which is defined in our previous work in detail [44, 45]. This quantity includes the overall normalization errors of the D-meson production data sets. The uncertainties are also estimated using the standard Hessian error propagation, as outlined in Refs. [46, 47], with \(\Delta \chi ^2=1\), which corresponds to a \(68\%\) confidence level (CL) in the ideal Gaussian statistics. For more detail, see Ref. [48].

3 Mass corrections

The factorization theorem described in Eq. (1) is routinely used in the literature for the inclusive production of single hadrons. In proving this formula it is assumed that quarks and hadrons are massless so the non-zero values of the c- and b-quark masses only enter through the initial conditions of the FFs, and the mass of the heavy baryon sets the lower bounds on the scaling variable \(x_H\), i.e. \(x_H^{\texttt {min}} = 2m_H/\sqrt{s}\). In Ref. [49], we have proved how to enter the hadron mass effects into the inclusive hadron production in \(e^+e^-\) reaction. To incorporate the hadron mass effects we used a specific choice of scaling variables by working in the light-cone (L.C) coordinates. Ignoring the detail of calculations, as a generalization of the massless case, the differential cross section in the presence of hadron mass \(m_H\) reads

$$\begin{aligned} \frac{d\sigma }{dx_H}(x_H, s) =\frac{1}{1-\frac{m_H^2}{s\eta ^2(x_H)}} \frac{d\sigma }{d\eta } \left( \eta (x_H), s\right) , \end{aligned}$$
(5)

where \(\eta = x_H/2 \times (1 - 4m_H^2/(sx_H^2))\) and

$$\begin{aligned} \frac{d\sigma }{d\eta }(\eta , s)= \sum _{i}{\int _{\eta }^1{\frac{dy}{y} \frac{d{\hat{\sigma }}}{dy} D_i^H\left( \frac{\eta }{y}, \mu _F\right) }}. \end{aligned}$$
(6)

The above formula is a fundamental relation for the factorization theorem extended in the presence of hadron mass and would be more effective and applicable when the data are presented in lower energy scales. Among all well-known collaborations, the only collaboration who studied the effects of hadron mass into their calculations is the AKK collaboration [50, 51]. Although, due to the data applied in their work, they have identified the scaling variable \(x_p = 2 |\vec {p}|/\sqrt{s}\), where \(|\vec {p}|\) stands for the three-momentum of produced hadron, while in our analysis we use the energy scaling variable as \(x_H=2E_H/\sqrt{s}\). Therefore, the differential cross section or, equivalently, the extended factorization formula including the hadron mass effects computed in our work is different from the one (\(d\sigma /dx_p\)) presented in Refs. [50, 51].

It should be noted that the effect of hadron mass is to increases the cross section \(d\sigma /dx_H\) at small \(x_H\) so this treatment acts inverse for large \(x_H\). We incorporated the mass corrections into the publicly available APFEL package [41]. Our results show that the inclusion of hadron mass leads to a change in the value of \(\chi ^2 /{\texttt {(d.o.f)}}\) up to about \(5\%\). Although, due to the scale of energy given for the data used in our work, i.e. \(\sqrt{s} = 91.2\) GeV, this improvement is small but having the data at lower energies it is expected to have more effect on the \(\chi ^2 /{\texttt {(d.o.f)}}\).

Table 1 The individual \(\chi ^2\) values for inclusive and b-tagged cross sections obtained at NLO and NNLO. The total \(\chi ^2\) and \(\chi ^2/d.o.f\) fit for \(D^0\) are also shown
Table 2 As in Table 1, but for \(D^+\)

4 Experimental data selection

After introducing the theoretical framework of our analysis in the previous sections, in the following we discuss the experimental data which are used in this analysis. The first experimental information corresponding to the D meson production through \(e^- e^+\) annihilation comes from the measurements performed by the OPAL Collaboration [15]. The OPAL results have been reported for \(D^0\) and \(D^+\) production at the Z-boson resonance. In this process, two mechanisms contribute with similar rate; \(Z \rightarrow c{\bar{c}}\) decay followed by \(c/{\bar{c}}\rightarrow H_c\) fragmentation and \(Z \rightarrow b {\bar{b}}\) decay followed by \(b/{\bar{b}}\rightarrow H_b\) fragmentation and weak decay of the bottom-flavored hadron \(H_b\) into the charmed-meson via \(H_b\rightarrow H_c+X\). Note that, the energy spectrum of \(H_c\) hadrons originating from decays of \(H_b\) hadrons is much softer than that due to primary charm production. For separating charmed hadron production through \(Z \rightarrow c {\bar{c}}\) decay from \(Z \rightarrow b {\bar{b}}\) decay, OPAL used the apparent decay length distributions and energy spectra of the charmed hadrons. The OPAL Collaboration has presented \(x_D\)-distributions for \(D^0\) and \(D^+\) samples and for their \(z\rightarrow b{\bar{b}}\) subsamples (b-tagged events). They are displayed in the form \(1/N_{\texttt {had}}\times dN/dx_D\) where N is the number of charmed meson candidates reconstructed through appropriate decay chains. To convert these data into the desired cross section \(1/\sigma _{\texttt {tot}}\times d\sigma /dx_D\), one should divide them by the convenient branching fractions of decays used in Refs. [15, 16] for the reconstruction of the various charmed mesons, i.e.

$$\begin{aligned} Br (D^{0} \rightarrow K^{-} \pi ^{+})&= (3.84 \pm 0.13)\%, \nonumber \\ Br (D^{+} \rightarrow K^{-} \pi ^{+} \pi ^{-})&= (9.1 \pm 0.6)\%. \end{aligned}$$
(7)

These data are displayed in Figs. 3 (for the \(D^0\) meson) and 4 (for the \(D^+\) meson) and are listed in Tables 1 and 2 along with the corresponding values of \(\chi ^{2}\). The number of data points and the data properties as well as the center-of-mass energy (\(\sqrt{s}\)) are presented in these tables. We have also presented the total \(\chi ^{2}\) divided by the number of degrees of freedom \(\chi ^2/{\texttt {d.o.f}}\) for each analysis. These values show the quality of our well-satisfying fit.

Another important measurement on the charmed mesons production has been done by CLEO Collaboration [21] in the \(e^-e^+\) annihilation. Excluding the decay products of B mesons, their results are presented for the scaled momentum spectra \(d\sigma /dx_{p}\) at \(\sqrt{s} = 10.5\) GeV where \(x_{p} = \vert \overrightarrow{p} \vert / \vert \overrightarrow{p} \vert _{\texttt {max}}\). As was mentioned, the OPAL Collaboration [15, 16] has presented the cross section as a function of the scaled energy \(x_D\). The relation between these two variables reads [17, 18]

$$\begin{aligned} x_{p} = \sqrt{\frac{x_D^{2} - \rho _{H}}{ 1-\rho _H}}, \end{aligned}$$
(8)

where \(\rho _H = 4 m_H^{2}/s\). Since the variable \(x_D\) ranges as \(\sqrt{\rho _{H}}<x_D < 1\), consequently \(x_{p}\) takes values from 0 to 1. For differential cross section the conversion formula is

$$\begin{aligned} \frac{d\sigma (x_p)}{dx_p} = (1-\rho _{H}) \frac{x_{p}}{x_D} \frac{d \sigma (x_D)}{dx_D}. \end{aligned}$$
(9)

Although the CLEO data can provide useful information on the \(D^0\) and \(D^+\) FFs, but there is a problem in using them in the analysis. In fact, as was mentioned, we have chosen the ZM-VFN scheme in our analysis which is reliable only in the region of large transverse momenta or equivalently in high energy scales. On the other hand, the data from CLEO are located much closer to the thresholds \(\sqrt{s} = 2 m_{c}\) and \(\sqrt{s} = 2 m_{b}\) of the transitions \(c \rightarrow H_{c}\) and \(b \rightarrow H_{b}\), than those from OPAL. Hence, including the CLEO data sets in the analysis might be a reason for tension. To check this point, we converted the CLEO data to the desired form \(d\sigma /dx_D\) using Eqs. (8) and (9) and included them into our analysis. We observed that inclusion of these data increased the value of \(\chi ^{2}\), significantly. Accordingly, we restricted ourselves to the OPAL data sets for extracting the charmed mesons FFs and neglected the CLEO data sets. We remind that our choice of the massless scheme was due to the lack of massive partonic cross sections at NNLO, currently.

In next section, we shall present the main findings of our study and discuss on the results. We shall compare our \(zD^{D^0}(z, \mu ^2)\) and \(zD^{D^+}(z, \mu ^2)\) FFs with other results in the literature. A detailed comparison of our NLO and NNLO theoretical predictions for the SIA cross sections with the analyzed data sets will be also presented.

5 Results and discussion

After introducing all ingredients needed for analysis, we are now in a situation to perform a fit with experimental data sets for each hadron species (\(D^0\) and \(D^+\)). In this section, at first, the numerical results obtained for the \((c, b)\rightarrow D^0/D^+\) FFs through the perturbative QCD analysis are reported at the initial scale \(\mu _0\). Next, as an example, we present our results for the FFs along with their uncertainty bands for the gluon, charm and bottom quarks up to NLO and NNLO corrections at \(\mu ^2 = 100\) GeV\(^2\). Our results for the FFs are compared to the KKKS08 FFs [17, 18] for D mesons. In addition, our theoretical predictions as well as the error bands for total and b-tagged cross sections are compared with the analyzed SIA experimental data sets.

Table 3 The optimal values for the input parameters of the \(D^0\)-FF (4) at the initial scale \(\mu _0^2 = 18.5\) GeV\(^{2}\) determined by QCD analysis of the experimental data listed in Table 1
Table 4 As in Table 2, but for \(D^+\)

5.1 Our FF sets in comparison with KKKS08 sets

The best values of the fit parameters for the FFs of charm and bottom quarks into the \(D^0\) and \(D^+\) mesons are listed in Tables 3 and 4 for the NLO and NNLO accuracies at the initial scale \(\mu _0\). Since the time-like matching conditions are not known for NNLO correction we chose the input scale as \(\mu _0=18.5\) GeV\(^2\) [13, 52] which is above the b-quark mass threshold. According to the Table 1, the value of \(\chi ^2/{\texttt {{d.o.f}}}\) for the \(D^0\) FFs at NLO and NNLO accuracies are 1.149 and 1.05, respectively. Hence, one can conclude that the inclusion of higher order QCD corrections can improve the fit quality. The same conclusion does also hold for the \(D^+\) FFs analysis, see Table 2. In fact, a comparison between the values of \(\chi ^2_{{\texttt {{NNLO}}}/{\text{ d.o.f }}} = 0.69\) and \(\chi ^2_{{\texttt {{NLO}}}/{\text{ d.o.f }}} = 0.75\) is a reason for the goodness of fit at NNLO analysis.

Fig. 1
figure 1

The \(b+{\bar{b}}\), \(c+{\bar{c}}\) and gluon FFs obtained at NLO (solid lines) and NNLO (dashed lines) QCD analyses of \(D^0\) meson productions. The results of KKKS08 analysis [17, 18] (dot-dashed lines) are also shown for comparison. The error bands (shaded bands) correspond to the choice of tolerance \(\Delta \chi ^2 = 1\) obtained by using the Hessian approach

Fig. 2
figure 2

As in Fig. 1, but for the \(D^+\) meson

In Fig. 1, we plotted the FFs of \(D^0\) and \(D^+\) at NLO and NNLO accuracies at higher energy scale \(\mu ^2=100\) GeV\(^2\). To do this, we studied the \(D^0\) fragmentation from the \(c+{\bar{c}}\) and \(b+{\bar{b}}\) quarks as well as the gluon contribution for both NLO (solid lines) and NNLO (dashed lines) accuracies. For a quantitative comparison, our results are compared with the ones obtained through using the fit parameters presented by the KKKS08 Collaboration (dot-dashed lines) [17, 18]. As is seen, our result for the transition of \(b+{\bar{b}}\) into the \(D^0\) meson is in good agreement with the corresponding result obtained from the KKKS08 analysis. For the FF of \(c+{\bar{c}}\), our results are different from the KKKS08 analysis, specifically, in the large z. For the case of gluon FF \(zD_g^{D^0} (z, \mu ^2)\), a significant difference is seen for a wide range of z. The error bands in Fig. 1 correspond to the choice of one-unit tolerance \(\Delta \chi ^2 = 1\) obtained using the Hessian approach. The green and yellow bands show the NLO and NNLO error uncertainties, respectively. For the differences between our results and the ones from the KKKS08 analysis, it should be noted that the data sets included in our fit and the KKKS08 analysis are different. In fact, the KKKS08 Collaboration has included the data from BELLE in their analyses as well, which is now removed due to an unrecoverable error in the measurements. Moreover, CLEO data has been also included in the KKKS08 analysis. Since, both the CLEO and Belle dataset have been measured at low energy then they cause a slightly harder FF, as is expected. According to the results presented in Tables 1 and 2 of Ref. [17, 18], these two datasets impact the c-quark FF parameters more than the b-quark one. On the other hand, the initial scales of energy are not the same in both analyses so that the KKKS08 has set the initial scale as \(\mu _0^2=m_c^2\) while ours is \(\mu _0^2=18.5\) GeV\(^2\) which is a little larger than \(m_b^2\).

In Fig. 2, the same study is done for the \(D^+\) at the scale \(\mu ^2 = 100\) GeV\(^2\) for both NLO (solid lines) and NNLO (dashed lines) analyses. They are also compared with the results obtained through the KKKS08 analysis (dot-dashed lines). Our result for the b-quark FF is in good agreement with the one obtained by KKKS08 analysis. In the case of charm quark and gluon FFs our results behave differently in comparison to the KKKS08 FFs. Nevertheless, as is seen from Tables 1 and 2, the inclusion of higher order QCD corrections leads to improve the value of \(\chi ^2/{\texttt {d.o.f}}\) slightly when going from NLO to the NNLO accuracy. The central values and the size of uncertainty for the fragmentation of heavy quarks \(q=c+{\bar{c}}, b+{\bar{b}}\) and gluon into the \(D^+\) meson are found similar in behavior at NLO and NNLO QCD corrections.

Concerning the gluon and light quarks FFs, remember that there are no free fit parameters associated to their FFs so their forms were taken to be zero at the initial scale. Available data do not provide constraints on the gluon and light quark FFs so they are generated at higher scales through the DGLAP evolution equations [35,36,37,38,39]. The small uncertainty bands for the gluon FF in Figs. 1 and 2 are expected because they are only sensitive to the quark FFs uncertainties, directly, through DGLAP evolution. Since, the gluon FF really matters, for example, in the process \( p + p \rightarrow D + X\) at the Tevatron or the LHC with a contribution to the differential cross section easily exceeding \(50\%\), then its accurate determination as much as possible is needed. Hence, in order to well constrain the gluon FF, one needs to includes hadron collider observables which also have a significant impact on the gluon FF through a direct determination. However, this is beyond the scope of our present analysis and left for future work.

Fig. 3
figure 3

Our NLO and NNLO theoretical predictions are compared with the normalized inclusive total (left) and b-tagged (right) data sets for \(D^0\) meson production from OPAL experiment

Fig. 4
figure 4

Same as Fig. 3 but for the \(D^+\) meson

5.2 Data/theory comparisons

In what follows we mainly focus on our NLO and NNLO theoretical predictions for the \(D^0\) and \(D^+\) mesons production in \(e^+ e^-\) annihilation process. Then, we compare the predictions with the inclusive total and b-tagged data sets to judge the goodness of our fit. Figure 3 includes our theoretical calculation for the total and b-tagged cross sections by applying the evolved FFs at the scale \(\mu =M_Z\) at NLO (solid line) and NNLO (dashed line) accuracies as well as their \(1-\sigma \) uncertainty bands. Our results are compared to the OPAL data for cross section measurements at the scale \(\mu =M_Z\). As is seen, Fig. 3 shows a clear agreement between our NLO/NNLO QCD fits and the data sets which indicates a good fit quality of our QCD analyses. Our NLO and NNLO theoretical predictions for the normalized inclusive total and b-tagged cross sections of \(D^+\) meson production are also shown in Fig. 4. These theoretical predictions are also in good agreements with the analyzed data sets. With a few accuracy, it is seen that the inclusion of higher order QCD corrections up to NNLO leads to reduction in the size of cross section at the region \(x_D\le 0.2\) and for larger scaling variable \(x_D\) the NNLO correction does not change the NLO theoretical predictions, significantly. The error bands of our theoretical predictions for NLO and NNLO corrections are rather the same.

5.3 The branching fractions and the average energy fraction of hadrons

Besides the \((c, b) \rightarrow H_c\) FFs themselves, their first two moments are also of phenomenological interest. The first one corresponds to the branching fractions which is defined as

$$\begin{aligned} B_Q(\mu ) = \int ^1_{z_{cut}} dz D(z,\mu ^2). \end{aligned}$$
(10)

The second moment corresponds to the average fraction of energy that the produced meson receives from the parent quark Q, namely

$$\begin{aligned} \langle z \rangle _Q (\mu )= \frac{1}{B_Q(\mu )} \int ^1_{z_{cut}} dz zD(z,\mu ^2), \end{aligned}$$
(11)

where the cut \(z_{\mathrm{cut}}=0.1\) excludes the problematic z range where our formalism is not valid, however, in Figs. 3 and 4 it is shown that there are no experimental data at \(z <z_{\mathrm{cut}}\). These two quantities stringently characterize the lineshape in x of the \(Q\rightarrow H_c\) FFs at a given value of \(\mu \) and simplify the comparisons with previous FF sets introduced by other authors.

Table 5 The values of \(B_c(\mu )\) and \(\langle z \rangle _c(\mu )\) for the \(D^+\) and \(D^0\) mesons at NLO accuracy
Table 6 Same as Table 5 but at NNLO accuracy

Tables 5 and 6 contain the values of \(B_c\) and \(\langle z \rangle _c \) at the NLO and NNLO accuracies for the \(D^0\) and \(D^+\) mesons, respectively, at \(\mu =2m_b\) and \(M_Z\). These results can be compared with the values of the average energy fractions and the branching fractions of the \(c\rightarrow D^0/D^+\) transitions measured by the OPAL Collaboration [15, 16] at \(\sqrt{s}=M_Z\), i.e.

$$\begin{aligned} B_{c\rightarrow D^0}(M_Z)= & {} 0.605\pm 0.040,\nonumber \\ B_{c\rightarrow D^+}(M_Z)= & {} 0.235\pm 0.032,\nonumber \\ \langle z \rangle _{c\rightarrow D^0} (M_Z)= & {} 0.487\pm 0.014,\nonumber \\ \langle z \rangle _{c\rightarrow D^+} (M_Z)= & {} 0.483\pm 0.019. \end{aligned}$$
(12)

A comparison between these experimental values and the theoretical ones presented in Tables 5 and 6 shows the convenient effect of NNLO corrections which lead to much more consistencies. We note also that at each order of perturbative QCD corrections the values of \(\langle z \rangle (\mu )\) are shifted towards smaller values through the DGLAP evolution in \(\mu \), as is expected.

6 Energy spectrum of charmed mesons in top quark decays

As a topical application of our D-meson FFs, we study inclusive single D-meson production at the LHC. These mesons may be produced directly or through the decay of heavier particles, including the Z boson, the Higgs boson, and the top quark. For definiteness, we turn to apply the extracted \(D^0/D^+\)-FFs to make our phenomenological predictions for the energy distribution of charmed mesons produced in top quark decays through the following process

$$\begin{aligned} t \rightarrow b + W^+ (g) \rightarrow W^+ + D^0/D^+ + X, \end{aligned}$$
(13)

where X collectively denotes any other final-state particles. The study of energy spectrum of produced mesons through top decays might be considered as an indirect channel to search for the top quark properties.

At the parton level in the process (13), both the b-quark and gluon may hadronize into the charmed mesons. The gluon fragmentation contributes to the real radiations at NLO and higher orders. Although, the contribution of gluon fragmentation can not be discriminated but it is considered to have accurate predictions for the energy spectrum of outgoing mesons.

Fig. 5
figure 5

\(d\Gamma (t\rightarrow D^0+Jets)/dx_D\) as a function of \(x_D\) in NLO (dot-dashed line) and NNLO (solid line) accuracies at \(\mu =m_t\). Our results are also compared with the NLO one from KKKS08 [17, 18] (dashed)

Ignoring the b-quark mass and by working in the ZM-VFN scheme, to obtain the energy distribution of charmed mesons through the process (13) we employ the factorization theorem as

$$\begin{aligned} \frac{d\Gamma }{dx_D} =\sum _{i=b,g} \int _{x_i^{min}}^{x_i^{max}} \frac{dx_i}{x_i}\, \frac{d\Gamma }{dx_i} (\mu _R,\mu _F) D_i^{D^{+}} \left( \frac{x_D}{x_i}, \mu _F\right) ,\nonumber \\ \end{aligned}$$
(14)

where, following Ref. [53], we defined the scaled-energy fraction of charmed meson as \(x_D = 2 E_{D}/(m_t^{2} - m_W^{2})\). In the above relation, \(d\Gamma /dx_i \) are the differential decay rates of the process \(t \rightarrow i + W^+ (i=b, g)\) at the parton level. In Refs. [53, 54], the NLO analytical expressions of the differential decay widths \(d \Gamma /dx_i\) are presented for the polarized and unpolarized top quark decays. In (14), the factorization (\(\mu _F\)) and renormalization (\(\mu _R\)) scales are arbitrary but to remove the large logarithms which appear in the differential decay rate, here, we set them to \(\mu _R = \mu _F = m_t = 172.9\) GeV.

Adopting \(m_W=80.39\) GeV, in Fig. 5 we plotted the energy distribution of \(D^0\)-meson produced in the unpolarized top quark decay at NLO (dot-dashed line) and NNLO (solid line) accuracies. We have also presented an uncertainty band for the NNLO result. Using the NLO FFs of \((b,g)\rightarrow D^0\) from Refs. [17, 18], we have also compared our results with the one from the KKKS08 Collaboration (dashed). In Fig. 6, we have presented our NLO and NNLO predictions for the energy distribution of \(D^+\)-mesons along with the uncertainty band for the NNLO result. As is seen from these figures, in comparison with the KKKS08 result our FFs lead to an enhancement(reduction) in the energy spectrum of \(D^0(D^+)\) meson at the peak position. Study of the \(x_D\)-distribution (i.e. \(d\Gamma /dx_D\)) of the dominant decay mode \(t \rightarrow W^+ +D^0/D^+ + X\) at the CERN LHC will enable us to deepen our understanding of the nonperturbative aspects of D-meson formation by hadronization and to pin down the \((b, g) \rightarrow D^+/D^0\) FFs. At the LHC, the study of this energy spectrum can be also considered as a new window towards searches on new physics. In Ref. [55], Fig. 8, the energy spectrum of B-mesons have been studied through the dominant decays of top quark in the general two Higgs doublet model (2HDM), i.e. \(t\rightarrow b(\rightarrow B+X)+H^+\). There is shown that there is a considerable difference between the energy spectrum of mesons produced in the Standard Model, i.e. \(t\rightarrow b(\rightarrow B+X)+W^+\), and 2HDM. In other words, any considerable deviation of energy distribution of produced mesons from the theoretical predictions in the SM theory can be related to the new physics, see also [56, 57].

Fig. 6
figure 6

As in Fig. 5, but for the \(D^+\)-meson

7 Summary and conclusions

The first set of nonperturbative FFs for bottom-flavored hadrons (B-hadrons), both at NLO and NNLO in the ZM-VFNS, was presented in our previous work [58] by fitting to all available experimental data of inclusive single B-hadron production in \(e^+e^-\) annihilation, \(e^+e^-\rightarrow B+X\), from ALEPH [59], OPAL [60], SLD [61], and DELPHI [62]. In Ref. [52], we have also provided the first QCD analysis of \((c,b)\rightarrow D^{*\pm }\) FFs up to NNLO accuracy through a QCD fit to SIA data from ALEPH [19] and OPAL [16] collaborations at LEP. In both works, the effects of hadron mass were ignored. In the present study, a new determination of nonperturbative FFs for \(D^0\) and \(D^+\) mesons are presented at NLO and, for the first time, at NNLO in perturbative QCD considering the hadron mass effects. Of all the available data sets for \(D^0\) and \(D^+\) productions in \(e^+e^-\) annihilation, i.e. OPAL, CLEO and BELLE, the \(D^0/D^+\)-FFs are determined by fitting the data taken by the OPAL Collaboration at LEP, because the data from BELLE is now removed due to an unrecoverable error in the measurements and including the CLEO data sets in the analysis might be a reason for tension. The uncertainties of extracted FFs and SIA cross sections are also estimated using the standard ‘Hessian” approach. The determination of uncertainty includes the error estimation for the tolerance criterion of \(\chi ^2 = 1\). We judged the quality of our fit by comparing with the prior result presented by the KKKS08 Collaboration [17, 18] and also showed how they describe the available data for charmed meson productions. Considering the \(\chi ^2\) values, we have shown that the inclusions of higher order QCD corrections and hadron mass effects could slightly improve the fit quality.

As is seen from Figs. 1 and 2, our results for the fragmentation of \(b+{\bar{b}}\) into the \(D^0\) and \(D^+\) mesons are in good agreement with the ones presented by KKKS08. In comparison to the KKKS08’s results, there is a considerable difference between the KKKS08 FFs for the transition \(c+{\bar{c}} \rightarrow D^0/D^+\) and ours at large values of z. This difference holds for the gluon FFs over the whole range of z. The reason for this inconsistency might be due to the different initial energy scales chosen, the different SIA data sets used and different schemes applied. To check the validity of our results, we have also calculated the branching fractions of mesons and the average fractions of energy carried by the outgoing mesons and compared them with the available experimental data. A good consistency between them, specifically at NNLO, guarantees the validity of our analysis.

As a typical application of extracted FFs, we employed the NLO and NNLO FFs to make our theoretical predictions for the scaled-energy distributions of \(D^0/D^+\)-mesons inclusively produced in top quark decays.

To describe the novelty and innovation of our work, it should be noted that this study introduces the following improvements. It is one of the first attempts to contain higher order QCD corrections into the \(D^0/D^+\) mesons FFs considering all available data. As was explained, the results of Refs. [14, 17, 18], as the only references focused on the D-mesons FFs, have included the BELLE data in their analyses as well which are now removed from the Durham database due to some errors reported by the authors. Our work also includes the effects of hadron mass corrections into the FF analysis. Hence, the findings of this paper could make several contributions to the current literature. For future study, it would be interesting to include other sources of experimental observables which carry more information on quark and gluon FFs. Apart from the data, this study is possible if other theoretical partonic cross sections for single inclusive production of partons at NNLO accuracy are available. Another possible area of future research would be to investigate the electromagnetic initial-state radiation (ISR) as well as the effects of heavy quarks mass corrections, however, the latter is of minor importance. The bulk of ISR corrections is due to the effect of electromagnetic radiation emitted from the incoming electrons and positrons. As was explained in Refs. [17, 18], the impact of ISR on the determination of FFs is found to be non-negligible for the analysis of the BELLE and CLEO data which are not included in our work.

The NLO and NNLO \(D^0\) and \(D^+\) FFs sets presented in this work are available in the standard LHAPDF format [63] from the author upon request.