Measurement of prompt and nonprompt $$\mathrm{J}/{\psi }$$ J / ψ production in $$\mathrm {p}\mathrm {p}$$ p p and $$\mathrm {p}\mathrm {Pb}$$ p Pb collisions at $$\sqrt{s_{\mathrm {NN}}} =5.02\,\text {TeV} $$ s NN = 5.02 TeV
European physical journal. C, Particles and fields