*-- Author : Stephen J. Maxfield 22/07/92
SUBROUTINE FPREZI
**: FPREZI.......SM. New deck for planar seg residuals.
**----------------------------------------------------------------------
*
* Make diagnostic histograms of planar segments.
*
*KEEP,BCS.
*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)
* Planar geometry...
IFPG1 = NLINK('FPG1',0)
* Get segment parameters...
* Loop through the (up to) 12 hits on this segment...
* Get the cellnumber, hence the orientation...
* Locate the hit in space...
CALL FPWHIT(KDG,WPL, WMI, PHIDUM, WWIR, ZZ, IBB)
* distance from wire...
* Predict x, y, U and V from segment, at z of this hit.
* depending on wire orientation, one of these is drift!
* histogram the 'residuals'...
* by orientation...
CALL SHS(243+IORI,0,DELMG)
CALL SHS( 246,0,DELMG)
CALL SHD( 247,0,WDRIF,DELMG)
* Histogram missing wire...
* Cell number of 1st cell on this wire plane...
* Predict x, y, U and V from segment, at this z...
* depending on wire orientation, one of these is drift!
CALL SHS(263,0,FLOAT(K36))
CALL SHD(264,0,FLOAT(K36),WPRED)
CALL SHS(248,0,FLOAT(NUMD))
CALL SHS(249,0,PRCH)
*