1. A pattern measuring device comprising: an arithmetic processing unit including processing circuitry and a non-transitory memory storing at least one of image data and contour line data formed based on an output of a charged particle beam device, and a program that, when executed by the processing circuitry, causes the processing circuitry to: acquire or generate the image data or the contour line data of a plurality of circuit patterns created under different manufacturing conditions of an exposure apparatus; determine a plurality of measured values of the circuit patterns for each exposure condition, using the image data or contour line data of different exposure conditions; calculate a function representing a relationship between the measured values and each exposure condition based on the measured values of each exposure condition; and generate reference data to be used for measurement of a circuit pattern by setting a pattern edge based on an edge position determined for different positions of the pattern; wherein the arithmetic processing unit, using the image data or the contour line data on a plurality of circuit patterns created under different combinations of a focus condition and a dose condition of the exposure apparatus, measures dimensions of the plurality of circuit patterns, determines a best focus condition and a best dose condition on the basis of measurement results of the dimensions of the plurality of circuit patterns, and changes an edge position of the contour line data in accordance with positions of the best focus condition and the best dose condition on a focus map and a dose map.