Prompt and non-prompt \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ elliptic flow in Pb+Pb collisions at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sqrt{s_{_\text {NN}}} = 5.02$$\end{document}sNN=5.02 Tev with the ATLAS detector

The elliptic flow of prompt and non-prompt \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ was measured in the dimuon decay channel in Pb+Pb collisions at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sqrt{s_{_\text {NN}}}=5.02$$\end{document}sNN=5.02 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {TeV}$$\end{document}TeV with an integrated luminosity of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$0.42~\mathrm {nb}^{-1}$$\end{document}0.42nb-1 with the ATLAS detector at the LHC. The prompt and non-prompt signals are separated using a two-dimensional simultaneous fit of the invariant mass and pseudo-proper decay time of the dimuon system from the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ decay. The measurement is performed in the kinematic range of dimuon transverse momentum and rapidity \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$9<p_\mathrm {T}<30$$\end{document}9<pT<30 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {GeV}$$\end{document}GeV, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$|y|<2$$\end{document}|y|<2, and 0–60% collision centrality. The elliptic flow coefficient, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_2$$\end{document}v2, is evaluated relative to the event plane and the results are presented as a function of transverse momentum, rapidity and centrality. It is found that prompt and non-prompt \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ mesons have non-zero elliptic flow. Prompt \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$v_2$$\end{document}v2 decreases as a function of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_\mathrm {T}$$\end{document}pT, while for non-prompt \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$J/\psi $$\end{document}J/ψ it is, with limited statistical significance, consistent with a flat behaviour over the studied kinematic region. There is no observed dependence on rapidity or centrality.


Introduction
With the advent of lead-lead collisions at the centre-of-mass energy of 5.02 TeV per nucleon-nucleon pair, new opportunities open up for understanding the detailed properties of the hot dense plasma produced in such collisions. A special advantage of studies with quarkonia as hard probes of the plasma properties is that the comparison of prompt and non-prompt J/ψ mesons elucidates the differences between the responses of the produced c-quark and b-quark systems. This is because the prompt J/ψ mesons are cc systems produced soon after the collision whereas the non-prompt J/ψ mesons come from decays of b-hadrons that are formed outside the medium [1]. Thus, the comparison of these two classes of J/ψ mesons probes the flavour dependence of the mechanisms of the interactions of heavy quarks with the e-mail: atlas.publications@cern.ch medium. ATLAS measurements of the attenuation of both the prompt and non-prompt J/ψ meson yields indicate very strong medium effects that are surprisingly similar in magnitude at this collision energy [2].
A complementary and powerful probe into the heavyquark flavour dependence of interaction mechanisms can be obtained by studying the azimuthal asymmetries of prompt and non-prompt quarkonia. Such studies [3][4][5] are especially useful in the dimuon transverse momentum range 9 < p T < 30 GeV, investigated in this paper, since this range represents the transition between the lower p T region, in which recombination processes are believed to play an important role [6][7][8], and the higher p T region in which other processes are expected to dominate, such as absorption due to colour-exchange interactions with the medium [9-12]. The naive expectation in this range is that recombination processes will partially couple the produced J/ψ to the hydrodynamic flow of the hot medium, resulting in an enhancement of the observed azimuthal asymmetry at lower p T relative to higher p T [7,11]. In this picture, a flavour-dependent enhancement of the azimuthal asymmetry of J/ψ at low p T can be interpreted as a difference in the degree of recombination between c-and b-quarks and it is expected that any flavour dependence will vanish at higher values of p T , which are accessible by this measurement. A recent transport model study suggests a sensitivity of charm quarks to hydrodynamic flow [13]. In this model, additionally, a strong suppression of the prompt J/ψ yield in the final-state medium should lead to an azimuthal asymmetry even in the high p T region [11].
In non-central collisions, the overlap region of the colliding ions has an elliptic shape. The particle yield is influenced by this matter distribution, leading to the observation of an azimuthal anisotropy relative to the reaction plane as observed for charged hadrons [14][15][16][17][18]. The azimuthal distribution of particles is characterised by a Fourier expansion of the particle yield: where φ is the azimuthal angle of the particle relative to the detector frame of reference, and n is the nth harmonic of the event-plane angle, which can be estimated using the event-plane method [19]. The second-order coefficient, v 2 , is referred to as elliptic flow and its magnitude quantifies the yield modulation relative to the elliptical shape of the initial matter distribution. Interestingly the observed azimuthal asymmetry for prompt J/ψ is the same in central collisions as in non-central collisions [5], although for inclusive J/ψ some indication of the centrality dependence is reported in the lower p T region at forward rapidities at 5.02 TeV [4] and at 2.76 TeV [3]. This is in contradiction with the expected hydrodynamic behaviour, which is confirmed by the results for charged hadrons where the anisotropies are more significant in semi-central collisions than in peripheral and central collisions [14][15][16][17][18]. This intriguing observation may ultimately provide more insight into the origins of azimuthal asymmetries beyond a simple hydrodynamic picture. Further, there is evidence of a surprising universality among many different probes, such as D-mesons and jets [20,21], for which the v 2 values are very similar at high p T . This paper provides v 2 measurements as a function of transverse momentum, rapidity and collision centrality for both prompt and non-prompt J/ψ in the dimuon decay channel, extending the kinematic range covered by recent results from other LHC experiments [3-5].

