  (Abridged) In a recent work we explored the dependence of galaxy stellar
population properties derived from broad-band spectral energy distribution
fitting on the fitting parameters, e.g. SFHs, age grid, metallicity, IMF, dust
reddening, reddening law, filter setup and wavelength coverage. In this paper
we consider also redshift as a free parameter in the fit and study whether one
can obtain reasonable estimates of photometric redshifts and stellar population
properties at once. We use mock star-forming as well as passive galaxies placed
at various redshifts (0.5 to 3) as test particles. Mock star-forming galaxies
are extracted from a semi-analytical galaxy formation model. We show that for
high-z star-forming galaxies photometric redshifts, stellar masses and
reddening can be determined simultaneously when using a broad wavelength
coverage and a wide template setup in the fit. Masses are similarly well
recovered (median ~ 0.2 dex) as at fixed redshift. For old galaxies with little
recent star formation masses are better recovered than in the fixed redshift
case, such that the median recovered stellar mass improves by up to 0.3 dex
whereas the uncertainty in the redshift accuracy increases by only ~ 0.05.
However, a failure in redshift recovery also means a failure in mass recovery.
As at fixed redshift mismatches in SFH and degeneracies between age, dust and
now also redshift cause underestimated ages, overestimated reddening and
underestimated masses. Stellar masses are best determined at low redshift
without reddening in the fit (median underestimation ~ 0.1 dex for similarly
well recovered redshifts). Not surprisingly, the recovery of properties is
substantially better for passive galaxies. In all cases, the recovery of
physical parameters is crucially dependent on the wavelength coverage adopted
in the fitting. Scaling relations for the transformation of stellar masses are
provided.
