The production cross-sections of $J/\psi$ mesons in proton-proton collisions at a centre-of-mass energy of $\sqrt{s}=5$ TeV are measured using a data sample corresponding to an integrated luminosity of $9.13\pm0.18~\text{pb}^{-1}$, collected by the LHCb experiment. The cross-sections are measured differentially as a function of transverse momentum, $p_{\text{T}}$, and rapidity, $y$, and separately for $J/\psi$ mesons produced promptly and from beauty hadron decays (nonprompt). With the assumption of unpolarised $J/\psi$ mesons, the production cross-sections integrated over the kinematic range $0<p_{\text{T}}<20~\text{GeV}/c$ and $2.0<y<4.5$ are $8.154\pm0.010\pm0.283~\mu\text{b}$ for prompt $J/\psi$ mesons and $0.820\pm0.003\pm0.034~\mu\text{b}$ for nonprompt $J/\psi$ mesons, where the first uncertainties are statistical and the second systematic. These cross-sections are compared with those at $\sqrt{s}=8$ TeV and $13$ TeV, and are used to update the measurement of the nuclear modification factor in proton-lead collisions for $J/\psi$ mesons at a centre-of-mass energy per nucleon pair of $\sqrt{s_{\text{NN}}}=5$ TeV. The results are compared with theoretical predictions.
The dependence of the ratio between the B$_\mathrm{s}^0$ and B$^+$ hadron production fractions, $f_\mathrm{s} / f_\mathrm{u}$, on the transverse momentum ($p_\mathrm{T}$) and rapidity of the B mesons is studied using the decay channels B$_\mathrm{s}^0$$\to$ J$/\psi\,\phi$ and B$^+$$\to$ J$/\psi$ K$^+$. The analysis uses a data sample of proton-proton collisions at a center-of-mass energy of 13 TeV, collected by the CMS experiment in 2018 and corresponding to an integrated luminosity of 61.6 fb$^{-1}$. The $f_\mathrm{s} / f_\mathrm{u}$ ratio is observed to depend on the B $p_\mathrm{T}$ and to be consistent with becoming asymptotically constant at large $p_\mathrm{T}$. No rapidity dependence is observed. The ratio of the B$^0$ to B$^+$ hadron production fractions, $f_\mathrm{d} / f_\mathrm{u}$, measured using the B$^0$$\to$ J$/\psi$ K$^{*0}$ decay channel, is found to be consistent with unity and independent of $p_\mathrm{T}$ and rapidity, as expected from isospin invariance.