Theory of Origin of Cosmic Rays