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