  Studying the average properties of galaxies at a fixed comoving number
density over a wide redshift range has become a popular observational method,
because it may trace the evolution of galaxies statistically. We test this
method by comparing the evolution of galaxies at fixed number density and by
following individual galaxies through cosmic time (z=0-5) in cosmological,
hydrodynamical simulations from OWLS. Comparing progenitors, descendants, and
galaxies selected at fixed number density at each redshift, we find differences
of up to a factor of three for galaxy and interstellar medium (ISM) masses. The
difference is somewhat larger for black hole masses. The scatter in ISM mass
increases significantly towards low redshift with all selection techniques. We
use the fixed number density technique to study the assembly of dark matter,
gas, stars, and black holes and the evolution in accretion and star formation
rates. We find three different regimes for massive galaxies, consistent with
observations: at high redshift the gas accretion rate dominates, at
intermediate redshifts the star formation rate is the highest, and at low
redshift galaxies grow mostly through mergers. Quiescent galaxies have much
lower ISM masses (by definition) and much higher black hole masses, but the
stellar and halo masses are fairly similar. Without active galactic nucleus
(AGN) feedback, massive galaxies are dominated by star formation down to z=0
and most of their stellar mass growth occurs in the centre. With AGN feedback,
stellar mass is only added to the outskirts of galaxies by mergers and they
grow inside-out.
