Once the sample has gone through the GC process, the gas is transferred through a tube to the mass spectrometer. There, the samples are blasted with a beam of electrons to ionize them. The ions then travel to a mass analyzer, which accelerates the ions into a magnetic field. Based on the weight of the ions, they will experience more or less deflection due to the magnetic field and land on the detector in different positions. The position of the ions will therefore denote the weight of the ion, allowing for the mass-to-charge ratio (m/z) to be calculated.