1 Introduction

A phase of matter made of deconfined quarks and gluons, called the quark-gluon plasma (QGP), is created in ultrarelativistic heavy-ion collisions, as supported by several measurements at the SPS, RHIC, and LHC particle accelerators [1,2,3,4,5,6,7,8,9]. The QGP formed in such extreme conditions is considered to be a nearly perfect fluid [10]. Heavy quarks (charm and beauty), mostly produced via hard partonic scattering processes on a timescale shorter than the QGP formation time [11, 12], are effective probes of the properties and dynamics of the QGP. They interact with the medium constituents, losing energy via radiative and collisional processes [13]. The significant suppression of charm- and beauty-hadron production yields at intermediate and high transverse momentum \((p_\textrm{T}>\) 6\(~\textrm{GeV}/c)\) observed in heavy-ion collisions at both RHIC [14,15,16,17,18] and LHC [19,20,21,22,23,24,25,26,27,28,29,30,31,32,33], compared to appropriately scaled yields from proton–proton (pp) collisions, indicates a substantial energy loss of heavy quarks in the QGP.

The azimuthal anisotropy in momentum space of final-state hadrons acts as an additional observable to probe the properties of the QGP. In non-central nucleus–nucleus collisions, the spatial anisotropy in the initial matter distribution due to the asymmetry of the nuclear overlap region is transferred to the final-state particle momentum distribution via multiple collisions, a phenomenon referred to as anisotropic flow [34, 35]. The anisotropic flow is quantified by the harmonic coefficients \(v_{{\textrm{n}}}=\langle \cos [{{\textrm{n}}}(\varphi -\Psi _{{\textrm{n}}})]\rangle \) of the Fourier expansion of the particle azimuthal angle \((\varphi )\) relative to the collision symmetry planes with angles \(\Psi _{{\textrm{n}}}\) for the \({\textrm{n}}\)th harmonic. The second harmonic, \(v_2\), also known as elliptic flow, is the largest coefficient in non-central heavy-ion collisions. At low \(p_\textrm{T}\) \((p_\textrm{T} < 6~\textrm{GeV}/c)\), the heavy-flavour \(v_2\) can help to quantify the extent to which charm and beauty quarks participate in the collective expansion of the medium [36] and the fraction of heavy quarks hadronising via recombination with light quarks in the QGP medium in the intermediate \(p_\textrm{T}\) region \((6< p_\textrm{T} < 10~\textrm{GeV}/c)\) [37, 38]. In addition, at high \(p_\textrm{T}\) \((p_\textrm{T} > 10~\textrm{GeV}/c)\), the \(v_2\) of heavy-flavour hadrons can constrain the path-length dependence of energy loss in the medium for heavy quarks [39, 40].

D mesons and charm-hadron decay leptons show a positive \(v_2\) in nucleus–nucleus collisions at both RHIC [14, 41,42,43] and LHC [44,45,46,47,48,49,50,51,52,53] energies. The comparison of experimental measurements with theoretical models indicates that charm quarks participate in the collective expansion of the medium, and both collisional processes and the hadronisation of charm quarks via coalescence with light quarks are important to describe the observed elliptic flow [54,55,56,57,58,59,60,61,62,63]. In particular, the D-meson \(v_2\) has a magnitude similar to the \(v_2\) of charged pions for \(3<p_\textrm{T} < 6~\textrm{GeV}/c\), suggesting that low-\(p_\textrm{T}\) charm quarks have a relaxation time comparable to the QGP lifetime [64]. Due to their higher mass, beauty quarks are unlikely to reach thermalisation in the medium, therefore their azimuthal anisotropy can give further insight into the interactions of heavy quarks with the medium [65,66,67,68]. The experimental information is still poor for the beauty-hadron \(v_2\) at low momentum. The elliptic flow of \(\textrm{J}/\uppsi \) mesons originating from beauty-hadron decays (non-prompt) measured by the CMS and ATLAS Collaborations is consistent with zero within large uncertainties for \(p_\textrm{T} > 3~\textrm{GeV}/c\) [69, 70]. The \(v_2\) of leptons from beauty-hadron decays measured by ALICE and ATLAS is found to be positive [71, 72]. However, due to the small lepton masses, correlations between the kinematic variables (\(p_\textrm{T}\) and direction) of the beauty hadrons and the decay leptons are broad. This is improved when choosing a decay into a heavier particle. A measurement of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) has been recently submitted for publication by CMS [73].