ATLAS detector
The ATLAS detector [22] at the LHC covers nearly the entire solid angle around the collision point. It consists of an inner tracking detector (ID) surrounded by a thin superconducting solenoid, electromagnetic and hadronic calorimeters, and a muon spectrometer (MS) incorporating three large superconducting toroid magnets. 1 A high-granularity silicon pixel detector surrounds the interaction region and typically provides four measurements per track. It is followed by a silicon microstrip tracker, which provides around eight two-dimensional measurement points per track. These silicon detectors are complemented by a transition radiation tracker (TRT), which enables radially extended track reconstruction up to |η| = 2.0. The ID system is immersed in a 2 T axial magnetic field and provides charged-particle tracking in the range |η| < 2.5. 1 ATLAS uses a right-handed coordinate system with its origin at the nominal interaction point in the centre of the detector and the z-axis along the beam pipe. The x-axis points from the interaction point to the centre of the LHC ring, and the y-axis points upwards. Cylindrical coordinates (r, φ) are used in the transverse plane, φ being the azimuthal angle around the z-axis. The pseudorapidity is defined in terms of the polar angle θ as η = − ln tan(θ/2).
The MS comprises separate trigger and high-precision tracking chambers measuring the deflection of muons in a magnetic field generated by the superconducting air-core toroid magnets. The precision chamber system covers the region |η| < 2.7 with three layers of monitored drift tubes, complemented by cathode strip chambers in the forward region, where the background is the highest. The muon trigger system covers the range |η| < 2.4 with resistive plate chambers in the barrel, and thin gap chambers in the endcap regions.
In addition to the muon trigger, two triggers are used in Pb+Pb collisions to select minimum-bias events. These are based on the presence of a minimum amount of transverse energy, of at least 50 GeV, in all sections of the calorimeter system with |η| < 3.2 or, for events which do not meet this condition, on the presence of energy deposits in both zero-degree calorimeters, which are primarily sensitive to spectator neutrons in the region |η| > 8.3.
A two-level trigger system is used to select events [23]. The first-level trigger is implemented in hardware and uses a subset of detector information to reduce the event rate to a design value of at most 100 kHz. This is followed by a software-based high-level trigger which reduces the event rate to about 1 kHz.

Data, event selection and centrality definition
Data from Pb+Pb collisions at √ s NN = 5.02 TeV were recorded by the ATLAS experiment in 2015. Events were collected using a trigger requiring at least two muons, both with p μ T > 4 GeV. This muon triggered dataset has an integrated luminosity of 0.42 nb −1 . In the offline analysis, reconstructed muons are required to satisfy the tight muon working point ignoring the TRT requirements [24], have p μ T > 4 GeV, |η| < 2.4, and be matched to the muons reconstructed at the trigger level. In addition, muon pairs are required to have pair p T > 9 GeV, rapidity |y| < 2 and be in the invariant mass range 2.6 < m μμ < 3.5 GeV. In addition to the muon triggered event sample, a minimumbias triggered event sample and Monte Carlo (MC) simulated event samples were used for studies of the detector performance. Prompt ( pp → J/ψ → μμ) and nonprompt ( pp → bb → J/ψ → μμ) samples of J/ψ were produced using Pythia 8. 212 Table 1. Only events in the 0-60% centrality interval are used. Events in the 60-80% are disregarded from the study, since they represent only a small fraction of events, below 3% of the full J/ψ sample, which is not significant for the measurement.

