Optimization of quasi-hemispherical CdZnTe detectors by means of first principles simulation