In this letter, the measurement of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) at midrapidity \((|y|<0.8)\) in Pb–Pb collisions at a centre-of-mass energy per nucleon pair \(\sqrt{s_{\textrm{NN}}}=5.02\) TeV with the ALICE detector is reported. The \(\mathrm {D^0}\)-meson \(v_2\) is measured with the Scalar Product (SP) method [74, 75] in midcentral collisions (30–50% centrality class). The non-prompt \(\mathrm {D^0}\)-meson \(v_2\) is extracted and compared with previous measurements of the prompt non-strange D-meson \(v_2\) (average of \({\textrm{D}}^{0}\), \({\textrm{D}}^{+}\), and \({\textrm{D}}^{*+})\) and the \(v_2\) of electrons from beauty-hadron decays, as well as with theoretical models based on beauty-quark transport in the QGP.

2 Experimental apparatus and data analysis

A description of the ALICE detector and its performance can be found in Refs. [9, 76, 77]. The main detectors used for this analysis are the Inner Tracking System (ITS) [78] for track and vertex reconstruction, the Time Projection Chamber (TPC) [79] for track reconstruction and particle identification (PID) via the measurement of the specific energy loss, and the Time-Of-Flight (TOF) [80] detector for PID via the measurement of the particle flight time from the interaction point to the detector. These detectors are located inside a large solenoidal magnet providing a magnetic field of up to 0.5 T parallel to the LHC beam direction and cover the pseudorapidity interval \(|\eta |<0.9\). A minimum-bias interaction trigger was used, requiring coincident signals in the V0A and V0C detectors [81], two scintillator arrays covering the full azimuth in the pseudorapidity intervals \(2.8< \eta < 5.1\) (V0A) and \(-3.7< \eta < -1.7\) (V0C). An online selection based on the V0 signal amplitudes was also applied in order to enhance the sample of midcentral collisions as an additional trigger class. Background events from beam–gas interactions were rejected offline using the timing information provided by the V0 and the neutron Zero-Degree Calorimeter (ZDC) [82]. Events used in the analysis were required to have a primary vertex reconstructed within \(\pm 10~{\textrm{cm}}\) from the nominal interaction point along the beam axis. Centrality intervals for events were defined in terms of percentiles of the hadronic Pb–Pb cross section based on the signal amplitude of the V0 detectors [83]. After the aforementioned selections, a sample of about \(85\times 10^6\) events in the 30–50% centrality class was utilised for further analysis, corresponding to an integrated luminosity of \({\mathscr {L}}_\textrm{int}\) \(\simeq 56~\upmu {\textrm{b}}^{-1}\) [84].

The \(\mathrm {D^0}\) mesons and their charge conjugates were reconstructed via the hadronic decay channel \({\textrm{D}}^0 \rightarrow {\textrm{K}}^-\) \({\uppi ^+}\) with branching ratio \({\textrm{BR}} = (3.947 \pm 0.030) \%\) [85]. The \(\mathrm {D^0}\)-meson candidates were selected combining pairs of tracks with opposite charge signs, each with \(p_\textrm{T} > 0.3~\textrm{GeV}/c\) and \(|\eta |<0.8\). The selection criteria require at least 70 (out of 159) associated space points in the TPC, a minimum of two (out of six) measured clusters in the ITS, with at least one in either of the two innermost layers, and a fit quality \(\chi ^2/{\textrm{ndf}}<1.25\) in the TPC. These track selection criteria reduce the \(\mathrm {D^0}\)-meson acceptance in rapidity, which falls steeply to zero for \(|y|>0.5\) at low \(p_\textrm{T}\) and for \(|y|>0.8\) for \(p_\textrm{T} >5~\textrm{GeV}/c\). Thus, a fiducial acceptance selection \(|y| < y_{\textrm{fid}}(p_\textrm{T})\) was applied to grant a uniform acceptance inside the rapidity range considered. The \(y_{\textrm{fid}}(p_\textrm{T})\) value was defined as a second-order polynomial function, increasing from 0.5 to 0.8 in \(0< p_\textrm{T} < 5~\textrm{GeV}/c\), and as a constant term, \(y_{\textrm{fid}}=0.8\), for \(p_\textrm{T} >5~\textrm{GeV}/c\).

