*$ CREATE USRRNC.FOR
*COPY USRRNC
*
*=== Usrrnc ===========================================================*
*
      SUBROUTINE USRRNC ( IZ, IA, IS, X, Y, Z, MREG, WEE, ICALL )

      INCLUDE '(DBLPRC)'
      INCLUDE '(DIMPAR)'
      INCLUDE '(IOUNIT)'
*
*----------------------------------------------------------------------*
*                                                                      *
*     Copyright (C) 2005-2005      by    Alfredo Ferrari & Paola Sala  *
*     All Rights Reserved.                                             *
*                                                                      *
*                                                                      *
*     USeR Residual NuClei:                                            *
*                                                                      *
*     Created on   06 april 2005   by    Alfredo Ferrari & Paola Sala  *
*                                                   Infn - Milan       *
*                                                                      *
*     Last change on 06-apr-05     by    Alfredo Ferrari               *
*                                                                      *
*                                                                      *
*----------------------------------------------------------------------*
*
      LOGICAL LFIRST
      SAVE LFIRST
      DATA LFIRST /.TRUE./
      CHARACTER*8 MRGNAM, NRGNAM
      DOUBLE PRECISION FUNCTION TIM1O2 ( IA, IZ, KA, KZ, T12DAU,
     & BRDAUG,IDCAU,ISOMER ) 
      DIMENSION KA (4), KZ (4), BRDAUG (4), T12DAU (4), IDCAU (4)
      DOUBLE PRECISION HALFTIME
*
      IF (LFIRST) THEN
        WRITE(LUNOUT,*) 'Version juju usrrnc called'
        LFIRST = .FALSE.
        OPEN ( UNIT = 80, FILE = "recnucc", action='readwrite')
      ENDIF
      CALL GEOR2N ( MREG, MRGNAM, IERR1 )
      IF(IERR1 .NE. 0) STOP "Error in name conversion"
      IF(MRGNAM .EQ. "TARGET1" .AND. IZ/=1) THEN
	HALFTIME = TIM1O2 ( IA,IZ, KA, KZ,
     &  T12DAU, BRDAUG, ISOMER )
        WRITE(80,'(1P,9G25.15)') IZ, IA, IS, X, Y, Z, WEE, HALFTIME 
      ENDIF
      RETURN
*=== End of subroutine Usrrnc =========================================*
      END
