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.
The strange quark content of the proton is probed through the measurement of the production cross section for a W boson and a charm (c) quark in proton-proton collisions at a center-of-mass energy of 13 TeV. The analysis uses a data sample corresponding to a total integrated luminosity of 138 fb$^{-1}$ collected with the CMS detector at the LHC. The W bosons are identified through their leptonic decays to an electron or a muon, and a neutrino. Charm jets are tagged using the presence of a muon or a secondary vertex inside the jet. The W+c production cross section and the cross section ratio $R^\pm_\text{c}$ = $\sigma$(W$^+$+$\bar{\text{c}}$) / $\sigma$(W$^-$+$\text{c}$) are measured inclusively and differentially as functions of the transverse momentum and the pseudorapidity of the lepton originating from the W boson decay. The precision of the measurements is improved with respect to previous studies, reaching 1% in $R^\pm_\text{c}$. The precision of the measurements is improved with respect to previous studies, reaching 1% in $R^\pm_\text{c}$ = 0.950 $\pm$ 0.005 (stat) $\pm$ 0.010 (syst). The measurements are compared with theoretical predictions up to next-to-next-to-leading order in perturbative quantum chromodynamics.