  We perform cosmological hydrodynamic simulations to determine to what extent
galaxies lose their gas due to photoheating from an ionizing background. We
find that the characteristic mass at which haloes on average have lost half of
their baryons is Mc ~ 6.5 x 10^9 Msun/h at z = 0, which corresponds to a
circular velocity of 25 km/s. This is significantly lower than the filtering
mass obtained by the linear theory, which is often used in semianalytical
models of galaxy formation. We demonstrate it is the gas temperature at the
virial radius which determines whether a halo can accrete gas. A simple model
that follows the merger history of the dark matter progenitors, and where gas
accretion is not allowed when this temperature is higher than the virial
temperature of the halo, reproduces the results from the simulation remarkably
well. This model can be applied to any reionization history, and is easy to
incorporate in semianalytical models.
