  Pattern formation of atoms in high-finesse optical resonators results from
the mechanical forces of light associated with superradiant scattering into the
cavity mode. It occurs when the laser intensity exceeds a threshold value, such
that the pumping processes counteract the losses. We consider atoms driven by a
laser and coupling with a mode of a standing-wave cavity and describe their
dynamics with a Fokker-Planck equation, in which the atomic motion is
semiclassical but the cavity field is a full quantum variable. The asymptotic
state of the atoms is a thermal state, whose temperature is solely controlled
by the detuning between the laser and the cavity frequency and by the cavity
loss rate. From this result we derive the free energy and show that in the
thermodynamic limit selforganization is a second-order phase transition. The
order parameter is the field inside the resonator, to which one can associate a
magnetization in analogy to ferromagnetism, the control field is the laser
intensity, however the steady state is intrinsically out-of-equilibrium. In the
symmetry-broken phase quantum noise induces jumps of the spatial density
between two ordered patterns: We characterize the statistical properties of
this temporal behaviour at steady state and show that the thermodynamic
properties of the system can be extracted by detecting the light at the cavity
output. The results of our analysis are in full agreement with previous
studies, extend them by deriving a self-consistent theory which is valid also
when the cavity field is in the shot-noise limit, and elucidate the nature of
the selforganization transition.
