  The production of $\chi_b$ mesons in proton-proton collisions is studied
using a data sample collected by the LHCb detector, at centre-of-mass energies
of $\sqrt{s}=7$ and $8$ TeV and corresponding to an integrated luminosity of
3.0 fb$^{-1}$. The $\chi_b$ mesons are identified through their decays to
$\Upsilon(1S)\gamma$ and $\Upsilon(2S)\gamma$ using photons that converted to
$e^+e^-$ pairs in the detector. The relative prompt production rate of
$\chi_{b1}(1P)$ and $\chi_{b2}(1P)$ mesons is measured as a function of the
$\Upsilon(1S)$ transverse momentum in the $\chi_b$ rapidity range $2.0<y<4.5$.
A precise measurement of the $\chi_b(3P)$ mass is also performed. Assuming a
mass splitting between the $\chi_{b1}(3P)$ and the $\chi_{b2}(3P)$ states of
10.5 MeV/$c^2$, the measured mass of the $\chi_{b1}(3P)$ meson is $
m(\chi_{b1}(3P))= 10515.7^{+2.2}_{-3.9}(stat) ^{+1.5}_{-2.1}(syst) MeV/c^2.$
