The measurement quality of spatial and spectral information in an X-ray photon field is crucial to modern X-ray imaging. Direct converting semiconductor detectors with high spatial resolution and the ability to count single interacting photons, offer the possibility to obtain additional information about the spectral distribution of the X-ray photons. For being able to measure this quantity, the signal shape of the analog signal arriving at the pixel electronic input has to be well understood. The induced signals can be calculated using Ramos formulation. For gaining a complete understanding of the signal shape for different interaction points, the adjoint formulation can be applied to the problem, but up to now all considerations were restricted to sensor layers with undoped material. This is no limitation in the case of silicon, but for materials like CdTe, the doping changes the electric field significantly and therefore the signal shape and timing heavily depend on the material constants. The 3D simulation of the sensor layer of a direct converting semiconductor detector has been carried out with the finite element program COMSOL Multiphysics. The adjoint formulation has been corrected for the doping of the sensor layer. The signals arriving at the input of the electronics have been simulated and can be used for designing the pixel electronics of future detectors.