Diamond crystals equipped with two metal electrodes can be operated as solid state ionization chambers for the detection of energetic radiation. Under irradiation with single α particles, the generated free electrons and holes are collected with a maximum efficiency close to 100%. When the same detectors are used for dosimetry in high intensity and high energy photon or particle beams, photoconductive gain G with values up to % 10 6 is frequently observed as described in the literature. In this work, we studied theoretically the irradiation induced conductivity of perfect diamond single crystals with ohmic contacts containing nitrogen and boron with concentrations N N and N B , respectively, as only chemical impurities. Based on four rate equations, two considering the charge states of N and B and two the concentrations of free carriers n and p, and, additionally, the neutrality condition, we could derive analytical solutions for the gain G as a function of impurity concentrations, crystal thickness, and excitation density. It turned out that G varies systematically with the compensation ratio R ¼ (N N À N B )=N B over five orders of magnitude. For R % 10 3 , the gain G is close to unity. With decreasing R, the gain increases /1=R until saturation is reached for R ( 1 and G % 10 4 -10 5 . Our theoretical data yield plausible explanations for the major trends that have been found experimentally in previous studies. They provide a valuable guideline for the future synthesis of diamond crystals to be used for manufacturing UV and radiation detectors.