A method of correcting or processing a pattern in a device forming region on a mask, the method comprising:
- selecting, from among a group of patterns included in a region near the target pattern, the region being in the device forming region, a pattern having a barycenter position at a barycenter pattern in a first direction, the barycenter position not being displaced from a predetermined barycenter even if the patterns are deformed when the patterns are formed on the mask, as an alignment pattern in the device forming region, the alignment pattern for setting a position at which the detection of the target pattern is performed;
- setting the barycenter position of the alignment pattern in the first direction as alignment reference coordinates;
- detecting the target pattern based on the alignment reference coordinates;
- and
- correcting or processing the target pattern detected.