Monte Carlo simulation of the response functions of CdTe detectors to be applied in x-ray spectroscopy. (June 2015)