A method and apparatus for assessing a height of a specimen includes an
electron beam unit having an electron beam source, lenses, a table for
setting a specimen and controllable in a height direction, and a
detector, and a height detection system for detecting height of the
specimen set on the table while the specimen is irradiated by an electron
beam. The height detection system further includes an illumination
system, a collection system, first and second detectors, a device
configured to receive output signals from the first and second detectors
while the specimen is irradiated by the electron beam and to generate a
comparison signal from the output signals, wherein the comparison signal
is responsive to the height of the specimen.