To accurately reconstruct the tomographic gamma scanning (TGS) transmission measurement image, this study optimized the transmission reconstruction equation based on the actual situation of TGS transmission measurement. Using the transmission reconstruction equation and the Monte Carlo program Geant4, an innovative virtual trajectory length model was constructed. This model integrated the solving process for the trajectory length and detection efficiency within the same model. To mitigate the influence of the angular distribution of \(\gamma\) -rays emitted by the transmitted source at the detector, the transport processes of numerous particles traversing a virtual nuclear waste barrel with a density of zero were simulated. Consequently, a certain amount of information was captured at each step of particle transport. Simultaneously, the model addressed the nonuniform detection efficiency of the detector end face by considering whether the energy deposition of particles in the detector equaled their initial energy. Two models were established to validate the accuracy and reliability of the virtual trajectory length model. Model 1 was a simplified nuclear waste barrel, whereas Model 2 closely resembled the actual structure of a nuclear waste barrel. The results indicated that the proposed virtual trajectory length model significantly enhanced the precision of the trajectory length determination, substantially increasing the quality of the reconstructed images. For example, the reconstructed images of Model 2 using the “point-to-point” and average trajectory models revealed a signal-to-noise ratio increase of 375.0% and 112.7%, respectively. Thus, the virtual trajectory length model proposed in this study holds paramount significance for the precise reconstruction of transmission images. Moreover, it can provide support for the accurate detection of radioactive activity in nuclear waste barrels.