
      SUBROUTINE RHOOFR (R,RHOR,NFF)
C *** SEE R H LANDAU, PROGRAM LPOTT, 1981
C     RHOR(R) CALULATES UNNORMALIZED NUCLEAR DENSITY IN COORD SPACE
C     IF A LE 16 ,SHELL MODEL(GAUSSIAN) FORM IS USED
C     IF A GT 16, A GENERALIZED FERMI SHAPE IS USED
C          WITH ?C? =ACH, AND ?Z? = ACM
C     N.B. R IS IN MEV-1 AND W IS DIMENSIONLESS
C
      implicit real*8(a-h,o-z)
      real*8 k,kp,Mp,MN
      dimension rhor(4)
      common /sizes/ achp,acmp,wsp,achn,acmn,wsn
      common /params/   hbarc , pi , Mp , MN , nZ , nA , nes , nwaves
C
      RHL1P = ACHP/HBARC
      RHL1N = ACHN/HBARC
      RHL2P = ACMP/HBARC
      RHL2N = ACMN/HBARC
c
C     GENERALIZED WOOD SAXON
 30   RHOR(1) = 0.
      RHL = (R-RHL1P)/RHL2P
      IF (RHL.GT.150.) GO TO 40
      RHOR(1) = (1.+WSP*(R/RHL1P)**2)/(1.+EXP(RHL))
 40   IF (NFF.EQ.1) RETURN
      RHOR(2) = 0.
      RHOR(3) = 0.
      RHOR(4) = 0.
      RHL = (R-RHL1N)/RHL2N
      IF (RHL.GT.150.) RETURN
      RHOR(2) = (1.+WSN*(R/RHL1N)**2)/(1.+EXP(RHL))
      IF (NFF.EQ.2) RETURN
C     CALC OF FOUR TF OF RHO**2
      RETURN
      END
