A method for controlling layers alignment in a multi-layer sample, the method comprising the steps of: (i) providing a measurement site including two regions (24, 26) located one above the other in two different layers (L 1, L 2), respectively, said regions containing patterned structures of a certain known periodicity, said regions defining four different pairs of sub-regions: a pair of a first and a second sub-region (A 1, A 2), a pair of a third and a fourth sub-region (D 1, D 2), a pair of a fifth and a sixth sub-region (B 1, B 2), and a pair of a seventh and an eighth sub-region (C 1, C 2); wherein the second, fourth, sixth, and eighth sub-regions are located on top of the first, third, fifth, and seventh sub-regions, respectively; wherein the second and third sub-regions (A 2, D 1) have no grating, and wherein the first, fourth, fifth, sixth, seventh and eighth sub-regions (A 1, D 2, B 1, B 2, C 1, C 2) each contain a grating; wherein the grating (G B2) of the sixth sub-region is located on top of the grating (G B1) of the fifth sub-region and the grating (G C2) of the eighth sub-region is located on top of the grating (G C1) of the seventh sub-region; and wherein the gratings (G B1, G B2) of the fifth and sixth sub-regions are shifted with respect to each other along an X-axis by a distance +ΔX, and the gratings (G C1, G C2) of the seventh and eighth sub-regions are shifted with respect to each other along the X-axis by a distance - ΔX; wherein those gratings which are located in a common layer have the same period, duty cycle, and height; (ii) determining an existing lateral shift between the layers by illuminating said measurement site with electromagnetic radiation and detecting a diffraction efficiency of radiation diffracted from the patterned structures indicative of a lateral shift between the patterned structures and analyzing said diffraction efficiency to determine the existing lateral shift between the layers; wherein said determining an existing lateral shift is done in two steps: measuring, in a first step, the pair of the first and second sub-regions (A1, A2) and the pair of the third and fourth sub-regions (D1, D2), thereby measuring grating characteristics by fitting to simulation; and measuring, in a second step, the pair of the fifth and sixth sub-regions (B1, B2) and the pair of the seventh and eighth sub-regions (C1, C2), wherein the measurements are fitted to simulation to determine said existing lateral shift using all or part of the grating characteristics that have been obtained in the first step. (i) providing a measurement site including two regions (24, 26) located one above the other in two different layers (L 1, L 2), respectively, said regions containing patterned structures of a certain known periodicity, said regions defining four different pairs of sub-regions: a pair of a first and a second sub-region (A 1, A 2), a pair of a third and a fourth sub-region (D 1, D 2), a pair of a fifth and a sixth sub-region (B 1, B 2), and a pair of a seventh and an eighth sub-region (C 1, C 2); wherein the second, fourth, sixth, and eighth sub-regions are located on top of the first, third, fifth, and seventh sub-regions, respectively; wherein the second and third sub-regions (A 2, D 1) have no grating, and wherein the first, fourth, fifth, sixth, seventh and eighth sub-regions (A 1, D 2, B 1, B 2, C 1, C 2) each contain a grating; wherein the grating (G B2) of the sixth sub-region is located on top of the grating (G B1) of the fifth sub-region and the grating (G C2) of the eighth sub-region is located on top of the grating (G C1) of the seventh sub-region; and wherein the gratings (G B1, G B2) of the fifth and sixth sub-regions are shifted with respect to each other along an X-axis by a distance +ΔX, and the gratings (G C1, G C2) of the seventh and eighth sub-regions are shifted with respect to each other along the X-axis by a distance - ΔX; wherein those gratings which are located in a common layer have the same period, duty cycle, and height; (ii) determining an existing lateral shift between the layers by illuminating said measurement site with electromagnetic radiation and detecting a diffraction efficiency of radiation diffracted from the patterned structures indicative of a lateral shift between the patterned structures and analyzing said diffraction efficiency to determine the existing lateral shift between the layers; wherein said determining an existing lateral shift is done in two steps: measuring, in a first step, the pair of the first and second sub-regions (A1, A2) and the pair of the third and fourth sub-regions (D1, D2), thereby measuring grating characteristics by fitting to simulation; and measuring, in a second step, the pair of the fifth and sixth sub-regions (B1, B2) and the pair of the seventh and eighth sub-regions (C1, C2), wherein the measurements are fitted to simulation to determine said existing lateral shift using all or part of the grating characteristics that have been obtained in the first step. measuring, in a first step, the pair of the first and second sub-regions (A1, A2) and the pair of the third and fourth sub-regions (D1, D2), thereby measuring grating characteristics by fitting to simulation; and measuring, in a second step, the pair of the fifth and sixth sub-regions (B1, B2) and the pair of the seventh and eighth sub-regions (C1, C2), wherein the measurements are fitted to simulation to determine said existing lateral shift using all or part of the grating characteristics that have been obtained in the first step.