II. Apples to apples $A^2$: cluster selection functions for
  next-generation surveys
  We present the cluster selection function for three of the largest
next-generation stage-IV surveys in the optical and infrared:
Euclid-Optimistic, Euclid-Pessimistic and the Large Synoptic Survey Telescope
(LSST). To simulate these surveys, we use the realistic mock catalogues
introduced in the first paper of this series.
  We detected galaxy clusters using the Bayesian Cluster Finder (BCF) in the
mock catalogues. We then modeled and calibrated the total cluster stellar mass
observable-theoretical mass ($M^*_{\rm CL}-M_{\rm h}$) relation using a power
law model, including a possible redshift evolution term. We find a moderate
scatter of $\sigma_{M^*_{\rm CL} | M_{\rm h}}$ of 0.124, 0.135 and 0.136 $\rm
dex$ for Euclid-Optimistic, Euclid-Pessimistic and LSST, respectively,
comparable to other work over more limited ranges of redshift. Moreover, the
three datasets are consistent with negligible evolution with redshift, in
agreement with observational and simulation results in the literature.
  We find that Euclid-Optimistic will be able to detect clusters with $>80\%$
completeness and purity down to $8\times10^{13} h^{-1} M_{\odot}$ up to $z<1$.
At higher redshifts, the same completeness and purity are obtained with the
larger mass threshold of $2\times10^{14} h^{-1} M_{\odot}$ up to $z=2$. The
Euclid-Pessimistic selection function has a similar shape with $\sim10\%$
higher mass limit. LSST shows $\sim 5\%$ higher mass limit than
Euclid-Optimistic up to $z<0.7$ and increases afterwards, reaching values of
$2\times10^{14} h^{-1} M_{\odot}$ at $z=1.4$. Similar selection functions with
only $80\%$ completeness threshold have been also computed. The complementarity
of these results with selection functions for surveys in other bands is
discussed.