Signal extraction and observable determination
The J/ψ v 2 , the second-order coefficient of the Fourier decomposition of the azimuthal angle distribution, is measured using the event-plane method [19]. The event-plane angle is estimated by its second-order harmonic, 2 , using the distribution of transverse energy deposited in the forward calorimeters. Similar methods are described in detail for previous azimuthal anisotropy analyses of charged hadrons with the ATLAS detector [14,15,34]. To reduce autocorrelations in the event-plane analysis, v 2 is measured by correlating J/ψ with positive (negative) pseudorapidity with the eventplane angle measured using the FCal in the negative (positive) η-region. The prompt and non-prompt J/ψ yields are obtained from two-dimensional fits of the reconstructed J/ψ invariant mass and pseudo-proper decay time distributions. The azimuthal distributions of the prompt and non-prompt yields are fitted simultaneously to obtain the elliptic flow coefficients.
The second-order harmonic of the event-plane angle is determined using measurements of transverse energy deposits in each FCal system positioned at η > 3. 2

and
where φ i is the azimuthal coordinate of the ith calorimeter tower, w i is a weight that equals the transverse energy deposited in the calorimeter tower, and the sum is over all the FCal towers. The FCal towers consist of calorimeter cells grouped into regions in η × φ of 0.1 × 0.1. The flow vector is determined separately in the positive and negative rapidity regions. The event-plane angle is then calculated as To ensure the uniformity of the event-plane angle distribution, the raw flow vector is corrected by subtracting its mean value, obtained by averaging over all events in a given centrality interval, so that q q q 2 = q q q raw 2 − q q q raw 2 . Since the mean values q q q raw 2 are found to be independent of the collision centrality, the q q q raw 2 averaged over all analysed events (centrality 0-60%) is used. The remaining modulations of the eventplane angle distribution are removed by including a shift The calculated coefficients A 2 = − sin(2k 2 ) and B 2 = cos(2k 2 ) are found to be centrality dependent up to k = 2, and the sum is performed up to a conservative choice of k max = 12. After these recentring and flattening corrections the event-plane angle distribution follows a uniform distribution.
The event-plane resolution, R, is determined using the two-sub-event method [19] and the minimum-bias event sample. Values of 2 are determined on both sides of the detector and are used to calculate R = √ cos(2 2 ) , where 2 is the difference between the values of 2 computed using the FCal modules in the positive and negative η-region of the detector. The resulting event-plane resolution depends strongly on centrality: it is poorer at low and high E FCal T and better at middle values of E FCal T . The resolution is calculated in minimum-bias events in very fine bins of transverse energy. The average value of the resolution in wider bins must account for the different E FCal T distribution of the sample of events containing J/ψ candidates. Thus, the event-plane resolution is weighted by the number of J/ψ candidates in a given centrality interval relative to the number of minimum-bias events in the same interval. The values of R for the centrality intervals used in this analysis are shown in Table 1. Table 2 Individual components of the probability distribution function in the default fit model used to extract the prompt and non-prompt contribution for J/ψ signal and background. F CB and F G are the Crystal Ball (CB) and Gaussian (G) distribution functions respectively, ω is the relative fraction of the CB and G terms, F E is an exponential (E) function, and δ(τ μμ ) is the Dirac delta function To account for detector effects, each muon pair is corrected for trigger efficiency, trig , reconstruction efficiency, reco , and detector acceptance, A. These three quantities form a per-dimuon weight: Trigger and reconstruction efficiencies are studied using the tag-and-probe method in data and in MC simulations as a function of the muon p μ T and η μ . The reconstruction efficiency increases from low to high p μ T and decreases from central to forward pseudorapidity, becoming constant at p μ T > 6 GeV with a maximum efficiency of about 90%. Trigger efficiency increases from low to high p μ T and from central to forward pseudorapidity, increasing from 50% to 85% between the lowest and highest p μ T . The acceptance is studied from MC simulations. It is defined as the probability that the J/ψ decay products fall within the fiducial volume p μ T > 4 GeV and |η μ | < 2.4 and assuming unpolarised J/ψ production [35-37]. A detailed description of the performance studies is presented in Ref. [2].
The separation of the prompt and non-prompt J/ψ signals is performed using the pseudo-proper decay time of the J/ψ candidate, τ μμ = L xy m J/ψ / p T , where L xy is the distance between the position of the dimuon vertex and the primary vertex projected onto the transverse plane, m J/ψ = 3.096 GeV is the value of the J/ψ mass [38], and p T is the transverse momentum of the dimuon system.
The corrected two-dimensional distribution of the number of events as a function of pseudo-proper decay time and dimuon invariant mass is used to determine the prompt and non-prompt J/ψ yields. The probability distribution function (PDF) for the fit is defined as a sum of five terms, where each term is the product of functions that depend on the dimuon invariant mass or pseudo-proper decay time. The PDF is written in a compact form as: where N i is the normalisation factor of each component, f i (m μμ ) and h i (τ μμ ) are distribution functions of the invariant mass, m μμ , and the pseudo-proper decay time, τ μμ , respectively; g(τ μμ ) is the resolution function described by a double Gaussian distribution, and the ⊗-symbol denotes a convolution. The PDF terms are defined by Crystal Ball (CB) [39], Gaussian (G), Dirac delta (δ), and exponential (E) distributions as specified in Table 2.
The signal invariant mass shapes are described by the sum of a CB function and a single Gaussian function with a common mean. The width term in the CB function is equal to the Gaussian standard deviation times a scaling term, fixed from MC simulation studies. The CB left-tail and height parameters are also fixed from MC studies and variations of the two parameters are considered as part of the fit model's systematic uncertainties. The relative fraction of the CB and Gaussian functions, ω, is free in the fit. The prompt background contribution to the invariant mass spectrum follows a nearly flat distribution, and is modelled by an exponential function, denoted F E 2 (m μμ ) in Table 2. The non-prompt contribution to the background requires two exponential functions, denoted F E 3 (m μμ ) and F E 5 (m μμ ) in Table 2, respectively.
The pseudo-proper decay time of the prompt signal is modelled with a Dirac delta function, while the non-prompt signal is described by a single-sided exponential, denoted F E 1 (τ μμ ) in Table 2. The backgrounds are represented by the sum of one prompt component and two non-prompt components. The prompt background component is described by a Dirac delta function. One of the non-prompt background contributions is described by a single-sided decay model (for positive τ μμ only), and the other is described by a double-sided decay model, denoted F E 4 (τ μμ ) and F E 6 (|τ μμ |) in Table 2, accounting for candidates of mis-reconstructed or non-coherent muon pairs resulting from other Drell-Yan muons and combinatorial background. A double Gaussian resolution function, g(τ μμ ), is used in convolution with the background and signal terms. These resolution functions have a fixed mean at τ μμ = 0 and free widths.
The free parameters in the fit are the number of signal candidates, the number of background candidates, the nonprompt fraction of signal candidates, the non-prompt fraction 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 [GeV]  Fig. 1 Fit projections of the two-dimensional invariant mass (m μμ ) and pseudo-proper decay time (τ μμ ) for the signal extraction for the azimuthal bin 0 < 2|φ − 2 | < π/4 in the kinematic range 9 < p T < 11 GeV, 0 < |y| < 2 and 0-60% centrality of background candidates, the non-prompt fraction of misidentified candidates, the mean and width of the J/ψ mass peak, the slopes of the exponential distribution functions, and the widths of the pseudo-proper decay time resolution functions.
The relevant quantities extracted from the fit are: the number of signal candidates, N signal , and the fraction of the signal that is non-prompt, f NP . These are used to build azimuthal distributions of the prompt and non-prompt yields, as the fits are done in intervals of relative azimuthal angle 2|φ − 2 |, p T , y and the collision centrality. Example plots of fit projections are shown in Fig. 1. The prompt and non-prompt signals are obtained from the fit as: While the total signal and the non-prompt fraction are weakly correlated, approximately less than 1%, an artificial correlation is introduced when transforming these variables to the prompt and non-prompt yields. The sum of the two yields is constrained to the total number of signal candidates. To compute the correlation factor a toy Monte Carlo model is implemented using the same fit model and the output of the fits to data in bins of relative azimuthal angle, p T , rapidity and centrality. The correlation varies with p T from −18% to −24%; in rapidity from −22% to −16%; and is approximately constant as a function of centrality. The average correlation coefficient is −20% for all slices and azimuthal bins with a standard deviation of about 2%. It is important to note that this correlation is merely due to the procedure used to extract the yields from the invariant mass and pseudo-proper decay time distributions.
The elliptic flow coefficient is computed by fitting the prompt and non-prompt yields simultaneously to: in order to account for the anti-correlation between the two signals. This is achieved by minimising the χ 2 function: where y y y is the vector of measurements, μ μ μ(θ θ θ) is the vector of predicted values with parameters θ θ θ , and V is the error matrix. The two elements of the vector of measurements are the prompt and non-prompt yields; the vector of predicted values is given by Eq. (1) with the set of free parameters {N 0 , v fit 2 } prompt and {N 0 , v fit 2 } non-prompt for the modelling of the prompt and non-prompt yields respectively. The elements in the diagonal of V are the yield uncertainties and the offdiagonal terms are the correlation terms between the prompt and non-prompt yields.
An example of the prompt and non-prompt J/ψ yields normalised by the inclusive J/ψ yield and the projection of the fit result are shown in Fig. 2. The simultaneous fit of the prompt and non-prompt yields correctly accounts for the correlation between the two signals that arose from the modelling used for the signal extraction. The correlation between the fit parameters obtained from the simultaneous fit is shown in Fig. 3.
In the final step, the fitted value of v fit 2 , is corrected for the event-plane resolution:

