A complete simulation of the X-ARAPUCA device for detection of scintillation photons