  We investigate how damped Lyman-$\alpha$ absorbers (DLAs) at z ~ 2-3,
detected in large optical spectroscopic surveys of quasars, trace the
population of star-forming galaxies. Building on previous results, we construct
a model based on observed and physically motivated scaling relations in order
to reproduce the bivariate distributions of metallicity, Z, and HI column
density, N(HI). Furthermore, the observed impact parameters for galaxies
associated to DLAs are in agreement with the model predictions. The model
strongly favours a metallicity gradient, which scales with the luminosity of
the host galaxy, with a value of $\gamma$* = -0.019 $\pm$ 0.008 dex kpc$^{-1}$
for L* galaxies that gets steeper for fainter galaxies. We find that DLAs trace
galaxies over a wide range of galaxy luminosities, however, the bulk of the DLA
cross-section arises in galaxies with L ~ 0.1 L* at z ~ 2.5 broadly consistent
with numerical simulations.
