SUBROUTINE FKRTOZ
*-- Author : S.Burke / J.V. Morris
      SUBROUTINE FKRTOZ(SIN,CIN,BZ,COUT)
**********************************************************************                                        
*                                                                    *                                        
* Transform a covariance matrix from fixed R to fixed z              *                                        
*                                                                    *                                        
* Assumed to be in terms of (R,PHI)                                  *                                        
*                                                                    *                                        
*                        *** NOT TESTED ***                          *                                        
*                                                                    *                                        
**********************************************************************                                        
                                                                        
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)                               
                                                                        
      DIMENSION SIN(5),CIN(5,5),COUT(5,5)                               
                                                                        
**********************************************************************                                        
                                                                        
      CPMP = COS(SIN(5) - SIN(2))                                       
      SPMP = SQRT(1.D0 - CPMP*CPMP)                                     
                                                                        
      DR = SIN(4)*CPMP                                                  
      DPHI = SIN(4)*SPMP/(SIN(1)*DR)                                    
      DP = (SIN(3)*BZ*SQRT(1.D0 + SIN(4)*SIN(4)))/DR                    
                                                                        
      DR2 = CIN(1,1)*DR*DR                                              
      DPHI2 = DPHI*DPHI                                                 
      DP2 = DP*DP                                                       
                                                                        
      CALL UCOPY(CIN(3,2),COUT(3,2),38)                                                                
                                                                        
      COUT(1,1) = DR2                                                   
      COUT(2,1) = DPHI*DR2                                              
      COUT(3,1) = 0.D0                                                  
      COUT(4,1) = 0.D0                                                  
      COUT(5,1) = DP*DR2                                                
                                                                        
      COUT(2,2) = COUT(2,2) + DPHI2*DR2                                 
      COUT(5,2) = COUT(5,2) + DPHI*DP*DR2                               
                                                                        
      COUT(5,5) = COUT(5,5) + DP2*DR2                                   
                                                                        
      RETURN                                                            
      END                                                               
*