Damage profile and ion distribution of slow heavy ions in compounds