Disclosed herein is a radiation detector, comprising: a radiation absorption layer comprising an electrode; a voltage comparator that compares a voltage of the electrode to a first threshold; a counter that registers a number of photons of radiation absorbed by the radiation absorption layer; a controller; and a voltmeter. The controller is configured to start a time delay from a time at which the voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the first threshold. The controller is configured to cause the voltmeter to measure the voltage upon expiration of the time delay. The controller is configured to determine the number of photons by dividing the voltage measured by the voltmeter by a voltage that a single photon would have caused on the electrode. The controller can cause the number registered by the counter to increase by the number of photons.