The use of the Monte Carlo technique in the simulation of small-scale dosimeters and microdosimeters