Apparatus for analysis of a sample includes a radiation source, which is
adapted to direct a converging beam of X-rays toward a surface of the
sample. At least one detector array is arranged to sense the X-rays
scattered from the sample as a function of elevation angle over a range
of elevation angles simultaneously, and to generate output signals
responsively to the scattered X-rays. The detector array has a first
configuration in which the detector array senses the X-rays that are
reflected from the surface of the sample at a grazing angle, and a second
configuration in which the detector array senses the X-rays that are
diffracted from the surface in a vicinity of a Bragg angle of the sample.
A signal processor processes the output signals so as to determine a
characteristic of the surface layer of the sample.