Patent Number: 
Section: claims

1. An electron beam apparatus for imaging a substrate surface, the apparatus comprising:an electron source configured to generate an electron beam;a beam-limiting aperture configured to block a portion of the electron beam while at a same time allowing transmission of another portion of the electron beam through the aperture to subsequently impinge upon the substrate surface for said imaging;a first scattered electron (SE) detector for gain adjustment which is configured to detect a first signal from scattered electrons emitted from a surface of the aperture due to impingement onto the surface by the blocked portion of the electron beam;a second scattered electron (SE) detector for generating image data which is configured to detect a second signal from scattered electrons emitted from the substrate surface due to impingement onto the substrate surface by the transmitted portion of the electron beam; anda gain control device configured to use the first signal to adjust a gain level for the second signal, where the first signal is detected at a same time as the second signal. 2. The apparatus of claim 1, wherein the first scattered electron detector comprises a high-speed detector. 3. The apparatus of claim 2, wherein the detector comprises an Everhart-Thornley detector. 4. The apparatus of claim 2, wherein the detector comprises a PIN diode based detector. 5. The apparatus of claim 2, wherein the detector comprises a microchannel plate detector. 6. The apparatus of claim 2, wherein the detector comprises an annular shape through which the electron beam is transmitted. 7. The apparatus of claim 1, further comprising:an objective lens for focusing the transmitted portion of the electron beam onto the substrate surface. 8. The apparatus of claim 7, wherein the sample comprises a semiconductor substrate. 9. The apparatus of claim 1, wherein the gain control device adjusts the gain in an analog signal domain. 10. The apparatus of claim 9, wherein the gain control device adjusts the gain using a variable gain amplifier. 11. The apparatus of claim 9, wherein the gain control device adjusts the gain using a multiplying digital-to-analog converter. 12. The apparatus of claim 1, wherein the gain control device adjusts the gain in a digital signal domain. 13. The apparatus of claim 1, wherein the apparatus comprises an automated electron beam inspection apparatus. 14. The apparatus of claim 1, wherein the apparatus comprises a critical-dimension scanning electron microsocope (CD-SEM). 15. A method of monitoring a beam current and correcting an image for fluctuations in the beam current, the method comprising:generating an electron beam using an electron source;blocking a portion of the electron beam with an opaque part of an aperture;allowing transmission of another portion of the electron beam through a hole of the aperture;detecting a first signal of scattered electrons emitted from the opaque part of the aperture due to impingement onto the the opaque part by the blocked portion of the electron beam;detecting a second signal of scattered electrons emitted from a target substrate being imaged by the transmitted portion of the electron beam; andusing the first signal to adjust a gain of the second signal, where the first signal is detected at a same time as the second signal. 16. The method of claim 15, wherein the method is performed in an imaging apparatus, and wherein the method further comprises:focusing the transmitted portion of the electron beam onto the target substrate. 17. The method of claim 16, wherein the imaging apparatus comprises an electron beam metrology tool configured to measure features on a substrate. 18. The method of claim 16, wherein the imaging apparatus comprises an electron beam inspection tool configured to inspect manufactured substrates. 19. The method of claim 15, wherein the method further comprises:adjusting a beam current by feedback to a electron gun controller of the first signal. 20. An electron beam apparatus for imaging a substrate comprising:means for generating an electron beam using an electron source;an aperture configured to block a portion of the electron beam while at a same time allowing transmission of another portion of the electron beam through the aperture to impinge upon the substrate;a first means for detecting a first signal of scattered electrons emitted from a surface of the aperture due to impingement onto the surface of the aperture by the blocked portion of the electron beam;a second means for detecting a second signal of scattered electrons emitted from the substrate being imaged by the transmitted portion of the electron beam; anda gain control device configured to use the first signal to adjust a gain level for the second signal, where the first signal and the second signal are detected at a same time. 21. The apparatus of claim 20, wherein the scattered electrons comprise secondary electrons. 22. The apparatus of claim 20, wherein the scattered electrons comprise backscattered electrons.