Study of charge transport in non-irradiated and irradiated silicon detectors