A machine-learning approach with multi-class classification based on Boosted Decision Trees (BDT) was adopted to simultaneously suppress the large combinatorial background and separate the contributions of prompt and non-prompt \(\mathrm {D^0}\) mesons. The implementation of the BDT algorithm provided by the XGBoost [86] library was employed. Samples of prompt and non-prompt \(\mathrm {D^0}\) mesons for the BDT training were obtained from Monte Carlo (MC) samples, which simulated the Pb–Pb events at \(\sqrt{s_{\textrm{NN}}} = 5.02\) TeV with the HIJING v1.383 generator [87]. Additional \(\mathrm {c{\overline{c}}}\) or \(\mathrm {b{\overline{b}}}\) quark pairs were injected in each simulated event using the PYTHIA 8.243 event generator [88, 89] (Monash 2013 tune [90]) to enrich the MC sample of prompt and non-prompt \(\mathrm {D^0}\)-meson signals. The generated particles were transported through the experimental apparatus using the GEANT3 transport package [91]. Samples for the combinatorial background were obtained from candidates in the sideband region in the data, i.e. \(5\sigma< |\Delta M| < 9\sigma \) in the invariant mass distribution, where \(\Delta M\) is the difference between the invariant mass and the mean of signal distribution, and \(\sigma \) is the invariant-mass resolution. Before the training, loose selections on kinematic and topological variables were applied to the \(\mathrm {D^0}\)-meson candidates to reduce the computation time. The training variables provided to the BDTs were mainly based on the displacement of the \({\textrm{D}}^{0}\) decay vertex from the primary vertex of the collision. These included the impact parameter of the \(\mathrm {D^0}\)-meson daughter tracks, the distance between the \(\mathrm {D^0}\)-meson decay vertex and the primary vertex, and the cosine of the pointing angle between the \(\mathrm {D^0}\)-meson candidate line of flight (the vector connecting the primary and secondary vertices) and its reconstructed momentum vector, as well as the PID information of the decay tracks. A detailed description of the training procedure is reported in Ref. [92]. Independent BDTs were trained in the different \(p_\textrm{T}\) intervals of the analysis. Subsequently, the BDTs were applied to the experimental data sample to obtain the BDT scores related to the candidate probability to be a non-prompt \(\mathrm {D^0}\) meson or to belong to the combinatorial background. Selections were applied on the scores to reduce the large combinatorial background and to obtain different fractions of non-prompt \({\textrm{D}}^{0}\) candidates \((f_{\mathrm {non-prompt}})\). The \(\mathrm {D^0}\)-meson \(v_2\) coefficient was measured with the Scalar Product (SP) method [74, 75, 93],

$$\begin{aligned} v_{2}\{{\textrm{SP}}\}{} & {} =\left\langle \left\langle \pmb {u}_{{2}}\cdot \frac{\pmb {Q}_{{2}}^{\mathrm{V0C*}}}{M^{\textrm{V0C}}}\right\rangle \right\rangle \bigg / \sqrt{\frac{\left\langle \frac{\pmb {Q}_{{2}}^{\textrm{V0C}}}{M^{\textrm{V0C}}}\cdot \frac{\pmb {Q}_{{2}}^{\mathrm{V0A*}}}{M^{\textrm{V0A}}}\right\rangle \left\langle \frac{\pmb {Q}_{{2}}^{\textrm{V0C}}}{M^{\textrm{V0C}}}\cdot \frac{\pmb {Q}_{{2}}^{\mathrm{TPC*}}}{M^{\textrm{TPC}}}\right\rangle }{\left\langle \frac{\pmb {Q}_{{2}}^{\textrm{V0A}}}{M^{\textrm{V0A}}}\cdot \frac{\pmb {Q}_{{2}}^{\mathrm{TPC*}}}{M^{\textrm{TPC}}}\right\rangle }} \nonumber \\{} & {} =\left\langle \left\langle \pmb {u}_{{2}}\cdot \frac{\pmb {Q}_{{2}}^{\mathrm{V0C*}}}{M^{\textrm{V0C}}}\right\rangle \right\rangle \big / R_{\textrm{2}}, \end{aligned}$$
(1)

