How do galaxies acquire their mass?
  We introduce a toy model that describes (in a single equation) the mass in
stars as a function of halo mass and redshift. Our model includes the
suppression of gas accretion from gravitational shock heating and AGN jets
mainly for M_halo > M_shock ~ 10^12 M_Sun and from a too hot IGM onto haloes
with v_circ < 40 km/s, as well as stellar feedback that drives gas out of
haloes mainly with v_circ < 120 km/s. We run our model on the merger trees of
the haloes and subhaloes of a high-resolution dark matter cosmological
simulation. The galaxy mass is taken as the maximum between the mass given by
the model and the sum of the masses of its progenitors (reduced by tidal
stripping). Designed to reproduce the present-day stellar mass function of
galaxies, our model matches fairly well the evolution of the cosmic stellar
density. It leads to the same z=0 relation between central galaxy stellar and
halo mass as the one found by abundance matching and also as that previously
measured at high mass on SDSS centrals. Our model also predicts a bimodal
distribution (centrals and satellites) of stellar masses for given halo mass,
in good agreement with SDSS observations. The relative importance of mergers
depends much more on stellar than halo mass. Galaxies with m_stars > 10^11
M_Sun/h acquire most of their mass through mergers (mostly major and gas-poor),
as expected from our model's shutdown of gas accretion at high M_halo. However,
mergers are rare for m_stars < 10^11 M_Sun/h (greater than our mass
resolution), a consequence of the curvature of the stellar vs. halo mass
relation. So gas accretion must be the dominant growth mechanism for
intermediate and low mass galaxies, e.g. dwarf ellipticals in clusters, except
that gas-rich galaxy mergers account for the bulk of the growth of ellipticals
with m_stars ~ 10^10.5 M_Sun/h, which we predict must be the typical mass of
ULIRGs.
