1 | SUBROUTINE TSTOUT
|
---|
2 |
|
---|
3 | C-----------------------------------------------------------------------
|
---|
4 | C T(O) ST(ACK) OUT
|
---|
5 | C
|
---|
6 | C MAKE REAL OUTPUT AFTER ONE INTERACTION HAS FINISHED
|
---|
7 | C ADDS PARTICLE TO STACK AND WRITES IT TO DISK IF NECESSARY
|
---|
8 | C THIS SUBROUTINE IS CALLED FORM MPPROP, PIGEN1, PIGEN2, AND TSTEND
|
---|
9 | C-----------------------------------------------------------------------
|
---|
10 |
|
---|
11 | IMPLICIT NONE
|
---|
12 | *KEEP,BUFFS.
|
---|
13 | COMMON /BUFFS/ RUNH,RUNE,EVTH,EVTE,DATAB,LH
|
---|
14 | INTEGER MAXBUF,MAXLEN
|
---|
15 | PARAMETER (MAXBUF=39*7)
|
---|
16 | PARAMETER (MAXLEN=12)
|
---|
17 | REAL RUNH(MAXBUF),EVTH(MAXBUF),EVTE(MAXBUF),
|
---|
18 | * RUNE(MAXBUF),DATAB(MAXBUF)
|
---|
19 | INTEGER LH
|
---|
20 | CHARACTER*4 CRUNH,CRUNE,CEVTH,CEVTE
|
---|
21 | EQUIVALENCE (RUNH(1),CRUNH), (RUNE(1),CRUNE)
|
---|
22 | EQUIVALENCE (EVTH(1),CEVTH), (EVTE(1),CEVTE)
|
---|
23 | *KEEP,ELABCT.
|
---|
24 | COMMON /ELABCT/ ELCUT
|
---|
25 | DOUBLE PRECISION ELCUT(4)
|
---|
26 | *KEEP,ETHMAP.
|
---|
27 | COMMON /ETHMAP/ ECTMAP,ELEFT
|
---|
28 | DOUBLE PRECISION ECTMAP,ELEFT
|
---|
29 | *KEEP,MUPART.
|
---|
30 | COMMON /MUPART/ AMUPAR,BCUT,CMUON,FMUBRM,FMUORG
|
---|
31 | DOUBLE PRECISION AMUPAR(14),BCUT,CMUON(11)
|
---|
32 | LOGICAL FMUBRM,FMUORG
|
---|
33 | *KEEP,PAM.
|
---|
34 | COMMON /PAM/ PAMA,SIGNUM
|
---|
35 | DOUBLE PRECISION PAMA(6000),SIGNUM(6000)
|
---|
36 | *KEEP,PARPAR.
|
---|
37 | COMMON /PARPAR/ CURPAR,SECPAR,PRMPAR,OUTPAR,C,
|
---|
38 | * E00,E00PN,PTOT0,PTOT0N,THICKH,ITYPE,LEVL
|
---|
39 | DOUBLE PRECISION CURPAR(14),SECPAR(14),PRMPAR(14),OUTPAR(14),
|
---|
40 | * C(50),E00,E00PN,PTOT0,PTOT0N,THICKH
|
---|
41 | INTEGER ITYPE,LEVL
|
---|
42 | *KEEP,PARPAE.
|
---|
43 | DOUBLE PRECISION GAMMA,COSTHE,PHI,H,T,X,Y,CHI,BETA,GCM,ECM
|
---|
44 | EQUIVALENCE (CURPAR(2),GAMMA), (CURPAR(3),COSTHE),
|
---|
45 | * (CURPAR(4), PHI ), (CURPAR(5), H ),
|
---|
46 | * (CURPAR(6), T ), (CURPAR(7), X ),
|
---|
47 | * (CURPAR(8), Y ), (CURPAR(9), CHI ),
|
---|
48 | * (CURPAR(10),BETA), (CURPAR(11),GCM ),
|
---|
49 | * (CURPAR(12),ECM )
|
---|
50 | *KEEP,RUNPAR.
|
---|
51 | COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
|
---|
52 | * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
|
---|
53 | * MONIOU,MDEBUG,NUCNUC,
|
---|
54 | * CETAPE,
|
---|
55 | * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
|
---|
56 | * N1STTR,MDBASE,
|
---|
57 | * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
|
---|
58 | * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
|
---|
59 | * ,GHEISH,GHESIG
|
---|
60 | COMMON /RUNPAC/ DSN,HOST,USER
|
---|
61 | DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
|
---|
62 | REAL STEPFC
|
---|
63 | INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
|
---|
64 | * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
|
---|
65 | * N1STTR,MDBASE
|
---|
66 | INTEGER CETAPE
|
---|
67 | CHARACTER*79 DSN
|
---|
68 | CHARACTER*20 HOST,USER
|
---|
69 |
|
---|
70 | LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
|
---|
71 | * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
|
---|
72 | * ,GHEISH,GHESIG
|
---|
73 | *KEEP,STACKF.
|
---|
74 | COMMON /STACKF/ STACK,STACKP,EXST,NSHIFT,NOUREC,ICOUNT,NTO,NFROM
|
---|
75 | INTEGER MAXSTK
|
---|
76 | PARAMETER (MAXSTK = 12*340*2)
|
---|
77 | DOUBLE PRECISION STACK(MAXSTK)
|
---|
78 | INTEGER STACKP,EXST,NSHIFT,NOUREC,ICOUNT,NTO,NFROM
|
---|
79 | *KEND.
|
---|
80 |
|
---|
81 | DOUBLE PRECISION GLCUT
|
---|
82 | INTEGER I,ISTK,J
|
---|
83 | DATA ISTK / MAXSTK /
|
---|
84 | C-----------------------------------------------------------------------
|
---|
85 |
|
---|
86 | IF ( DEBUG ) WRITE(MDEBUG,666) ICOUNT,(SECPAR(J),J=1,9)
|
---|
87 | 666 FORMAT(' TSTOUT:',I7,1X,1P,9E10.3)
|
---|
88 |
|
---|
89 | C CALCULATE APPROPRIATE KINETIC ENERGY CUT AND APPLY IT
|
---|
90 | IF ( SECPAR(1) .EQ. 5.D0 .OR. SECPAR(1) .EQ. 6.D0 ) THEN
|
---|
91 | C MUONS
|
---|
92 | GLCUT = ELCUT(2) / PAMA(NINT(SECPAR(1))) + 1.D0
|
---|
93 | ELSEIF ( SECPAR(1) .EQ. 2.D0 .OR. SECPAR(1) .EQ. 3.D0 ) THEN
|
---|
94 | C ELECTRONS
|
---|
95 | GLCUT = ELCUT(3) / PAMA(NINT(SECPAR(1))) + 1.D0
|
---|
96 | ELSEIF ( SECPAR(1) .EQ. 1.D0 ) THEN
|
---|
97 | C GAMMAS
|
---|
98 | GLCUT = ELCUT(4)
|
---|
99 | ELSEIF (SECPAR(1) .GE. 100.D0 ) THEN
|
---|
100 | C NUCLEI, CUTTED IF ENERGY/NUCLEON BELOW CUT
|
---|
101 | GLCUT = ELCUT(1) * INT(SECPAR(1)/100 )
|
---|
102 | * / PAMA(NINT(SECPAR(1))) + 1.D0
|
---|
103 | ELSE
|
---|
104 | C HADRONS
|
---|
105 | GLCUT = ELCUT(1) / PAMA(NINT(SECPAR(1))) + 1.D0
|
---|
106 | ENDIF
|
---|
107 | IF ( SECPAR(2) .LT. GLCUT ) THEN
|
---|
108 | IF ( SECPAR(1).EQ.5.D0 .OR. SECPAR(1).EQ.6.D0 ) FMUORG = .FALSE.
|
---|
109 | IF (DEBUG) WRITE(MDEBUG,*) 'TSTOUT: PARTICLE BELOW ',
|
---|
110 | * 'ENERGY CUT'
|
---|
111 | RETURN
|
---|
112 | ENDIF
|
---|
113 |
|
---|
114 | IF ( STACKP .GE. ISTK ) THEN
|
---|
115 | WRITE(EXST,REC=NOUREC+1) (STACK(I),I= 1,ISTK/2)
|
---|
116 | WRITE(EXST,REC=NOUREC+2) (STACK(I),I=ISTK/2+1,ISTK )
|
---|
117 | NOUREC = NOUREC + 2
|
---|
118 | NSHIFT = NSHIFT + 2
|
---|
119 | STACKP = 0
|
---|
120 | ENDIF
|
---|
121 |
|
---|
122 | NTO = NTO + 1
|
---|
123 | ICOUNT = ICOUNT + 1
|
---|
124 |
|
---|
125 | DO 2 J = 1,MAXLEN
|
---|
126 | STACK(STACKP+J) = SECPAR(J)
|
---|
127 | 2 CONTINUE
|
---|
128 | STACKP = STACKP + MAXLEN
|
---|
129 | IF ( SECPAR(1) .LE. 1.D0 ) THEN
|
---|
130 | ELEFT = ELEFT + SECPAR(2)
|
---|
131 | ELSE
|
---|
132 | ELEFT = ELEFT + SECPAR(2) * PAMA(NINT(SECPAR(1)))
|
---|
133 | ENDIF
|
---|
134 |
|
---|
135 | RETURN
|
---|
136 | END
|
---|