  We develop a new method to reconstruct the cosmic density field from the
distribution of dark matter haloes above a certain mass threshold. Our
motivation is that well-defined samples of galaxy groups/clusters, which can be
used to represent the dark halo population, can now be selected from large
redshift surveys of galaxies, and our ultimate goal is to use such data to
reconstruct the cosmic density field in the local universe. Our reconstruction
method starts with a sample of dark matter haloes above a given mass threshold.
Each volume element in space is assigned to the domain of the nearest halo
according to a distance measure that is scaled by the virial radius of the
halo. The distribution of the mass in and around dark matter haloes of a given
mass is modelled using the cross-correlation function between dark matter
haloes and the mass distribution within their domains. We use N-body
cosmological simulations to show that the density profiles required in our
reconstruction scheme can be determined reliably from large cosmological
simulations, and that our method can reconstruct the density field accurately
using haloes with masses down to $\sim 10^{12}\msun$ (above which samples of
galaxy groups can be constructed from current large redshift surveys of
galaxies). Working in redshift space, we demonstrate that the redshift
distortions due to the peculiar velocities of haloes can be corrected in an
iterative way. We also describe some applications of our method.
