The ion source operates by electron ionization (EI) or chemical ionization (CI). The sample enters the ion source from the GC/MSD interface. Electrons emitted by a filament enter the ionization chamber, guided by a magnetic field. The high-energy electrons interact with the sample molecules, ionizing and fragmenting them. The positive voltage on the repeller pushes the positive ions into the lens stack, where they pass through several electrostatic lenses. These lenses concentrate the ions into a tight beam, which is directed into the mass filter.