A miniaturized solid state detection system for X-rays spectrometry based on compton scattering