*-- Author : Stephen Burke
SUBROUTINE FFRCEL(XY,JFT,ICELL,IWEDGE,DRIFT)
*-----------------------------------------Updates 13/03/92-------
**: FFRCEL 30205.SB. Only call UGTBNK when run number changes
*-----------------------------------------Updates 13/02/92-------
**: FFRCEL 30205.SB. ERRLOG error numbers changed.
*-----------------------------------------Updates 07/02/92-------
**: FFRCEL 30205.SB. Remove unused FKMEAS sequence.
*-----------------------------------------Updates 24/01/92-------
**: FFRCEL 30205.SB. ERRLOG message format changed.
*-----------------------------------------Updates----------------
**********************************************************************
* *
* Calculate a radial cell number from a position *
* *
* Returns ICELL = -1 if JFT is invalid *
* *
**********************************************************************
*KEEP,BCS.
*KEEP,BOSMDL.
C ------BOSMDL
C ------
*KEEP,FKNPL.
*
* Per-track values can go in H1WORK; note that LTRUE and LFIRST must
* be set at least per event.
*
* This is about 36k words long; the remaining common blocks are
* about 3.6k in total. Some of this could be in /H1WORK/, but the
* blocks would have to be reorganised.
*
* /FKPROJ/
* /FKFILT/
* /FKSMTH/
* /FKINT/
* /FKRSID/
* /FKTRUE/
* /FKDBG/
*KEEP,FFSTEE.
*KEEP,FKPIDP.
*KEND.
* Wedge spacing in phi - NB number of wedges is hard-wired
* This should end up being read from a bank?
**********************************************************************
* Get geometry bank
CALL UGTBNK('FGAR',INFGAR)
CALL ERRLOG(371,'S:FFRCEL: Bank FGAR not found')
CALL UCOPY(RW(INFGAR+1),FGAR,21)
* Check the plane number. NB phi offset is hard-wired
* Wire number
* Wedge number from phi
* Allow for edge effects
* NB The format of FGAR is hard-coded here
* (x,y) -> drift (NB check stagger!)
* Wedge sign, and wedge -> wedge-pair
* Cell number
*