Their origin is not exactly known. There is evidence that many primary cosmic rays come from the supernovae of massive stars. However, this is not thought to be their only source. Active galactic nuclei probably also produce cosmic rays. Galactic cosmic rays are Particles trapped in the magnetic field of Earth, Particles sent flying into space during a solar flare, and High-energy protons and heavy ions that originate outside our solar system