A miniature actively recharged single-photon detector free of afterpulsing effects with 6ns dead time in a 0.18µm CMOS technology