  We analyze the recent LHCb measurement of the distribution of the fraction of
the transverse momentum, $z(J/\psi)$, carried by the $J/\psi$ within a jet.
LHCb data is compared to analytic calculations using the fragmenting jet
function (FJF) formalism for studying $J/\psi$ in jets. Logarithms in the FJFs
are resummed using DGLAP evolution. We also convolve hard QCD partonic cross
sections, showered with PYTHIA, with leading order Non Relativistic Quantum
Chromodynamics (NRQCD) fragmentation functions and obtain consistent results.
Both approaches use Madgraph to calculate the hard process that creates the jet
initiating parton. These calculations give reasonable agreement with the
$z(J/\psi)$ distribution that was shown to be poorly described by default
PYTHIA simulations in the LHCb paper. We compare our predictions for the
$J/\psi$ distribution using various extractions of nonperturbative NRQCD
long-distance matrix elements (LDMEs) in the literature. NRQCD calculations
agree with LHCb data better than default PYTHIA regardless of which fit to the
LDMEs is used. LDMEs from fits that focus exclusively on high transverse
momentum data from colliders are in good agreement with the LHCb measurement.

High Energy Physics - Phenomenology;Nuclear Theory