luminosity. This luminosity dependent PDF is tuned so that the resulting galaxies match the luminosity dependent 2-point correlation function (Zehavi et al. 2002). Colors are then added to the simulation using the colors of actual SDSS galaxies with similar luminosities and local galaxy densities. The resulting catalog thus matches the luminosity function and color- and luminosity-dependent 2-point correlation function of the SDSS data.

Therefore, these mock SDSS catalogs produce clusters of galaxies with a realistic color–magnitude diagram (compare Figures \[cm\] and \[sim\_cm\]). As we know the location of all the massive halos ([*i.e.*]{}, the clusters) within the Hubble Volume simulation (see Jenkins et al. 2000 & Evrard et al. 2002), we can now use these mock catalogs to derive the selection function of the C4 algorithm. The benefit of this approach is that these mock catalogs contain realistic projection effects, as the galaxy clustering is constrained to match the real data, and the clusters (halos) possess realistic profiles, ellipticities and morphologies. This is a significant advancement on past simulations used to quantify the selection function of cluster catalogs (see Bramel et al. 2000; Postman et al. 1996; Goto et al. 2002).

For comparison between the real and simulated data, two 