Study of CdTe detection efficiency for medical applications using Geant4-based stochastic simulations