The studies of the production of the $X(3872)$, either prompt or from B hadron decays, and of the $J/\psi \phi$ mass spectrum in B hadron decays have been carried out by using $pp$ collisions at $\sqrt{s}=7$ TeV collected with the CMS detector at the LHC.

%The production of the $X(3872)$ is studied in $pp$ collisions at $\sqrt{s} = 7$ TeV with the CMS detector at LHC, using decays to $J/\psi\pi^{+}\pi^{-}$ where the $J/\psi$ decays to two muons.

The cross-section ratio of the $X(3872)$ with respect to the $\psi(2S)$ in the $J/\psi\pi^{+}\pi^{-}$ decay channel and the fraction of $X(3872)$ coming from B-hadron decays are measured as a function of transverse momentum ($p\mathrm{_T}$), covering unprecedentedly high values of $p\mathrm{_T}$.

For the first time, the prompt production cross section for the $X(3872)$ times the unknown branching fraction for the decay of $X(3872) \rightarrow J/\psi\pi^{+}\pi^{-}$ is extracted differentially in $p\mathrm{_T}$ and compared to theoretical predictions based on the Non-Relativistic QCD (NRQCD) factorization approach. The dipion invariant-mass spectrum of the $J/\psi\pi^{+}\pi^{-}$ system in the $X(3872)$ decay is also investigated.

The search for resonance-like structures in the $B^{0}_{s}\pi^{\pm}$ invariant mass spectrum do not show any unexpected result. An upper limit on the relative production of the claimed $X(5568)$ and $B_s$ multiplied by the unknown branching fraction of the decay $X(5568) \rightarrow B_{s}\pi^{\pm}$ is estimated to be 3.9\% at 95\% CL in the most conservative case.