A 3-dimensional scatter correction algorithm for photon beams (dosimetry)