Abstract: A pixelated X-ray semiconductor detector (=direct converter) is studied which contains an inhomogeneous electric field parallel to the depth axis caused by different concentrations of p- or n-doping. The X-ray energy deposition and charge movement within the detector is modeled in Monte-Carlo simulations which give access to astatistical analysis of electron drift times and current pulse widths for various degrees of static polarization. Integral charges induced on the pixel electrodes are evaluated and put to histograms of spectral detector responses and pulse height spectra (considering energy measurements before and after electronically pulse shaping, respectively). For n-doped semiconductors, the detector performance degrades due to pulse broadening. In contrast, a moderate p-doping can improve the detector performance by generating sharper electron pulses, as long as the detector is not limited by dynamical polarization.Conclusions: We performed Monte-Carlo simulations of energy deposition and charge movement within pixelated photon counting direct conversion detectors made of doped semiconductors of different acceptoror donor concentrations. Induced currents were statistically evaluated with the help of histograms of pulse width and total integral charge (represented before consideration of pulse shaper electronics in spectral responses, and after consideration of pulse shaper electronics in pulse height spectra, respectively). The electrical field close to anode pixels was identified as the main quantity defining the pulse characteristics. For n-doped semiconductors, a weaker electric field near the pixel anodes and longer total electron drift timesare seen, which results in broader pulse widths and a degradation of the spectral responses (by enhanced charge sharing) and pulse height spectra. In contrast, for p-doped semiconductors, a strengthenedelectric field near the anodes and an, on average, reduced total drift time is seen, which results in shorter pulse widths. For moderatep-doping concentrations n_A ≤ 0.9n_max, an improvement of the spectral response (less charge sharing) and pulse height spectrumis seen. For p-doping concentrations close to the limit still allowing full depletion, n_A > 0.9n_max, the spectral response und pulseheight spectrum degrade again due to charges which experience long drift times when created in a region with weakened electric field near the cathode. We conclude that using moderately p-doped semiconductor material, n_A ≈ 0.5n_max, improves detector performance aslong as the detector is not limited by dynamical polarization. In the latter case, it has to be noted that a p-doped semiconductor reduces the maximum count rate at which catastrophic dynamical polarization occurs.