I thought cosmic rays were protons. Seems you could deflect them with an electric or magnetic field.
Cosmic rays are high energy photons. "Light" of a higher frequency (and hence more energetic) than X-ray.