We study the reset dynamics of niobium (Nb) superconducting nanowire
single-photon detectors (SNSPDs) using experimental measurements and numerical
simulations. The numerical simulations of the detection dynamics agree well
with experimental measurements, using independently determined parameters in
the simulations. We find that if the photon-induced hotspot cools too slowly,
the device will latch into a dc resistive state. To avoid latching, the time
for the hotspot to cool must be short compared to the inductive time constant
that governs the resetting of the current in the device after hotspot
formation. From simulations of the energy relaxation process, we find that the
hotspot cooling time is determined primarily by the temperature-dependent
electron-phonon inelastic time. Latching prevents reset and precludes
subsequent photon detection. Fast resetting to the superconducting state is
therefore essential, and we demonstrate experimentally how this is achieved