The charged particle beams is provided, which can analyze contamination of
the inner wall of the system without being disassembled and supply
information on appropriate maintenance timing. The contamination level of
the inner wall of the system is identified by measuring the spectrum of
the X-rays emitted from the inner wall due to irradiation of a charged
particle beam or a recoil electron.