The dependence of quorum sensing on the depth of a growing biofilm