FVFITR COMMENTS
*-- Author :    John V. Morris
      SUBROUTINE FVFITR(NC,IDF)
************************************************************************                                      
*                                                                      *                                      
* Fit the Class I plot IDF to determine Drift Velocity and resolution  *                                      
* JVM  24/9/91                                                         *                                      
*                                                                      *                                      
* Scale errors on fitted parameters by SQRT(CHISQ/NDF) for bad Chisq!? *                                      
* JVM  29/7/92  not very sanitary, but takes care of some systematics  *                                      
************************************************************************                                      
*KEEP,FCOMF.                                                                                                  
*KEEP,FVOUTR.                                                                                                 
*KEEP,FHLUN.                                                                                                  
*KEND.                                                                                                        
* is there anything to fit ??                                                                                 
*       WRITE(LUNH,1002)IDF,MXC                                                                               
*       WRITE(LUNH,1000)IDF,HSUM(IDF)                                                                         
      CALL UCOPY( P,PAR,NP )                                                                           
      CALL UCOPY( ST0,ST,NP )                                                                          
      CALL UCOPY( PMI0,PMI,NP )                                                                        
      CALL UCOPY( PMA0,PMA,NP )                                                                        
      CALL HFIT(IDF,FM2SOV,NP,PAR,CHISQ,IC,SIG,COV,ST,PMI,PMA)                                         
* compute scaling factor for errors .. ?? ..                                                                  
      CALL HGIVE(IDF,TITL,NBIN,XMIN,XMAX,NY,YMI,YMA,NWT,LOC) ! get bin s                               
* compute resolution in microns and print results                                                             
*     WRITE(LUNH,9600)PAR(6),SIG(6),PAR(7),SIG(7),RMIC(NC),EMIC(NC)                                           
*    & ,ASYM(NC),EASYM(NC)                                                                                    
*9600 FORMAT(/,1X,'Drift Velocity =',F10.2,' +/-',F6.2,' micr/nsec',                                          
*    &       /,1X,'Resolution     =',F10.2,' +/-',F6.2,' nsec     ',                                          
*    &       /,1X,'               =',F10.2,' +/-',F6.2,' microns  ',                                          
*    &       /,1X,'Asymmetry      =',F10.2,' +/-',F6.2,' nsec     ')                                          
* recompute RMIC in nsecs for compatibility with FSUMR                                                        
* compute number of fitted 4-hit track segments and error                                                     
*     BIN = 3.0                                                                                               
* note than this constant includes the conversion factor of                                                   
* sqrt(5)/2 which converts PAR(7) to the actual RMS of the peaks.                                             
*     WRITE(LUNH,9601)SEGS(NC),ESEG(NC)                                                                       
*     WRITE(LUNH,9602)SEGF(NC),ESEGF(NC)                                                                      
*     WRITE(LUNH,9603)SEGN(NC),ESEGN(NC)