A detailed Monte Carlo study of the performance of a silicon crystal for x-ray detection in the diagnostic energy range