This paper describes the modelisation of the Elekta XVI Cone Beam Computed Tomography (CBCT) machine components with Geant4 and its validation against calibration data taken for two commonly used machine setups. Preliminary dose maps of simulated CBCTs coming from this modelisation work are presented. This study is the first step of a research project, GHOST, aiming to improve the understanding of late toxicity risk in external beam radiotherapy patients by simulating dose depositions integrated from different sources (imaging, treatment beam) over the entire treatment plan. The second cancer risk will then be derived from different models relating irradiation dose and second cancer risk.