DOUBLE PRECISION FUNCTION KSGTHE(PW, VP, MVP) #endif #if !defined(CLEO_DOUBLE) REAL FUNCTION KSGTHE(PW, VP, MVP) #endif C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C Returns the error in theta 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 theta can be written as C C cos(theta) = Pz / sqrt(Px**2 + Py**2 + Pz**2) C C so dtheta = (Px*Pz*dPx + Py*Pz*dPy - Pt**2*dPz) / (P**2*Pt) C C The covariance matrix of the momentum is then C C sig**2 = A*Vx0*A(t) C C where A = (Px*Pz, Py*Pz, -Pt**2, 0) / (P**2*Pt) C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>