The optimization of pencil beam widths for use in an electron pencil beam algorithm.