The double-differential cross sections of promptly produced J/psi and psi(2S) mesons are measured in pp collisions at sqrt(s) = 7 TeV, as a function of transverse momentum pt and absolute rapidity abs(y). The analysis uses J/psi and psi(2S) dimuon samples collected by CMS, corresponding to integrated luminosities of 4.55 and 4.90 inverse femtobarns, respectively. The results are based on a two-dimensional analysis of the dimuon invariant mass and decay length, and extend to pt = 120 and 100 GeV for the J/psi and psi(2S), respectively, when integrated over the interval abs(y) < 1.2. The ratio of the psi(2S) to J/psi cross sections is also reported for abs(y) < 1.2, over the range 10 < pt < 100 GeV. These are the highest pt values for which the cross sections and ratio have been measured.
The production of the X(3872) is studied in pp collisions at sqrt(s) = 7 TeV, using decays to J/psi pi pi, where the J/psi decays to two muons. The data were recorded by the CMS experiment and correspond to an integrated luminosity of 4.8 inverse femtobarns. The measurements are performed in a kinematic range in which the X(3872) candidates have a transverse momentum 10 < pt < 50 GeV and rapidity abs(y) < 1.2. The ratio of the X(3872) and psi(2S) cross sections times their branching fractions into J/psi pi pi is measured as a function of pt. In addition, the fraction of X(3872) originating from B decays is determined. From these measurements the prompt X(3872) differential cross section times branching fraction as a function of pt is extracted. The pi pi mass spectrum of the J/psi pi pi system in the X(3872) decays is also investigated.