DOUBLE PRECISION FUNCTION KSGPHI(PW, VP, MVP) #endif #if !defined(CLEO_DOUBLE) REAL FUNCTION KSGPHI(PW, VP, MVP) #endif C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C Returns the error in phi for a track in the W parameterization. C C PW real array (read) C Track parameters in W form (at least 3-vector part) C C VP real array (read) C Covariance matrix C C MVP integer variable (read) C First dimension of VP (must be at least 3) C C C The equation for phi can be written as C C cot(phi) = Px / Py C C so dphi = (-Py*dPx + Px*dPy) / (Px**2 + Py**2) C C The covariance matrix of the momentum is then C C sig**2 = A*Vx0*A(t) C C where A = (-Py, Px, 0, 0) / (Px**2 + Py**2) C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>