Methods and systems for inspection of a wafer or setting up an inspection
process are provided. One method for inspection of a wafer includes
detecting first and second sets of defects on the wafer by performing
different scans of the wafer with different focus offsets. The method
also includes comparing results of the different scans for a defect of
the first set and a defect of the second set that are detected at
approximately the same location on the wafer. The method further includes
determining if the defect of the first and second sets is a defect of an
underlying layer or an uppermost layer formed on the wafer based on
results of the comparing step.