This work describes the simulation of X-ray tubes used in imaging applicati
ons. The cross section for the electron impact ionisation of the K-shell fo
r selected materials, and given by different sources, is analysed. An enhan
ced version of the EGS4 code incorporating different models to deal with io
nisation of the K-shell by electron impact is briefly described. The code i
s then used to simulate photon spectra produced in X-ray tubes operating at
energies below 100 keV. The results obtained for silver and molybdenum tar
gets in transmission and reflection geometries, and for different tube volt
ages, are then benchmarked against experimental data. The results show an o
verall good agreement between simulated and experimental data. It is shown
that the accuracy of the result depends on the model used to deal with the
ionisation of the K-shell. When appropriate models are in use, simulated an
d experimental spectra agree within 15% at the K-alpha peak.