  Atoms in high-finesse optical resonators interact via the photons they
multiply scatter into the cavity modes. The dynamics is characterized by
dispersive and dissipative optomechanical long-range forces, which are mediated
by the cavity photons, and exhibits a steady state for certain parameter
regimes. In standing-wave cavities the atoms can form stable spatial gratings.
Moreover, their asymptotic distribution is a Maxwell-Boltzmann whose effective
temperature is controlled by the laser parameters. In this work we show that in
a two-mode standing-wave cavity the stationary state possesses the same
properties and phases of the Generalized Hamiltonian Mean Field model in the
canonical ensemble. This model has three equilibrium phases: a paramagnetic, a
nematic, and a ferromagnetic one, which here correspond to different spatial
orders of the atomic gas and can be detected by means of the light emitted by
the cavities. We further discuss perspectives for investigating in this setup
the ensemble inequivalence predicted for the Generalized Hamiltonian Mean Field
model.
