1. A mass spectrometer comprising: a sample holder for holding a sample; an observation unit for observing a surface of the sample held by the sample holder; an ionization unit for ionizing a component at a specified position on the sample held by the sample holder; a mass analyzer for mass analyzing an ion generated by the ionization unit; a sample cutter for cutting a portion of the sample held by the sample holder to expose a sample analysis surface which is a target of an ionization by the ionization unit; a moving unit for moving the sample holder in such a manner that the sample is sequentially carried to an observation position where the sample can be observed by the observation unit, a cutting position where the sample is cut by the sample cutter, and an analysis position where an ionization can be performed by the ionization unit; and a controller for controlling the moving unit, the sample cutter, the ionization unit, and the mass analyzer in such a manner as to repeat a plurality of times a process of cutting a portion of the sample by the sample cutter, ionizing the partially cut sample, and a mass analysis, wherein: mass analysis information on a plurality of sample analysis surfaces at different positions in a depth direction of the sample is collected.