 function [T,Y,Z,L,theta,Iteration,RayInf] = InvRayTrace(PF,TT,YY,HH,Data,Control,Par)
%  
 %% InvRayTracing(PF,TT,YY,HH,tag)->inversion problem
 %ã߸ٵ
 %%%%%%%%%%%%%%%
 %1⣺õʱTˮƽλYZ
 %a֪桢Դꡢǡʱ --> ȡˮƽλ
 %b֪桢Դꡢǡˮƽλ --> ȡʱ
 %c֪桢Դꡢǡ --> ʱ䡢ˮƽλ
 %%%%%%%%%%%%%%%%
 %2⣺߸ټtheta-
 %֪桢ԴꡢĿ --> 
 %ֵ
 %棬Ƶ꣬յֵ꣨ʵʱ䣨Ϊ0
 %ֵ
 %ʱTˮƽλYZ
 %%

%%%
%[theta] = IncidentAngle(PF, TT,YY,HH,'Tangent'); 
[T,Y,Z,L,theta,Iteration,RayInf] = InAngle(PF,TT,YY,HH,Data,Control,Par); 

%%%
%%% IncidentAngle внļʱ
% if  T == +inf
%     [T,Y,Z,L] = RayTracing( PF, theta, TT ,  +inf  ,HH  );
% elseif Y == +inf
%     [T,Y,Z,L] = RayTracing( PF, theta, TT ,   YY   ,+inf);
% elseif  H == +inf
%     [T,Y,Z,L] = RayTracing( PF, theta, +inf , YY   ,HH  );
% end



