Multiple-photon resolving fiber-loop detector