This paper presents a new theory for calculating the transport of high-energy photons and their secondary chargedparticles. We call this new algorithm characteristic line method, which is completely analytic. Using this new method wecannot only accurately calculate the transport behaviour of energetic photons, but also precisely describes the transportbehaviour and energy deposition of secondary electrons, photoelectrons, Compton recoil electrons and positron-electronpairs. Its calculation efficiency is much higher than that of the Monte Carlo method. The theory can be directlyapplied to layered media situation and obtain a pencil-beam-modelled solution. Therefore, it may be applied to clinicalapplications for radiation therapy.