A method of making an apparatus suitable for detecting X-rays, the method comprising: obtaining a substrate having a first surface and a second surface, wherein the substrate comprises an electronics system in or on the substrate, wherein the substrate comprises a plurality of electric contacts on the first surface; obtaining a first chip comprising a first X-ray absorption layer, wherein the first X-ray absorption layer comprises an electrode; directly bonding the first chip to the substrate such that the electrode of the first X-ray absorption layer is electrically connected to at least one of the electrical contacts; and obtaining a second chip comprising a second X-ray absorption layer, wherein the second X-ray absorption layer comprises an electrode, and directly bonding the second chip to the substrate such that the electrode of the second X-ray absorption layer is electrically connected to at least one of the electrical contacts, characterized in that the electronics system comprises: a first voltage comparator configured to compare a voltage of the electrode to a first threshold; a second voltage comparator configured to compare the voltage to a second threshold; a counter configured to register a number of X-ray photons reaching the first X-ray absorption layer; a controller; wherein the controller is configured to start a time delay from a time at which the first voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the first threshold; wherein the controller is configured to activate the second voltage comparator during the time delay; wherein the controller is configured to cause the number registered by the counter to increase by one, if the second voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the second threshold. obtaining a substrate having a first surface and a second surface, wherein the substrate comprises an electronics system in or on the substrate, wherein the substrate comprises a plurality of electric contacts on the first surface; obtaining a first chip comprising a first X-ray absorption layer, wherein the first X-ray absorption layer comprises an electrode; directly bonding the first chip to the substrate such that the electrode of the first X-ray absorption layer is electrically connected to at least one of the electrical contacts; and obtaining a second chip comprising a second X-ray absorption layer, wherein the second X-ray absorption layer comprises an electrode, and directly bonding the second chip to the substrate such that the electrode of the second X-ray absorption layer is electrically connected to at least one of the electrical contacts, characterized in that the electronics system comprises: a first voltage comparator configured to compare a voltage of the electrode to a first threshold; a second voltage comparator configured to compare the voltage to a second threshold; a counter configured to register a number of X-ray photons reaching the first X-ray absorption layer; a controller; wherein the controller is configured to start a time delay from a time at which the first voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the first threshold; wherein the controller is configured to activate the second voltage comparator during the time delay; wherein the controller is configured to cause the number registered by the counter to increase by one, if the second voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the second threshold. a first voltage comparator configured to compare a voltage of the electrode to a first threshold; a second voltage comparator configured to compare the voltage to a second threshold; a counter configured to register a number of X-ray photons reaching the first X-ray absorption layer; a controller; wherein the controller is configured to start a time delay from a time at which the first voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the first threshold; wherein the controller is configured to activate the second voltage comparator during the time delay; wherein the controller is configured to cause the number registered by the counter to increase by one, if the second voltage comparator determines that an absolute value of the voltage equals or exceeds an absolute value of the second threshold.