  We construct an X-ray spectral model for the clumpy torus in an active
galactic nucleus (AGN) using Geant4, which includes the physical processes of
the photoelectric effect, Compton scattering, Rayleigh scattering, $\gamma$
conversion, fluorescence line, and Auger process. Since the electrons in the
torus are expected to be bounded instead of free, the deviation of the
scattering cross section from the Klein-Nishina cross section has also been
included, which changes the X-ray spectra by up to 25% below $10$ keV. We have
investigated the effect of the clumpiness parameters on the reflection spectra
and the strength of the fluorescent line Fe K$\alpha$. The volume filling
factor of the clouds in the clumpy torus only slightly influences the
reflection spectra, however, the total column density and the number of clouds
along the line of sight significantly change the shapes and amplitudes of the
reflection spectra. The effect of column density is similar to the case of a
smooth torus, while a small number of clouds along the line of sight will
smooth out the anisotropy of the reflection spectra and the fluorescent line Fe
K$\alpha$. The smoothing effect is mild in the low column density case
($\NH=10^{23}$ cm$^{-2}$), whereas it is much more evident in the high column
density case ($\NH=10^{25}$ cm$^{-2}$). Our model provides a quantitative tool
for the spectral analysis of the clumpy torus. We suggest that the joint fits
of the broad band spectral energy distributions of AGNs (from X-ray to
infrared) should better constrain the structure of the torus.
