JOURNAL OF HIGH ENERGY PHYSICS, no.2, 2012 (SCI-Expanded)
A measurement of the J/psi and psi(2S) production cross sections in pp collisions at root s = 7 TeV with the CMS experiment at the LHC is presented. The data sample corresponds to an integrated luminosity of 37 pb(-1). Using a fit to the invariant mass and decay length distributions, production cross sections have been measured separately for prompt and non-prompt charmonium states, as a function of the meson transverse momentum in several rapidity ranges and integrated in the kinematical regions considered in this study. In addition, cross sections restricted to the acceptance of the CMS detector are given, which are not affected by the polarization of the charmonium states. The ratio of the differential production cross sections of the two states, where systematic uncertainties largely cancel, is also determined. The branching fraction of the inclusive B -> psi(2S)X decay is extracted from the ratio of the non-prompt cross sections to be: