Patent ID: 7668343

Claim:
A method comprising: a detecting step of pre-scanning an object relative to a detection unit in two scanning directions, in an X-Y plane, opposite to each other, the detection unit being configured to detect a position of the surface of the object in a Z direction perpendicular to the X-Y plane, and detecting, using the detection unit, with respect to each of the two scanning directions, a position of the surface in the Z-direction for each of the same detection points on the surface; a calculating step of determining, with respect to each of the two scanning directions, a reference surface based on the detected positions of the surface obtained in said detecting step, calculating an offset value, which is a difference between the detected position and a position of the reference surface in the Z-direction for each of the same detection points with respect to each of the two scanning directions, calculating a correction value for correcting the calculated offset value in accordance with a corresponding one of the two scanning directions based on a difference, in the Z-direction, between positions of the determined reference surfaces obtained with respect to the two scanning directions; a correcting step of correcting, to obtain the measured position, the position of the surface detected by the detection unit while the object is scanned relative to the detection unit in one of the two scanning directions, in accordance with a corresponding one of the two scanning directions, with the calculated offset value and the calculated correction value obtained in said calculating step; a scanning step of scanning the object in one of the two scanning directions; a moving step of moving the scanning object in the Z direction based on the corrected position obtained in accordance with a corresponding one of the two scanning directions in said correcting step; and an exposing step of exposing the scanning, moving object to a pattern.