  The Compton Spectrometer and Imager (COSI) is a balloon-borne gamma-ray
(0.2-5 MeV) telescope with inherent sensitivity to polarization. COSI's main
goal is to study astrophysical sources such as $\gamma$-ray bursts, positron
annihilation, Galactic nucleosynthesis, and compact objects. COSI employs a
compact Compton telescope design utilizing 12 high-purity cross strip germanium
detectors (size: $8\times8\times1.5$ cm$^3$, 2 mm strip pitch).
  We require well-benchmarked simulations to simulate the full instrument
response used for data analysis, to optimize our analysis algorithms, and to
better understand our instrument and the in-flight performance. In order to
achieve a reasonable agreement, we have built a comprehensive mass model of the
instrument and developed a detailed detector effects engine, which takes into
account the individual performance of each strip as well as the characteristics
of the overall detector system. We performed detailed Monte-Carlo simulations
with Cosima/Geant4, applied the detector effects engine, and benchmarked the
results with pre-flight calibrations using radioactive sources. After applying
the detector effects engine, the simulations closely resemble the measurements,
and the standard calibration, event reconstruction, and imaging pipeline used
for measurements can also be applied to the simulations.
  In this manuscript, we will describe the detector effects engine, the
benchmarking tests with calibrations, and the application to preliminary
results from COSI's 46-day balloon flight in 2016.
