We describe here the computer program for modeling the FPCs and SSDs used in the ground calibration, relative and absolute, of AXAF. The program is called as a subroutine by XSPEC. The design is hierarchical: at the lowest level are models for single electron spectra, upon which are based the computation of moment generating functions (mgfs) for the detector response functions. Any number of discrete lines and a continuum are allowed. The continuum is the source x-ray spectrum as modified by intervening filters. The overall mgf is numerically transformed into the count spectrum via an inverse fast Fourier transform. The component mgfs have unit normalization, and final fitted normalizations give the count rate for each component.