Method for unfolding multiplet regions of X- and γ-ray spectra with a detection efficiency constraint avoiding inflecting the peak shapes for correction results