Description
Charmonium production has long been recognized as a key probe for studying the properties of the quark–gluon plasma (QGP). The early formation of heavy-quark pairs, such as $c\bar{c}$ and $b\bar{b}$, makes charmonia ideal tools for investigating the evolution of the hot and dense medium created in ultra-relativistic heavy-ion collisions. At LHC energies, the recombination of uncorrelated charm-quark pairs, referred to as (re)generation, has been shown to significantly affect charmonium yields, counterbalancing the suppression effects traditionally associated with QGP formation. As a result, measurements of J/$\psi$ production in both pp and Pb–Pb collisions are essential to distinguish between different theoretical models. Furthermore, the separation of non-prompt charmonia, originating from beauty hadron decays, provides valuable insight into the energy loss mechanisms experienced by beauty quarks as they traverse the QGP. An additional area of growing interest is the study of J/$\psi$ production within jets, which offers a novel perspective on the hadronization dynamics of the $c\bar{c}$ pair into a bound charmonium state. In this contribution, we therefore also present measurements of the prompt and non-prompt J/$\psi$ fragmentation functions in charged jets at midrapidity, along with comparisons to theoretical predictions.