  Using fully relativistic GEANT4 simulation tool kit, the transport ofenergetic electrons generated in solar flares was Monte-Carlo simulated, andresultant bremsstrahlung gamma-ray spectra were calculated. The solaratmosphere was approximated by 10 vertically-stacked zones. The simulation tookinto account two important physical processes,that the bremsstrahlung photonsemitted by precipitating relativistic electrons are strongly forward beamedtoward the photosphere, and that the majority of these gamma-rays must beCompton back-scattered by the solar atmosphere in order to reach the observer.Then, the Compton degradation was found to make the observable gamma-rayspectra much softer than is predicted by simple analytic calculations. Thegamma-ray signals were found to be enhanced by several conditions, including abroad pitch-angle distribution of the electrons, a near-limb flare longitude,and a significant tilt in the magnetic field lines if the flare longitude israther small. These results successfully explain several important flareproperties observed in the hard X-ray to gamma-ray range, including inparticular those obtained with Yohkoh. A comparison of the Yohkoh spectrum froma GOES X3.7 class limb flare on 1998 November 22, with a simulation assuming abroad electron pitch-angle distribution, suggests that gamma-rays from thisparticular solar flare were a mixture of direct bremsstrahlung photons andtheir Comptonization.
Using fully relativistic GEANT4 simulation tool kit, the transport of energetic electrons generated in solar flares was Monte-Carlo simulated, and resultant bremsstrahlung gamma-ray spectra were calculated. The solar atmosphere was approximated by 10 vertically-stacked zones.