Theory of Polarized Particles and Gamma Rays in Nuclear Reactions