C   08/07/80 707221940  MEMBER NAME  ADJCIR   (TPSOURCE)    FORTRAN
      SUBROUTINE ADJCIR (IPATR,IND1,IND2)
C
C     M.NOZAKI  12-06-80  18:30
C
C      FIND NEAREST LOW ENERGY ELECTRON TRACK
C
      IMPLICIT INTEGER*2 (H)
#include "cdata.for"
C                            MAX. DISTANCE OF TWO CIRCLES (MM)
      DATA  DCMAX / 50. /
C                            MIN. CURVATURE
      DATA  CURV0 /2.5E-3/
C                            MIN. OF MIN.DISTANCE
      DATA  RMINC / 100. /
C
       IND2 = 0
C
       NTRK = IDATA(IPATR+2)
        IF(NTRK.LE.0) RETURN
       LTR = IDATA(IPATR+3)
       L0 = IDATA(IPATR+1) + IPATR
       L9 = L0 + LTR*(NTRK-1)
C
       IF(ABS(ADATA(IND1+25)).LT.CURV0) RETURN
       CALL PRTOCI (IND1,CURV1,RMIN1,EPS1,SIG1)
       IF(RMIN1.LT.RMINC) RETURN
       RAD1 = 1./CURV1*SIG1
       EPS1 = ADATA(IND1+21)
       XC1 = (RAD1+RMIN1)*COS(EPS1)
       YC1 = (RAD1+RMIN1)*SIN(EPS1)
       DCM = DCMAX
C
      DO 1010 IP = L0,L9,LTR
       IF(IP.EQ.IND1) GOTO 1010
       IF(ABS(ADATA(IP+25)).LT.CURV0) GOTO 1010
       CALL PRTOCI (IP,CURV2,RMIN2,EPS2,SIG2)
       IF(CURV2.GT.CURV1) GOTO 1010
       RAD2 = 1./CURV2*SIG2
       XC2 = (RAD2+RMIN2)*COS(EPS2)
       YC2 = (RAD2+RMIN2)*SIN(EPS2)
       DC = SQRT((XC1-XC2)**2+(YC1-YC2)**2)
       IF(DC.GT.DCM) GOTO 1010
       DCM = DC
       IND2 = IP
 1010 CONTINUE
C
      RETURN
      END
