explore a simple recipe to better account for this problem in the context of our model in section \[sect:destroyedsh\].

The galaxy distribution is given by the luminosity function. This is given by the usual Schechter function fit:

$$\label{schechter}
\phi_{obs}(L) dL = \phi_* \Big(\frac{L}{L_*}\Big)^{\alpha} {\rm
exp}\Big(-\frac{L}{L_*}\Big) \frac{dL}{L_*} \, .$$

The values of the parameters will depend on the waveband used. In this paper, we use mostly the K-band luminosity function from the 2MASS survey, with parameters given by $\alpha=-1.09$, $\phi_*=1.16\times10^{-2} h^{3} {\rm Mpc^{-3}}$ and $M_*-5 {\rm log}
h=-23.39$ [@2mass]. For comparison, we also obtain the $b_J$-band 2dF survey, with $\alpha=-1.21$, $\phi_*=1.61\times10^{-2}
h^{3} {\rm Mpc^{-3}}$ and $M_*-5 {\rm log} h=-19.66$ [@2df]. Also note that we are in fact extending these fits as necessary, including beyond the magnitude interval in which they were obtained.

The basic mass-luminosity relation can then be obtained from these ingredients by a counting process, matching the numbers of galaxies at a given luminosity to the total number of hosts at a given mass:

$$\label{mlrel}
\int_L^\infty \phi(L)dL=\int_M^\infty(n_h(M)+n_{sh}(M))dm \, ,$$

where the host contribution is separated into a halo term, $n_h(M)$, and a subhalo term obtained by summing up all the subhaloes at that mass, $n_{sh}(m)=\int_0^\infty N(m|M)n_h(M)dM$. An average relation 