apparatus for analysis of a thin film formed over an underlying layer on a surface of a sample , the thin film including first elements , while the underlying layer includes second elements . the apparatus includes an electron gun , which directs a beam of electrons to impinge on a point on the surface of the sample at which the thin film is formed . an electron detector receives auger electrons emitted by the first and second elements responsive to the impinging beam of electrons , and to output a signal indicative of a distribution of energies of the emitted electrons . a controller receives the signal and analyzes the distribution of the energies so as to determine a composition of the first elements in the thin film and a thickness of the thin film .