Response functions of an X-ray detecting system for spectral analysis of therapeutic beams