Microscopic modelling of semiconductor-based infrared photodetectors: a weighted Monte Carlo approach