Accurate model for the primordial black hole mass distribution from a peak in the power spectrum