Evaluating the accuracy of a three-term pencil beam algorithm in heterogeneous media. (16th January 2017)