where u\(_{{2}} = e^{i{2}\varphi _{{\mathrm {{D}}^{0}}}}\) is the unit flow vector of the \(\mathrm {D^0}\)-meson candidate with azimuthal angle \(\varphi _{\mathrm {D^{0}}}\). \(\pmb {Q}^k_{{2}}\) and \(M^k\) are the subevent \({2}^{\textrm{nd}}\) harmonic flow vector and multiplicity for the subevent k, respectively. The denominator, called the resolution \((R_{\textrm{2}})\), is calculated with the formula introduced in Ref. [75], where the three subevents are defined by the particles measured in the V0C, V0A, and TPC detectors, respectively. For the TPC detector, the azimuthal angles of charged tracks reconstructed with \(|\eta |<0.8\) and the number of measured tracks were used to calculate the \(Q_{2}\) vector and M. For the V0A and V0C detectors, the \(Q_{2}\) vectors were calculated from the azimuthal distribution of the energy deposition in the detector scintillators and M is the sum of the amplitudes measured in each channel [52]. The \(Q_{2}\) vectors are recalibrated using a recentering procedure [94] to correct for effects of non-uniform acceptance. The nonflow effects are suppressed by the pseudorapidity gaps between the TPC, V0A, and V0C detectors [95]. The single bracket \(\langle \rangle \) in Eq. 1 refers to an average over all the events, while the double brackets \(\langle \langle \rangle \rangle \) denote the average over all particles in the considered \(p_\textrm{T} \) interval and all events. The \(R_{\textrm{2}}\) is extracted as a function of the collision centrality. The centrality-integrated \(R_{\textrm{2}}\) value is 0.0438 for the 30–50% centrality class.

The \(\mathrm {D^0}\)-meson \(v_2\) cannot be measured directly using Eq. 1 since \(\mathrm {D^0}\) mesons cannot be identified on a particle-by-particle basis. Therefore, a simultaneous fit to the invariant-mass spectrum and the \(v_2\) distribution as a function of the invariant mass \((M_{{\textrm{K}}\pi })\) was performed for \(\mathrm {D^0}\) candidates in each \(p_\textrm{T} \) interval, in order to measure the raw yields and the \(v_2\) coefficients. The measured total elliptic flow coefficient, \(v^{\textrm{tot}}_{2}\), can be written as a weighted sum of the \(v_2\) of the \(\mathrm {D^0}\)-meson candidates \((v^\textrm{sig}_{2})\), and that of background \((v^\textrm{bkg}_{2})\) [96] as

$$\begin{aligned} v^{\textrm{tot}}_{2}(M_{{\textrm{K}}\pi })= & {} v^\textrm{sig}_{2}\frac{N^\textrm{sig}}{N^\textrm{sig}+ N^\textrm{bkg}}(M_{{\textrm{K}}\pi }) \nonumber \\{} & {} + v^\textrm{bkg}_{2}(M_{{\textrm{K}}\pi })\frac{N^\textrm{bkg}}{N^\textrm{sig}+ N^\textrm{bkg}}(M_{{\textrm{K}}\pi }), \end{aligned}$$
(2)

