Detection efficiency calculation for photons, electrons and positrons in a well detector. Part I: Analytical model