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.
The inclusive J/psi production cross-section and fraction of J/psi mesons produced in B-hadron decays are measured in proton-proton collisions at sqrt(s) = 7 TeV with the ATLAS detector at the LHC, as a function of the transverse momentum and rapidity of the J/psi, using 2.3 pb-1 of integrated luminosity. The cross-section is measured from a minimum pT of 1 GeV to a maximum of 70 GeV and for rapidities within |y| < 2.4 giving the widest reach of any measurement of J/psi production to date. The differential production cross-sections of prompt and non-prompt J/psi are separately determined and are compared to Colour Singlet NNLO*, Colour Evaporation Model, and FONLL predictions.