FPSGST COMMENTS
*-- Author :    Stephen J. Maxfield   17/02/92
      SUBROUTINE FPSGST
**: FPSGST.......SM. More diagnostic histograms.                                                              
**----------------------------------------------------------------------                                      
**: FPSGST 30207 GB. comment lines moved inside the routine                                                   
**: FPSGST 30205 SM. Add extra diagnostics for segments.                                                      
**----------------------------------------------------------------------                                      
*                                                                                                             
*     Make diagnostic histograms of planar segments.                                                          
*     (Monte Carlo only!!)                                                                                    
*                                                                                                             
*KEEP,BCS.                                                                                                    
*KEEP,H1EVDT.                                                                                                 
*                                                                                                             
*  IDATA  type of information (HEAD bank word 6) :                                                            
*                                                                                                             
*                       0 - real data H1                                                                      
*                       1 - MC data H1SIM                                                                     
*                       2 - real data CERN tests                                                              
*                       3 - MC data ARCET                                                                     
*                                                                                                             
*  MONTE = .TRUE.   if IDATA=1                                                                                
*  KEVENT = event processed counter for H1REC                                                                 
*                                                                                                             
*KEND.                                                                                                        
*                                                                                                             
*                                                                                                             
*KEEP,STFUNCT.                                                                                                
*     index of element before row number IROW                                                                 
*     index of L'th element  of row number IROW                                                               
*     L'th integer element of the IROW'th row of bank with index IND                                          
*     L'th real element of the IROW'th row of bank with index IND                                             
*KEEP,FTFUNCT.                                                                                                
*     Statement functions for RADIAL Chamber data access.                                                     
*     Using Channel Number J                                                                                  
*     Module, Wedge-pair and Z-plane numbers...                                                               
*     Statement function for obtaining WEDGE numbers(0-47) of                                                 
*     wires at plus and minus ends of Cell numbers                                                            
*     Statement function for obtaining IOS wire number (1-36)                                                 
*     Statement functions for PLANAR Chamber data access.                                                     
*     Using Channel Number J                                                                                  
*     Module, orientation, W-cell and Z-plane numbers...                                                      
*     IPSMD in range 0:8 Planar module number.                                                                
*                                                                                                             
*     IOS wire number (runs from 0 to 36)                                                                     
* SB plane numbers (1-72) from cell number                                                                    
* Module, orientation, wire and (typical) cell number from plane                                              
* number in the range 1-72 (planars, radials and combined)                                                    
*KEND.                                                                                                        
* Planar segment bank...                                                                                      
      IFPSG = NLINK('FPSG',0)
* Planar hit bank...                                                                                          
      IFPLC = NLINK('FPLC',0)
*     Count number of (disconnected) segments found in each SM                                                
*     and total number of hits attached to segments...                                                        
      CALL VZERO(KSEG, 3)                                                                              
*           separate inner and outer wires...                                                                 
*            outer...                                                                                         
             CALL SHS(253,0,CHARGE)                                                                    
             CALL SHD(254,0,CHARGE,FLOAT(KDP))                                                         
             CALL SHS(255,0,CHARGE)                                                                    
             CALL SHD(256,0,CHARGE,FLOAT(KDP))                                                         
      CALL SHS(221,0,FLOAT(KSEG(1)))                                                                   
      CALL SHS(222,0,FLOAT(KSEG(2)))                                                                   
      CALL SHS(223,0,FLOAT(KSEG(3)))                                                                   
      CALL SHS(261,0,FLOAT(KSUM))                                                                      
        CALL SHS(262,0,FRUSED)                                                                         
*