Radiation detector for measuring one or more characteristics of a radiation, comprising one or more detector pixels, a clock pulse generator, each detector pixel comprising a sensor producing an electrical signal in response to an event of a photon or charged particle of said radiation impinging on said sensor; a pixel electronics adapted for receiving and processing said electrical signal, comprising an analog processing unit for amplifying and shaping said electrical signal and producing a shaped pulse said pixel electronics comprises time determination unit for counting the TOT-count, the TOT-count being the number of clock pulses occurring during the time interval when said shaped pulse is above a threshold. Said pixel electronics comprises a plurality of event counters, each event counter counting the number of events having a TOT-count in a predefined ranges.