Simulation of small-pitch HgCdTe photodetectors