CMOS Single-photon Avalanche Diodes using Gated Reset Circuit with On-chip Pulse Width Modulation