Measurement of the χ b (3P) mass and of the relative rate of χ b1(1P) and χ b2(1P) production