  We study the production of $J/\psi$ vector mesons as a function of charged
hadron multiplicity in p+p and p+Pb collisions at LHC energies. We employ the
color glass condensate framework, using running coupling Balitsky-Kovchegov
evolved dipole amplitudes, to compute gluon and $c\bar{c}$-pair production. We
use fragmentation functions to obtain charged hadrons, and explore two
different hadronization schemes for the $J/\psi$: non-relativistic quantum
chromodynamics and the improved color evaporation model. In our framework,
event-by-event multiplicity fluctuations of both hadrons and $J/\psi$ are
driven by geometric and saturation scale normalization fluctuations. Studying
the correlation between $J/\psi$ and hadron multiplicity, we show that the
characteristic difference between forward and backward rapidity in p+Pb
collisions is a result of different degrees of saturation probed at different
rapidities. We demonstrate that experimental data on heavy-flavor production as
a function of event activity provide stringent constraints on the fluctuating
proton structure.

High Energy Physics - Phenomenology;Nuclear Theory