  We have implemented a Monte Carlo algorithm to model and predict the response
of various kinds of CCDs to X-ray photons and minimally-ionizing particles and
have applied this model to the CCDs in the Chandra X-ray Observatory's Advanced
CCD Imaging Spectrometer. This algorithm draws on empirical results and
predicts the response of all basic types of X-ray CCD devices. It relies on new
solutions of the diffusion equation, including recombination, to predict the
radial charge cloud distribution in field-free regions of CCDs. By adjusting
the size of the charge clouds, we can reproduce the event grade distribution
seen in calibration data. Using a model of the channel stops developed here and
an insightful treatment of the insulating layer under the gate structure
developed at MIT, we are able to reproduce all notable features in ACIS
calibration spectra.
  The simulator is used to reproduce ground and flight calibration data from
ACIS, thus confirming its fidelity. It can then be used for a variety of
calibration tasks, such as generating spectral response matrices for spectral
fitting of astrophysical sources, quantum efficiency estimation, and modeling
of photon pile-up.