where \(N^\textrm{sig}\) and \(N^\textrm{bkg}\) are the raw signal and background yields, respectively. The fit function for the \(\mathrm {D^0} \)-candidate invariant-mass distribution was composed of a Gaussian term to describe the signal and an exponential distribution for the background. The contribution of signal candidates with the reflected K–\(\pi \) mass assignment was taken into account with an additional term, which is small thanks to the good PID capability. It was parameterised by fitting the simulated invariant-mass distribution with a double Gaussian function. To improve the stability of the fits, the widths of the signal peaks were fixed to the values extracted from the fits of the invariant-mass distributions in the prompt enhanced sample, given the naturally larger abundance of prompt compared to non-prompt candidates. In the simultaneous fit, the \(v_{2}\) parameter for the candidates with wrong K–\(\pi \) mass assignment was set to be equal to \(v^\textrm{sig}_{2}\), provided that the origin of these candidates are real \(\mathrm {D^0} \) mesons. The \(v^\textrm{sig}_{2}\) was measured from the fit to the \(v^{\textrm{tot}}_{2}\) distribution with the function of Eq. 2, where \(v^\textrm{bkg}_{2}\) is a linear as a function of \(M_{{\textrm{K}}\pi }\) for \(p_\textrm{T} >3~\textrm{GeV}/c\). For \(p_\textrm{T} <3~\textrm{GeV}/c\), a second-order polynomial function was used to parametrise \(v^\textrm{bkg}_{2}\) \((M_{{\textrm{K}}\pi })\). Figure 1 shows an example of the simultaneous fit to the invariant-mass spectrum and \(v_2^{\textrm{tot}}\) as a function of \(M_{{\textrm{K}}\pi }\) with low (left panel) and high (right panel) non-prompt \(\mathrm {D^0}\)-meson candidate BDT score selections in \(3<p_\textrm{T} <4~\textrm{GeV}/c\) in the 30–50\(\%\) centrality class.

Fig. 1
figure 1

Simultaneous fits of the invariant-mass distribution and \(v_2^{\textrm{tot}}(M_{{\textrm{K}}\pi })\) of \(\mathrm {D^0} \) mesons in \(3< p_\textrm{T} < 4~\textrm{GeV}/c\). Left panel: Fits using \(\mathrm {D^0} \)-meson candidates with low probability to be a non-prompt \(\mathrm {D^0}\) meson. Right panel: Fits using \(\mathrm {D^0} \)-meson candidates with high probability to be a non-prompt \(\mathrm {D^0}\) meson. The corresponding BDT score selection for the measured raw yield is reported. The blue lines, the dotted red curves, and the green solid lines represent the total fit function, the combinatorial-background fit function, and the contribution of the reflected signal, respectively

The reconstructed \(\mathrm {D^0}\)-meson signals are a mixture of prompt and non-prompt \(\mathrm {D^0}\) mesons. The \(v^\textrm{sig}_{2}\) is therefore a linear combination of prompt \((v^\textrm{prompt}_\mathrm 2)\) and non-prompt \((v^{\mathrm {non-prompt}}_{2})\) contributions, which can be expressed as

$$\begin{aligned} v^\textrm{sig}_{2}= (1 - f_{\mathrm {non-prompt}}) v^\textrm{prompt}_\mathrm 2+ f_{\mathrm {non-prompt}} v^{\mathrm {non-prompt}}_{2},\nonumber \\ \end{aligned}$$
(3)

where \(f_{\mathrm {non-prompt}} \) is estimated as a function of \(p_\textrm{T} \) with a data-driven method, which is based on the construction of data samples with different abundances of prompt and non-prompt candidates. A set of raw yields \(Y_{i}\) (index i refers to a given selection on the BDT scores) can be obtained by varying the selection on the BDT score, which is related to the candidate probability to be a non-prompt \(\mathrm {D^0}\) meson. These raw yields are related to the corresponding acceptance times efficiency \((\textrm{Acc} \times \epsilon )\) of prompt and non-prompt \(\mathrm {D^0}\) mesons according to the equation

$$\begin{aligned}{} & {} (\textrm{Acc}\times \epsilon )^\textrm{prompt}_{i}\, N_{\textrm{prompt}} + (\textrm{Acc}\times \epsilon )^{\mathrm {non-prompt}}_{i}\,\nonumber \\{} & {} N_{\mathrm {non-prompt}}- Y_{i} = \delta _{i}, \end{aligned}$$
(4)

