A method for adjusting a detector for determining a position of at least one object within a range of measurement, wherein the detector constitutes a coordinate system in which an optical axis forms a z-axis, a direction parallel or antiparallel to the z-axis being a longitudinal direction, and a coordinate along the z-axis being a longitudinal coordinate, the detector comprising at least two longitudinal optical sensors (116, 126, 128) and at least one transfer device for imaging the object into an image plane, the transfer device having a focal plane, the transfer device being positioned in between the longitudinal optical sensors and the object, each of the longitudinal optical sensors having at least one sensor region, wherein the longitudinal optical sensors are arranged along the optical axis, wherein each of the longitudinal optical sensors is designed to generate at least one longitudinal sensor signal in a manner dependent on an illumination of the respective sensor region by at least one light beam propagating from the object to the detector, wherein the longitudinal sensor signal, given the same total power of the illumination, is dependent on a beam cross-section of the light beam in the sensor region, the detector further comprising at least one evaluation device, the method comprising the following steps: (i) subsequently moving the object longitudinally to at least two different calibration positions (134, 136) having at least two different longitudinal coordinates within the range of measurement; (ii) recording, for each of the calibration positions (134, 136), at least one first longitudinal sensor signal generated by a first longitudinal optical sensor and at least one second longitudinal sensor signal generated by a second longitudinal optical sensor; (iii) forming, for each of the calibration positions (134, 126), at least one calibration signal using the first and second longitudinal sensor signals; (iv) generating a calibration function using the calibration signals, the calibration function defining a relationship between the longitudinal coordinate of the object and the first and second longitudinal sensor signals; characterised in that the method further comprises at least one adjustment step for positioning the first longitudinal optical sensor and the second longitudinal optical sensor, the adjustment step comprising the following substeps: a) positioning the object in at least one outermost position within the measurement range, the outermost position of having a maximum longitudinal coordinate; b) positioning the first longitudinal optical sensor at a longitudinal coordinate of a focused image plane, wherein the focused image plane is the image plane in which the light originating from the object is focused by the transfer device; c) positioning the object in at least one closest position within the measurement range, the closest position of having a minimum longitudinal coordinate; and d) positioning the second longitudinal optical sensor at a longitudinal coordinate of the focused image plane. (i) subsequently moving the object longitudinally to at least two different calibration positions (134, 136) having at least two different longitudinal coordinates within the range of measurement; (ii) recording, for each of the calibration positions (134, 136), at least one first longitudinal sensor signal generated by a first longitudinal optical sensor and at least one second longitudinal sensor signal generated by a second longitudinal optical sensor; (iii) forming, for each of the calibration positions (134, 126), at least one calibration signal using the first and second longitudinal sensor signals; (iv) generating a calibration function using the calibration signals, the calibration function defining a relationship between the longitudinal coordinate of the object and the first and second longitudinal sensor signals; characterised in that the method further comprises at least one adjustment step for positioning the first longitudinal optical sensor and the second longitudinal optical sensor, the adjustment step comprising the following substeps: a) positioning the object in at least one outermost position within the measurement range, the outermost position of having a maximum longitudinal coordinate; b) positioning the first longitudinal optical sensor at a longitudinal coordinate of a focused image plane, wherein the focused image plane is the image plane in which the light originating from the object is focused by the transfer device; c) positioning the object in at least one closest position within the measurement range, the closest position of having a minimum longitudinal coordinate; and d) positioning the second longitudinal optical sensor at a longitudinal coordinate of the focused image plane. a) positioning the object in at least one outermost position within the measurement range, the outermost position of having a maximum longitudinal coordinate; b) positioning the first longitudinal optical sensor at a longitudinal coordinate of a focused image plane, wherein the focused image plane is the image plane in which the light originating from the object is focused by the transfer device; c) positioning the object in at least one closest position within the measurement range, the closest position of having a minimum longitudinal coordinate; and d) positioning the second longitudinal optical sensor at a longitudinal coordinate of the focused image plane.