Systematic uncertainties
The systematic uncertainties of this measurement are classified into three groups: (a) related to the centrality definition, (b) related to the estimation of the event-plane method, and (c) related to extraction of the signal. The assigned systematic uncertainty from each source is defined in each bin of p T , rapidity or centrality as the root mean square of the difference between the nominal and varied values of the elliptic flow coefficient. All the uncertainties affecting the extraction of the signal are bin-to-bin uncorrelated, while the uncertain-ties related to the event-plane method can be correlated or uncorrelated, depending on the studied dependence.
The centrality intervals are defined by values of E FCal T . These intervals have an uncertainty associated primarily to the effect of trigger and event selection inefficiencies as well as backgrounds in the most peripheral E FCal T intervals [15,40]. To test the sensitivity of the results to this uncertainty, modified centrality intervals are used, for which the E FCal T cuts involved in the definition of the centrality intervals are shifted upward and downward, and the analysis is repeated. These changes affect the number of muon pairs entering the signal fitting procedure and thus have an impact on the final value of v 2 . For the v 2 measurements as a function of p T or rapidity the uncertainty is about 2% for both prompt and non-prompt J/ψ v 2 , while for the centrality dependence this source contributes a 10% systematic uncertainty to both v 2 measurements.
For the estimation of the event-plane angle, the calibration coefficients for the recentring of the flow vector are calculated using a narrower centrality interval (20-60%) instead of the full centrality range (0-60%). For the evaluation of δ 2 the sum limit is changed to k max = 4. No significant differences are observed, so a systematic uncertainty is not assigned. For the event-plane resolution, the three-sub-event method [19] is used as an alternative to compute R for the event-plane angle calculated with FCal in η < 0 and η > 0 independently. By using the electromagnetic and hadronic calorimeters, the event-plane angle is calibrated and determined in two different sections with 0.5 < η < 2 and −1.5 < η < 0 and compared with the event-plane angle as measured in the FCal in η < 0 to obtain its resolution. For the resolution of the FCal in the opposite side (η > 0) a reflec- distributions in minimum-bias and J/ψ triggered events, the difference between the resolutions computed in the two datasets is assigned as a systematic uncertainty and it is the dominant source of uncertainty. The total uncertainty for the average event-plane resolution adds a 4% correlated uncertainty to the measurements integrated over centrality, while for the centrality dependence each point has an approximate 1.5% uncertainty due to resolution. In the centrality interval considered in this analysis (0-60%), it is found that the uncertainty related to the centrality definition has no effect on the event-plane resolution.
Many variations of the PDF defined for the signal extraction are considered. For the mass fit, the most important variations are the release of the fixed parameters of the CB function [39], the substitution of the Gaussian + CB function by a single CB function, and variations of the Gaussian standard deviation and CB width scaling parameter. For the time dependence, the notable variations include that a single exponential function is replaced by short and long lifetime exponential decays, and one Gaussian function instead of two is considered for time resolution. Among all of these variations the biggest contribution is the release of the parameters of the CB function, which contributes between 10% and 15% uncertainty for the p T and rapidity dependence of v 2 and up to 20% for the centrality dependence. Deviations from the case of unpolarised J/ψ production are studied for different spin-alignment scenarios, corresponding to the extreme cases, as explained in Ref. [41]. These alternative scenarios are covered by a theoretical uncertainty of 3% in v 2 for prompt J/ψ and 4% for non-prompt J/ψ. The choice of mass window used for the study is changed to analyse potential biases from the mass peak of the ψ(2S). At high rapidity its width increases and the fit response for the background estimation changes. The mass window range is narrowed to 2.7 < m μμ < 3.4 GeV and its impact is between 5% and 10% for the p T , rapidity and centrality dependencies The correlation between the prompt and non-prompt yields is also studied. It is either doubled or neglected, and shows a minor impact of 1% for all presented results.

