Spectroscopic techniques for studying the beam-foil interaction