where \(\delta _{i}\) represents a residual that accounts for the equation not summing exactly to 0 due to the uncertainties on \(Y_{i} \), \((\textrm{Acc}\times \epsilon )^{\mathrm {non-prompt}}_{i}\), and \((\textrm{Acc}\times \epsilon )^\textrm{prompt}_{i}\). By applying at least two different BDT selections and extracting the yields, the corrected yields of prompt (\(N_{\textrm{prompt}}\)) and non-prompt (\(N_{\mathrm {non-prompt}}\)) \(\mathrm {D^0}\) mesons can be obtained from Eq. 4 via a \(\chi ^2\) minimisation. More details can be found in Ref. [92]. The left panel of Fig. 2 shows an example of the raw-yield distributions as a function of the minimum non-prompt \(\mathrm {D^0}\)-meson BDT score threshold used in such a \(\chi ^2\)-minimisation procedure in \(3< p_\textrm{T} < 4~\textrm{GeV}/c\) for the 30–50% centrality class. The raw yield decreases with the increasing minimum threshold for the score to be a non-prompt \(\mathrm {D^0}\) meson, corresponding to an increasing non-prompt \(\mathrm {D^0}\)-meson fraction. The prompt and non-prompt components of the raw yields for each BDT-based selection obtained from the \(\chi ^2\)-minimisation approach, \((\textrm{Acc}\times \epsilon )^\textrm{prompt}_{i} \times N_{\textrm{prompt}} \) and \((\textrm{Acc}\times \epsilon )^{\mathrm {non-prompt}}_{i} \times N_{\mathrm {non-prompt}} \), are shown in the histograms with red and blue colour, respectively, and their sum is reported by the green line. The values of \(N_{\mathrm {non-prompt}}\) and \(N_{\textrm{prompt}}\) can be used to estimate the non-prompt \(\mathrm {D^0}\)-meson fraction in the raw yield for any set of selections i using

$$\begin{aligned}{} & {} f_{\mathrm {non-prompt}} ^{ i} \nonumber \\{} & {} \quad = \frac{(\textrm{Acc}\times \epsilon )^{\mathrm {non-prompt}}_{ i} \, N_{\mathrm {non-prompt}}}{(\textrm{Acc}\times \epsilon )^{\mathrm {non-prompt}}_{ i} \, N_{\mathrm {non-prompt}} +(\textrm{Acc}\times \epsilon )^\textrm{prompt}_{ i} \,N_{\textrm{prompt}}}. \nonumber \\ \end{aligned}$$
(5)

The \(v^\textrm{sig}_{2}\) was determined for three or four non-overlapping intervals of BDT score to be non-prompt \(\mathrm {D^0}\) mesons, depending on the number of candidates in each \(p_{\textrm{T}}\) interval. The result was extrapolated to \(f_{\mathrm {non-prompt}}\) = 0 and \(f_{\mathrm {non-prompt}}\) = 1 using a linear fit according to Eq. 3 in order to estimate the \(v_2\) values for prompt and non-prompt \(\mathrm {D^0}\) mesons, respectively. A similar approach was adopted in Ref. [97]. The right panel of Fig. 2 shows the linear fit of \(v^\textrm{sig}_{2}\) as a function of \(f_{\mathrm {non-prompt}}\) in \(3< p_\textrm{T} < 4~\textrm{GeV}/c\). The blue band represents the 1\(\sigma \) confidence interval obtained from the linear fit, which is considered as the statistical uncertainty of the \(v^\textrm{sig}_{2}\). As a crosscheck about the correlation of the statistical uncertainties on \(v^\textrm{sig}_{2}\) between different values of \(f_{\mathrm {non-prompt}} \), the statistical uncertainty was also calculated with the Jackknife method [98] and found to be consistent with the fit method.

Fig. 2
figure 2

Left panel: Example of the raw-yield distribution as a function of the minimum non-prompt \(\mathrm {D^0}\)-meson BDT score threshold to determine the non-prompt \(\mathrm {D^0}\)-meson fraction in \(3< p_\textrm{T} < 4~\textrm{GeV}/c\). Right panel: \(v^\textrm{sig}_{2}\) as a function of \(f_{\mathrm {non-prompt}}\) in \(3< p_\textrm{T} < 4~\textrm{GeV}/c\). The blue band represents the 1\(\sigma \) confidence interval obtained from the linear fit

3 Systematic uncertainties

