Damage induced by ionizing radiation on CdZnTe and CdTe detectors