A vacuumed enclosure has a window formed of an X-ray transmissive
material. The vacuumed enclosure encloses an electron beam source for
generating an electron beam and a target which, irradiated by the
electron beam, generates a primary X-ray. The target is smaller in the
outer dimension than the window and located on the center of the window
such that it irradiates, through the window, the primary X-ray onto a
sample located outside. The vacuumed enclosure further encloses an X-ray
detector located such that it can detect a fluorescent X-ray and a
scattered X-ray coming from the sample through the window. The X-ray
detector generates a signal representative of energy information of the
fluorescent X-ray and the scattered X-ray. The vacuumed enclosure further
encloses a thermally and electrically conductive metal extending through
the target across the widow.