Four major sources of systematic uncertainties were considered for the measurement of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\): (i) the signal extraction from the invariant-mass and \(v_{2}^{\textrm{tot}}\) distributions; (ii) the non-prompt fraction estimation; (iii) the D-meson \(p_\textrm{T}\) shape in the simulation; and (iv) the centrality dependence of the SP denominator \((R_{{2}})\). All sources of systematic uncertainties were treated as uncorrelated and added in quadrature to obtain the total systematic uncertainties. Table 1 summarises the estimated values of the systematic uncertainties for each \(p_\textrm{T}\) interval.

Table 1 Summary of the systematic uncertainties on the measurement of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\). The ranges of the uncertainties are quoted as absolute uncertainties, except those on the \(R_{{2}}\) as relative uncertainty

The systematic uncertainty of the signal extraction from the invariant-mass and \(v_{2}^{\textrm{tot}}\) distributions is due to a possible imperfect modelling of the signal and background distributions. It was evaluated by repeating the simultaneous fit with different configurations. In particular, the fit range, signal width within the statistical uncertainties obtained with prompt enhanced sample, and background fit functions used for the invariant-mass and \(v^{\textrm{tot}}_{2}\) distributions were varied. The systematic uncertainty was defined as the RMS of the distribution of the resulting \(v^{\mathrm {non-prompt}}_{2}\) obtained from all these variations. The second source of systematic uncertainty arises from the uncertainty on the determination of the \(f_{\mathrm {non-prompt}}\) of \(\mathrm {D^0}\) mesons with the minimisation method described in Sect. 2. In this method, the raw yields and the efficiencies obtained with several sets of selections are used in order to extract the prompt and non-prompt components. It is therefore sensitive to possible imperfections of the data description in the MC simulations. They were therefore evaluated by using alternative sets of selections for the aforementioned \(\chi ^2\)-minimisation approach [92]; the RMS of the resulting \(v^{\mathrm {non-prompt}}_{2}\) distribution was considered as the systematic uncertainty. The systematic effects due to possible differences between the real and simulated \(p_\textrm{T}\) spectra were estimated by applying different weights to the \(p_\textrm{T}\) distributions of prompt \(\mathrm {D^0}\) mesons and of the parent beauty hadrons in the case of non-prompt \(\mathrm {D^0}\) mesons. In the default analysis procedure, the weights were defined to match the shape given by FONLL in pp collisions [99, 100] multiplied by the nuclear modification factor (\(R_\textrm{AA}\)) prediction from the TAMU model [55]. The FONLL spectrum multiplied by the \(R_\textrm{AA}\) from the LIDO model [101] was used as an alternative shape for the systematic evaluation. The effect due to flow-related modifications of the parent beauty-hadron \(p_{\textrm{T}}\) spectra was found to be negligible with respect to the assigned \(p_{\textrm{T}}\)-shape systematic uncertainty. The contribution of the SP denominator \(R_{{2}}\) to the systematic uncertainty is due to the centrality dependence. It was evaluated as the difference of the centrality-integrated \(R_{{2}}\) values with those obtained from weighted average \(R_{{2}}\) values in narrow centrality intervals using the \(\mathrm {D^0}\)-meson yields as weights [52].

4 Results

Fig. 3
figure 3

Left panel: Elliptic flow \(v_2\) of non-prompt \(\mathrm {D^0}\) mesons (blue points) and average of prompt non-strange D mesons [52] (red points) as a function of \(p_\textrm{T}\) in 30–50% Pb–Pb collisions at \(\sqrt{s_{\textrm{NN}}}=5.02~\textrm{TeV} \). The symbols are positioned at the average \(p_\textrm{T}\) of the reconstructed \(\mathrm {D^0}\) mesons. Statistical uncertainties are shown as vertical lines and systematic uncertainties as boxes. Right panel: Non-prompt \(\mathrm {D^0}\)-meson \(v_2\) compared with model calculations [62, 101,102,103,104,105,106,107]

