Elastic and inelastic heavy ion scattering