Modified kd-tree for photons. Moditifed ray tracing function for photon tracing.