Description
The study of charmonium production in hadronic collisions is a valuable test for models of quantum chromodynamics (QCD) as both perturbative and non-perturbative processes need to be taken into account in the calculations. At LHC energies, several parton interactions may occur in a single pp collision. Multi-parton interactions (MPI) influence the production of light quarks and gluons, affecting the total event multiplicity, but also hard processes as charmonium production. Therefore the event-multiplicity dependent production of charmonium has the potential to give new insights on the interplay between the hard and soft mechanisms in charmonium production. Another topic of interest in hadronic collisions is the measurement of the $J/\psi$ production in jets, which can shed light into the mechanisms governing the hadronization of a c-$\bar{c}$ pair into a $J/\psi$. In this contribution the prompt and non-prompt $J/\psi$ fragmentation functions in charged jets measured at midrapdity are presented and compared with models. Moreover, the $J/\psi$ production at midrapdity and forward rapidity as a function of the relative charged-particle multiplicity, respectively at midrapidity and forward rapidity will be shown, and compared with models.