  The strong coupling of atoms to optical cavities can improve optical lattice
clocks as the cavity enables metrologically useful collective atomic
entanglement and high-fidelity measurement. To this end, it is necessary to
cool the ensemble to suppress motional broadening, and advantageous to maximize
and homogenize the atom-cavity coupling. We demonstrate resolved Raman sideband
cooling via the cavity as a method that can simultaneously achieve both goals.
In 200 ms, we cool 171Yb atoms to an average vibration number <nx> = 0.23(7) in
the tightly binding direction, resulting in 93% optical {\pi}-pulse fidelity on
the clock transition 1S0 -> 3P0. During cooling, the atoms self-organize into
locations with maximal atom-cavity-coupling, which will improve quantum
metrology applications.
