Calculation of the pulse-height response of NaI(Tl) scintillation counters