(file) Return to h_fpp_geometry.f CVS log (file) (dir) Up to [HallC] / Analyzer / HTRACKING / Attic

Diff for /Analyzer/HTRACKING/Attic/h_fpp_geometry.f between version 1.1.2.2 and 1.1.2.3

version 1.1.2.2, 2007/09/11 19:14:17 version 1.1.2.3, 2007/09/12 14:40:03
Line 345 
Line 345 
       dtheta = dacos(r_f(3))            ! z = cos(theta)       dtheta = dacos(r_f(3))            ! z = cos(theta)
  
       if (r_f(1).ne.0.d0) then       if (r_f(1).ne.0.d0) then
           if (r_f(1).gt.0.d0) then
             if (r_f(2).gt.0.d0) then
         dphi = datan( r_f(2)/r_f(1) )   ! y/x = tan(phi)         dphi = datan( r_f(2)/r_f(1) )   ! y/x = tan(phi)
             else
               dphi = datan( r_f(2)/r_f(1) )       ! y/x = tan(phi)
               dphi = dphi + 6.28318d0
             endif
           else
             dphi = datan( r_f(2)/r_f(1) ) ! y/x = tan(phi)
             dphi = dphi + 3.14159d0
           endif
       elseif (r_f(2).gt.0.d0) then       elseif (r_f(2).gt.0.d0) then
         dphi = 1.5708d0                 ! phi = +90          dphi = 1.57080d0                        ! phi = +90
       elseif (r_f(2).lt.0.d0) then       elseif (r_f(2).lt.0.d0) then
         phi = -1.5708d0                 ! phi = -90          phi = 4.71239d0                 ! phi = +270
       else       else
         dphi = 0.d0                     ! phi undefined if theta=0 or r=0         dphi = 0.d0                     ! phi undefined if theta=0 or r=0
       endif       endif


Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0