A quantitative explanation and precise measurement of the pulse height shift associated with nuclear reaction peaks in solid state detectors