The Fourier coefficients v(2) and v(3) characterizing the anisotropy of the azimuthal distribution of charged particles produced in PbPb collisions at root S-NN = 5.02 TeV are measured with data collected by the CMS experiment. The measurements cover a broad transverse momentum range, 1 < p(T) < 100 GeV/c. The analysis focuses on the p(T) > 10 GeV/c range, where anisotropic azimuthal distributions should reflect the path-length dependence of parton energy loss in the created medium. Results are presented in several bins of PbPb collision centrality, spanning the 60% most central events. The v(2) coefficient is measured with the scalar product and the multiparticle cumulant methods, which have different sensitivities to initial-state fluctuations. The values from both methods remain positive up to p(T) similar to 60-80 GeV/c, in all examined centrality classes. The v(3) coefficient, only measured with the scalar product method, tends to zero for p(T) greater than or similar to 20 GeV/c. Comparisons between theoretical calculations and data provide new constraints on the path-length dependence of parton energy loss in heavy ion collisions and highlight the importance of the initial-state fluctuations. (C) 2017 The Author. Published by Elsevier B.V.