Results
Results of v 2 measurements for prompt and non-prompt J/ψ are shown as a function of p T in the range between 9 and 30 GeV in Fig. 4, for three p T intervals. The centroid of each p T bin is determined by the average p T of the muon pairs in the corresponding bin and their values are 9.81, 12.17, and 17.6 GeV. The horizontal error bars correspond to the bin width reflecting the kinematic range of the measurement. The vertical error bars are the fit errors associated with statistical uncertainties, and the shaded boxes are the systematic uncertainties. The data are consistent with a non-zero flow signal in the full kinematic range studied (9 < p T < 30 GeV) for both prompt and non-prompt J/ψ. As shown in Fig. 3, for the lowest p T bin (9 < p T < 11 GeV), prompt J/ψ v 2 deviates from 0 with a significance of 3σ and non-prompt J/ψ with a significance of 1σ . Prompt J/ψ exhibits a decreasing trend with a maximum value of v 2 close to 0.09 that decreases by nearly a factor of two over the whole studied kinematic range. The results for non-prompt J/ψ indicate a non-zero value with limited statistical significance. These v 2 values are consistent with being independent of p T and compati- The statistical and systematic uncertainties are shown using vertical error bars and boxes respectively. The centrality interval associated to a given value of N part is written below each data point ble within uncertainties with the v 2 values of prompt J/ψ, particularly at the highest p T . The rapidity dependence of v 2 is shown in Fig. 5 and the centrality dependence in Fig. 6 for both prompt and non-prompt J/ψ. Neither shows significant rapidity or centrality dependence. The prompt J/ψ v 2 is larger than the non-prompt, in agreement with the larger values observed in the p T dependence integrated over rapidity and centrality. The measured value of v 2 for prompt J/ψ stays approximately the same in central collisions as in non-central collisions within uncertainties, in agreement with the observation of Ref. [5]. This is similar to the case of non-prompt J/ψ where no evident centrality dependence is observed within the uncertainties. This feature is in disagreement with the expected hydrodynamic behaviour for charm quarks and may manifest a transition at medium p T regime where there are thought to be different effects influencing J/ψ production [6,7,9-11].
In Fig. 7 the available results for inclusive J/ψ ( p T < 12 GeV) from the ALICE experiment [4] and prompt J/ψ (4 < p T < 30 GeV) from the CMS experiment [5] are compared with the results obtained in this analysis for prompt J/ψ (9 < p T < 30 GeV) as a function of the J/ψ transverse momentum. Despite different rapidity selections, the magnitudes of the elliptic flow coefficients are compatible with each other. Two features can be observed: first, the hydrodynamic peak is around 7 GeV, a value that is significantly higher than what is observed for charged particles [14-18] where the peak is around 3-4 GeV. This effect can be described qualitatively by thermalisation of charm quarks in the quark-gluon plasma  The second feature is that v 2 has a substantial magnitude at high p T . This can be connected with the suppression of J/ψ production due to mechanisms involving interactions with the medium such as absorption and melting [11] or energy loss [42,43].

