%本函数用于记录指向概率法接收到的能量
function [result_,photon_]=receiver_receive(photon_,pointto_,result_,ke_,rangereso_)
%the weight of the photon that the receiver receives
weightadd_=photon_.weight*pointto_.pointweightscale*exp(-ke_*...
    pointto_.pointpath)*pointto_.pointdetector;

tt_=ceil((photon_.path+pointto_.pointpath)/rangereso_);
result_.rangedis(photon_.scattercount,tt_)=result_.rangedis(photon_.scattercount,tt_)+weightadd_;
result_.scattercountdis(photon_.scattercount)=result_.scattercountdis(photon_.scattercount)+weightadd_;
%update of the weight of the photon
photon_.weight=photon_.weight*(1-pointto_.pointweightscale*pointto_.pointdetector);
end
