  We develop a nonequilibrium model of condensation and lasing of photons in a
dye filled microcavity. We examine in detail the nature of the thermalization
process induced by absorption and emission of photons by the dye molecules, and
investigate when the photons are able to reach a thermal equilibrium
Bose-Einstein distribution. At low temperatures, or large cavity losses, the
absorption and emission rates are too small to allow the photons to reach
thermal equilibrium and the behavior becomes more like that of a conventional
laser.