Summary
This paper presents measurements of the elliptic flow harmonic coefficients for J/ψ particles in the dimuon decay channel in 0.42 nb −1 of Pb+Pb collisions recorded at √ s NN = 5.02 TeV with the ATLAS detector at the LHC. Results are presented for prompt and non-prompt J/ψ as a function of transverse momentum, rapidity and centrality. The measurement is performed in the J/ψ kinematic range 9 < p T < 30 GeV, |y| < 2, and 0-60% centrality. The pseudo-proper decay time of the secondary vertex is used to separate the prompt and non-prompt components of J/ψ production and both yields are analysed simultaneously to properly assess the correlation between the two contributions. A significant flow signal is found for prompt J/ψ, which decreases with increasing p T . With limited statistical significance, it is found that non-prompt J/ψ v 2 is consistent with a flat behaviour over the studied p T range. At high p T , the prompt and non-prompt J/ψ v 2 values are compatible within the uncertainties. There is no evidence for a rapidity or centrality dependence for the prompt or non-prompt case. This suggests a similar underlying process describing the propagation of sufficiently high p T charm and bottom quarks through the medium. The idea is supported by the recent observation of J/ψ yield suppression in Pb+Pb collisions by ATLAS, where a similar suppression pattern for prompt and non-prompt J/ψ is observed at high p T . Additionally, this measurement covers the high p T range of J/ψ and is found to be in a good agreement with previous reports, despite the different beam energy and rapidity selections. CERN