We have studied the transverse-momentum ($p_{\rm T}$) dependence of the inclusive J/$\psi$ production in p-Pb collisions at $\sqrt{s_{\rm NN}} = 5.02$ TeV, in three center-of-mass rapidity ($y_{\rm cms}$) regions, down to zero $p_{\rm T}$. Results in the forward and backward rapidity ranges ($2.03 < y_{\rm cms} < 3.53$ and $-4.46 <y_{\rm cms}< -2.96$) are obtained by studying the J/$\psi$ decay to $\mu^+\mu^-$, while the mid-rapidity region ($-1.37 < y_{\rm cms} < 0.43$) is investigated by measuring the ${\rm e}^+{\rm e}^-$ decay channel. The $p_{\rm T}$ dependence of the J/$\psi$ production cross section and nuclear modification factor are presented for each of the rapidity intervals, as well as the J/$\psi$ mean $p_{\rm T}$ values. Forward and mid-rapidity results show a suppression of the J/$\psi$ yield, with respect to pp collisions, which decreases with increasing $p_{\rm T}$. At backward rapidity no significant J/$\psi$ suppression is observed. Theoretical models including a combination of cold nuclear matter effects such as shadowing and partonic energy loss, are in fair agreement with the data, except at forward rapidity and low transverse momentum. The implications of the p-Pb results for the evaluation of cold nuclear matter effects on J/$\psi$ production in Pb-Pb collisions are also discussed.
Measurements of the differential production cross-sections of prompt and non-prompt $J/\psi$ and $\psi(2$S$)$ mesons with transverse momenta between 8 and 360 GeV and rapidity in the range $|y|<2$ are reported. Furthermore, measurements of the non-prompt fractions of $J/\psi$ and $\psi(2$S$)$, and the prompt and non-prompt $\psi(2$S$)$-to-$J/\psi$ production ratios, are presented. The analysis is performed using 140 fb$^{-1}$ of $\sqrt{s}=13$ TeV $pp$ collision data recorded by the ATLAS detector at the LHC during the years 2015-2018.