*$ 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:					       *
*     Argument list:						       *
*         IZ            : atomic number of the residual nucleus        *
*         IA            : mass number of the residual nucleus	       *
*         IS            : isomeric state of the residual nucleus       *
*         X, Y, Z       : particle position			       *
*         MREG          : number of the current region 		       *
*         WEE           : particle weight			       *
*         ICALL         : internal code calling flag		       *
*				(not for general use)                  *                         *
*                                                                      *
*     Created on   06 april 2005   by    Alfredo Ferrari & Paola Sala  *
*                                                   Infn - Milan       *
*     Last change on 17-sep-19     by    Enrico Mazza	               *
*                                                                      *
*                                                                      *
*----------------------------------------------------------------------*
*
      INCLUDE '(SCOHLP)' ! information on current estimator type
      INCLUDE '(TRACKR)' ! tracks information

      LOGICAL LFIRST
      DATA LFIRST / .TRUE. /
      SAVE LFIRST
      
      IF (IA .NE. ONEONE) THEN
       OPEN(99,FILE = 'fort.99',ACTION = 'WRITE', POSITION = 'APPEND')

* Activate with USERWEIGht WHAT(5)>1
         IF (LFIRST) THEN
            WRITE (99,*)
     &           '# 1.IZ  2.IA 3.IS 4.X  5.Y 6.Z 7.MREG   8.WEE 9.ICALL'
            LFIRST = .FALSE.
         END IF
         WRITE (99,*) !'(3(1X,I3),3(1X,F22.14),3(1X,I3))'
     &        IZ,IA,IS,X,Y,Z,MREG,WEE,ICALL
	CLOSE(99)
       END IF
      RETURN
*=== End of subroutine Usrrnc =========================================*
      END
