Disclosed herein is an apparatus comprising: a radiation absorption layer comprising an electrode; a counter configured to register a number of radiation particles absorbed by the radiation absorption layer; a controller configured to start a time delay from a time at which an absolute value of an electrical signal on the electrode equals or exceeds an absolute value of a first threshold; a comparator configured to compare the electrical signal to a second threshold; wherein the controller is configured to activate the comparator during the time delay; wherein the controller is configured to cause the number registered by the counter to change, if the comparator determines that an absolute value of the electrical signal equals or exceeds an absolute value of the second threshold.