  Mounting evidence suggests that the TeV-PeV neutrino flux detected by the
IceCube telescope has mainly an extragalactic origin. If such neutrinos are
primarily produced by a single class of astrophysical sources via hadronuclear
($pp$) interactions, a similar flux of gamma-ray photons is expected. For the
first time, we employ tomographic constraints to pinpoint the origin of the
IceCube neutrino events by analyzing recent measurements of the cross
correlation between the distribution of GeV gamma rays, detected by the Fermi
satellite, and several galaxy catalogs in different redshift ranges. We find
that the corresponding bounds on the neutrino luminosity density are up to one
order of magnitude tighter than those obtained by using only the spectrum of
the gamma-ray background, especially for sources with mild redshift evolution.
In particular, our method excludes any hadronuclear source with a spectrum
softer than $E^{-2.1}$ as a main component of the neutrino background, if its
evolution is slower than $(1+z)^3$. Starburst galaxies, if able to accelerate
and confine cosmic rays efficiently, satisfy both spectral and tomographic
constraints.
