Calculation of liquid-scintillation detector efficiency