Method for an X-ray fluorescence measurement, wherein the presence of fluorescing target particles is detected in an object to be examined and target particles that are present are localized in the object, comprising the steps of (a) generating an X-ray beam by means of a source device, wherein the X-ray beam extends through the object in an X-ray beam direction parallel to a first projection direction, (b) irradiating the object with the X-ray beam at a multiplicity of scan positions in a first projection plane, wherein the scan positions are set by a scanning device, by means of which the source device and the object are moved relative to one another, (c) detecting X-ray radiation, emitted from the object in a plurality of spatial directions, at each scan position using a detector array device, which is securely connected to the source device, characterized in that the detector array device comprises a multiplicity of spectrally selective detector elements, which are arranged to detect the X-ray radiation in the multiplicity of spatial directions, and a plurality of screen lamellas, which extend in radial directions relative to the X-ray beam direction, which shield the detector elements from X-ray radiation scattered in the object and which are arranged in such a way that the detector elements are able to detect X-ray radiation from all locations within the beam volume of the X-ray beam in the object, and (d) processing detector signals of the detector elements in order to detect X-ray fluorescence of target particles in the detected X-ray radiation and in order to localize the target particles in the object if the X-ray fluorescence is detected, wherein - for each of a multiplicity of predetermined scan positions an energy spectrum of the X-ray radiation emerging from the object is measured with each detector element and a subset of significant detector elements is sought after, the sum signal of said detector elements allowing the detection of the X-ray fluorescence of the target particles with a statistical significance that is increased in comparison with the remaining detector elements, and - if significant detector elements are found at at least one scan position, the presence of target particles is detected and this scan position is established as a target scan position, at which the target particles are localized in the first projection plane, or, if significant detector elements are found at no scan position, the presence of no target particles is detected. (a) generating an X-ray beam by means of a source device, wherein the X-ray beam extends through the object in an X-ray beam direction parallel to a first projection direction, (b) irradiating the object with the X-ray beam at a multiplicity of scan positions in a first projection plane, wherein the scan positions are set by a scanning device, by means of which the source device and the object are moved relative to one another, (c) detecting X-ray radiation, emitted from the object in a plurality of spatial directions, at each scan position using a detector array device, which is securely connected to the source device, characterized in that the detector array device comprises a multiplicity of spectrally selective detector elements, which are arranged to detect the X-ray radiation in the multiplicity of spatial directions, and a plurality of screen lamellas, which extend in radial directions relative to the X-ray beam direction, which shield the detector elements from X-ray radiation scattered in the object and which are arranged in such a way that the detector elements are able to detect X-ray radiation from all locations within the beam volume of the X-ray beam in the object, and (d) processing detector signals of the detector elements in order to detect X-ray fluorescence of target particles in the detected X-ray radiation and in order to localize the target particles in the object if the X-ray fluorescence is detected, wherein - for each of a multiplicity of predetermined scan positions an energy spectrum of the X-ray radiation emerging from the object is measured with each detector element and a subset of significant detector elements is sought after, the sum signal of said detector elements allowing the detection of the X-ray fluorescence of the target particles with a statistical significance that is increased in comparison with the remaining detector elements, and - if significant detector elements are found at at least one scan position, the presence of target particles is detected and this scan position is established as a target scan position, at which the target particles are localized in the first projection plane, or, if significant detector elements are found at no scan position, the presence of no target particles is detected. - for each of a multiplicity of predetermined scan positions an energy spectrum of the X-ray radiation emerging from the object is measured with each detector element and a subset of significant detector elements is sought after, the sum signal of said detector elements allowing the detection of the X-ray fluorescence of the target particles with a statistical significance that is increased in comparison with the remaining detector elements, and - if significant detector elements are found at at least one scan position, the presence of target particles is detected and this scan position is established as a target scan position, at which the target particles are localized in the first projection plane, or, if significant detector elements are found at no scan position, the presence of no target particles is detected.