The measured non-prompt \(\mathrm {D^0}\)-meson elliptic flow at midrapidity \((|y|<0.8)\) in the 30–50% centrality class is shown in Fig. 3 as a function of \(p_\textrm{T}\). The weighted mean of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) in the measured \(p_\textrm{T}\) range \((2< p_\textrm{T} < 12~\textrm{GeV}/c)\) is 2.7\(\sigma \) above 0. No significant \(p_\textrm{T}\) dependence of the \(v_2\) is observed. The results obtained are compatible within uncertainties with those submitted for publication by CMS [73], which have smaller statistical uncertainty. In the left panel of Fig. 3, the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) is compared with the average \(v_2\) of prompt \({\textrm{D}}^{0}\), \({\textrm{D}}^{+}\), and \({\textrm{D}}^{*+}\) mesons [52]. The non-prompt \({\textrm{D}}^{0}\)-meson \(v_2\) is lower than that of prompt non-strange D mesons with 3.2\(\sigma \) significance in \(2< p_\textrm{T} < 8~\textrm{GeV}/c\), indicating a different degree of participation to the collective motion of the medium between charm and beauty quarks.

The measured \(v_2\) of non-prompt \(\mathrm {D^0}\) mesons is compared with several theoretical models implementing beauty-quark transport in a hydrodynamically expanding QGP phase [62, 101,102,103,104,105,106,107] in the right panel of Fig. 3. All of the considered calculations include collisional interactions between beauty quarks and medium constituents. In addition, the LBT [62, 103], LIDO [101, 107], LGR [104], and Langevin [105, 106] models also include radiative processes. Beauty-quark hadronisation via coalescence is considered for all models in addition to the fragmentation mechanism. Although the models are implemented with different assumptions on the interactions in the QGP and hadronic phases, and on the medium expansion, all of them provide a reasonable description of the measurement within uncertainties. More precise measurements will further constrain model parameters, especially on the spatial diffusion coefficient of beauty quarks, which are implemented differently in the various models.

Fig. 4
figure 4

Elliptic flow \(v_2\) of non-prompt \(\mathrm {D^0}\) mesons (blue points) and electrons from beauty-hadron decays [71] (red points) as a function of \(p_\textrm{T}\) in 30–50% Pb–Pb collisions at \(\sqrt{s_{\textrm{NN}}}=5.02~\textrm{TeV} \), compared with the LIDO model predictions [101, 107]

Figure 4 shows the comparison between the \(v_2\) of electrons from beauty-hadron decays (\(\textrm{b}(\rightarrow \textrm{c})\rightarrow \textrm{e}\)) [71] and the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) measurements. They are compatible in the common \(p_\textrm{T}\) interval within uncertainties. The LIDO model provides reasonable descriptions for these measurements and is consistent with the \(p_\textrm{T}\) shape in the data. Note that, the \(p_\textrm{T}\) of beauty-decay hadrons is not the same \(p_\textrm{T}\) of B mesons due to the decay kinematics. The good agreement between the predictions for B-meson and non-prompt \(\mathrm {D^0}\)-meson \(v_2\) from LIDO indicates that the decay kinematics do not play a significant role in the beauty-hadron \(v_2\) measurements.

5 Conclusions

The measurement of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) in midcentral Pb–Pb collisions (30–50% centrality class) at \(\sqrt{s_{\textrm{NN}}} = 5.02\) TeV is presented in the transverse momentum interval 2 \(< p_{\textrm{T}} < \)12 GeV/c. The non-prompt \(\mathrm {D^0}\)-meson \(v_2\) is found to be positive with a significance of 2.7\(\sigma \) and it is lower by 3.2\(\sigma \) than the prompt non-strange D-meson \(v_2\) (average of \({\textrm{D}}^{0}\), \({\textrm{D}}^{+}\), and \({\textrm{D}}^{*+})\) in the range \(2< p_\textrm{T} < 8\) GeV/c. The measurement is important for the understanding of the degree of thermalisation of beauty quarks in the QGP. Future data samples to be collected with the upgraded ALICE detector in Run 3 will allow for higher-precision measurements of the non-prompt \(\mathrm {D^0}\)-meson \(v_2\) and \(R_{\textrm{AA}}\) [108]. These measurements will provide important constraints to model predictions, and allow for accurate extraction of the spatial diffusion coefficient of beauty quarks.