The role of rainbow refraction in heavy ion elastic scattering