The X-ray energy response of silicon Part A. Theory