This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gcons / gspart.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:17  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.19  by  S.Giani
11 *-- Author :
12       SUBROUTINE GSPART(IPART,NAPART,ITRTYP,AMASS,CHARGE,TLIFE,
13      +            UBUF,NWBUF)
14 C.
15 C.    ******************************************************************
16 C.    *                                                                *
17 C.    *       Store particle parameters                                *
18 C.    *                                                                *
19 C.    *    ==>Called by : <USER>, GPART                                *
20 C.    *       Author    R.Brun  *********                              *
21 C.    *                                                                *
22 C.    ******************************************************************
23 C.
24 #include "geant321/gcbank.inc"
25 #include "geant321/gcnum.inc"
26 #include "geant321/gcmzfo.inc"
27 #include "geant321/gcunit.inc"
28       DIMENSION UBUF(1)
29       CHARACTER*(*) NAPART
30       CHARACTER*20 NAME
31 C.
32 C.    ------------------------------------------------------------------
33 C.
34       IF(IPART.LE.0)GO TO 99
35       IF(JPART.LE.0)THEN
36          CALL MZBOOK(IXCONS,JPART,JPART,1,'PART',NPART,NPART,0,3,0)
37          IQ(JPART-5)=0
38       ENDIF
39       IF(IPART.GT.NPART)THEN
40          CALL MZPUSH(IXCONS,JPART,IPART-NPART,0,'I')
41          NPART=IPART
42          JPA1=0
43       ELSE
44          JPA1=LQ(JPART-IPART)
45          IF(JPA1.GT.0) THEN
46             WRITE(CHMAIL,10000)
47             CALL GMAIL(1,0)
48             CALL GPPART(IPART)
49             CALL MZDROP(IXCONS,LQ(JPART-IPART),' ')
50          ENDIF
51       ENDIF
52       CALL MZBOOK(IXCONS,JPA,JPART,-IPART,'PART',2,2,NWBUF+9,IOPART,0)
53 C
54       NAME=NAPART
55       NCH=LNBLNK(NAME)
56       IF(NCH.GT.0)THEN
57          IF(NAME(NCH:NCH).EQ.'$')NAME(NCH:NCH)=' '
58       ENDIF
59       CALL UCTOH(NAME,IQ(JPA+1),4,20)
60 C
61       Q(JPA + 6) = ITRTYP
62       Q(JPA + 7) = AMASS
63       Q(JPA + 8) = CHARGE
64       Q(JPA + 9) = TLIFE
65       IF(NWBUF.GT.0)CALL UCOPY(UBUF,Q(JPA+10),NWBUF)
66 C
67       IF(JPA1.GT.0) THEN
68          CALL GPPART(-IPART)
69       ENDIF
70 C
71   99  RETURN
72 10000 FORMAT(' *** GSPART ***: Warning, particle redefinition:')
73       END