Charged Beam Dynamics, Particle Accelerators and Free Electron Lasers