Heavy quarkonium fragmentation functions from a heavy quark pair. II. $P$ wave
Recently, a new perturbative QCD factorization formalism for heavy quarkonium production at a large transverse momentum was proposed. Phenomenological application of this new approach relies on our knowledge of a large number of universal fragmentation functions (FFs) at an input factorization scale $\mu_0\gtrsim 2m_Q$ with heavy quark mass $m_Q$, which are nonperturbative, and in principle, should be extracted from data. With heavy quark mass $m_Q\gg \Lambda_{\rm QCD}$, we calculate these input FFs in terms of non-relativistic QCD (NRQCD) factorization. In a companion paper, we calculated these input FFs in NRQCD factorization approach including all contributions from $S$-wave NRQCD $Q\bar{Q}$-states. In this paper, we calculate contributions to the heavy quark-pair FFs from all $P$-wave NRQCD $Q\bar{Q}$-states.