      PROGRAM LPOTT
C    tape1= piN phases,  tape2= g(p)'s  tape3= piN t's,  tape4=denom
C    tape5= run param    tape6=output   tape7=scratch    tape8=w.f. storage
C ** SEE R H LANDAU, PROGRAM LPOTT, 1981, modified for ridge/vax
c	helium  3 ff updated too
C      CALCULATION  OF  R-MATRIX  AND  T-MATRIX  BY  MATRIX INVERSION WI
C       POTENTIAL IN P SPACE FOR SPIN O AND 1/2, ANY ENERGY
C              ENERGY,MOMENTUM,MASS IN  MEV UNITS THROUGHOUT PROG
C     NIFTY(1)     =1,PIMINUS
C                  =0,PIPLUS
C                  =2, PI+,PI-(+FCOUL)
C                    N.B. SAME STRONG IF NIFT=2,DIFFERENT IF=3
C                  =3, CEX AFTER PI+,PI-(+FCOUL FOR +-)
C                  =4, PI 0 (FCOUL TURNED OFF AUTOMATICALLY)
C                  =5  , PROTONS
C                  =6 ,CEX WITH PI+ AND PI0
C                  =7,    K+
C                  =8,    K0
C                  =9,    NEUTRON
C                  =-1,    (K+,K0) CEX AFTER K+,K0
C                  =-2,    (P,N) CEX AFTER P,N
C     NIFTY(2)*5MEV=BINDING E(-5.*N(2) USED) FOR E3B
c     nifty(3)= 0, no w.f. in coord space
c               1. print out wf info on tape8
c               2: wf plus pi-nucleon t matrix
c               3:pi-nucleon tmatrix only
c               4: single scatt (when n(6)used else)
c               5:set t=r (nonunitarize) but with ms
c               6:double scattering for 1/2*1/2

c     nifty(4)= 0 sig=1, constant off-shell with on shell valus
c               1 nlsp form off shell
c               2 local laplacian form ,genrlzed to d $ f waves

c     nifty(5)= 0  use softh(k0)
c               1   sin(theat)
c               2   so(on shell),no angle tf
c               5  e3b energy
c               6  e3b energy with folded tmatrice
c               7   e3b with aay magic vector prescription for th
c               9  soth(ko), aay

c     nifty(6)=  0,  nospin flip and no calc of ds and ts (0 x 0)
c                1  % calculate r matrix up to and include ds
c                2 % calculate r matrix up to and include ts
c                3  % include spin flip terms (0 x 1/2)
c                4  no scatt (u=0) as check of wf
c                5  r matrix for only ss
c     nifty(7)  =0    no true absp, all 2-body partial waves
c               =1     no true absp, only s(l=0) pi-n waves
c               =2     no true absp,  only s&p(l=o,1) pi-n waves
c               =3   true absp (old)
c               =4   true absp(new,yoo-landau model)

c     nifty(8)  =0, no fold,no read in phases, use stored t
c               =1,  fold + stored t matrix, dont read in phases
c               =2,  read in phases, dont fold
c               =3,  read in phases, calc t matrix,fold these t s
c               =4 for k+, use martins analytic form
c               =5,  k+,martin s analytic, fold

c     nifty(9)  =0   reduced output
c               =1   full output
c               =2 reduced output,but including pauli

c     nifty(10) =0   no coulomb amplitude
c                1  coulomb amplitude and phase change included
c               =2 coulomb amplitude, but not phase change
c               =3 exact coulomb via matching in momentum space
c               =4 exact coul + realistic form factor
C     NIFTY(11)= UPWARDS SHIFT IN PI-(OR K+) SUBENERGY(PI-NUCLEON)
C          (12)                   PI+ (K0)
C          (13)                   PI-(OR K+) NUCLEUS CHANNEL ENERGY
C          (14)                   PI+(K0)  NUCLEUS  CHANNEL ENERGY
c     nifty(15) =0     divide out proton ff from he ff
c                1     dont divide out proton ff

c     nifty(16) =0: modified gaussian rho and rho**2 & for p* z=n  nucleus will
c                   also use t(spin)*rho(matter)
c               =1: wood saxon rho,..but gaussian rho**2
c               =2: wood saxon rho and rho**2
c               =3: special form for he or d (ignored if n(19) ne 0)
c               =4: he3..fnsp=fnmat,fpsp=0
c               =5: he3..fnsp=fnmat=fpmt, fpsp=0
c               =6: use fmatter*tspin for 0*.5 (non-gaussian nucleus)
c               =7: uspin=(tsp*fsp+tspn*fmt) for 0*.5

c      nifty(17)=0: kmt potential
c               =1: watson potential,no a/a-1
c     nifty(18) =0: dont turn off any 1/2*1/2 amps
c               =1: no e terms
c               =2: no a+b terms
c               =3: no e and no a+b terms
c      nifty(19)=0: nifty(16) controls ff's
c               =1: hadjimichael form factors - no Meson Exchange Currents
c               =2: hadjimichael form factors - WITH Meson Exchange Currents
c      nifty(20)=0: no output to tape10 (for010.dat for vax)
c               =1: theta, ds/dw, polar, and r (no r for he3) to tape10

c *** nsex =0-normal/ =1-1st time thru/ =2-2nd time thru/ =3 diff cex

