Molecular beams are generated by expanding a gas through a nozzle into a vacuum chamber, where the molecules form a narrow, collimated beam. This beam can then be directed onto a target surface. Various detection techniques, such as mass spectrometry and surface spectroscopy, are used to analyze the products and intermediates of the reaction on the surface.