]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HIJING/hijing1_36/jetini.F
This commit was generated by cvs2svn to compensate for changes in r1073,
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / jetini.F
CommitLineData
e74335a4 1* $Id$
2C
3C
4C
5C
6C
7 SUBROUTINE JETINI(JP,JT,I_TRIG)
8C*******Initialize PYTHIA for jet production**********************
9C I_TRIG=0: for normal processes
10C I_TRIG=1: for triggered processes
11C JP: sequence number of the projectile
12C JT: sequence number of the target
13C For A+A collisions, one has to initilize pythia
14C separately for each type of collisions, pp, pn,np and nn,
15C or hp and hn for hA collisions. In this subroutine we use the following
16C catalogue for different type of collisions:
17C h+h: h+h (I_TYPE=1)
18C h+A: h+p (I_TYPE=1), h+n (I_TYPE=2)
19C A+h: p+h (I_TYPE=1), n+h (I_TYPE=2)
20C A+A: p+p (I_TYPE=1), p+n (I_TYPE=2), n+p (I_TYPE=3), n+n (I_TYPE=4)
21C*****************************************************************
22 CHARACTER BEAM*16,TARG*16
23 DIMENSION XSEC0(8,0:200),COEF0(8,200,20),INI(8),
24 & MINT44(8),MINT45(8)
25#include "hijcrdn.inc"
26#include "hiparnt.inc"
27#include "histrng.inc"
28#include "hipyint.inc"
29C
30#include "ludat1_hijing.inc"
31#include "ludat3_hijing.inc"
32#include "pysubs_hijing.inc"
33#include "pypars_hijing.inc"
34#include "pyint1_hijing.inc"
35#include "pyint2_hijing.inc"
36#include "pyint5_hijing.inc"
37 DATA INI/8*0/I_LAST/-1/
38 SAVE
39C
40 IHNT2(11)=JP
41 IHNT2(12)=JT
42 IF(IHNT2(5).NE.0 .AND. IHNT2(6).NE.0) THEN
43 I_TYPE=1
44 ELSE IF(IHNT2(5).NE.0 .AND. IHNT2(6).EQ.0) THEN
45 I_TYPE=1
46 IF(NFT(JT,4).EQ.2112) I_TYPE=2
47 ELSE IF(IHNT2(5).EQ.0 .AND. IHNT2(6).NE.0) THEN
48 I_TYPE=1
49 IF(NFP(JP,4).EQ.2112) I_TYPE=2
50 ELSE
51 IF(NFP(JP,4).EQ.2212 .AND. NFT(JT,4).EQ.2212) THEN
52 I_TYPE=1
53 ELSE IF(NFP(JP,4).EQ.2212 .AND. NFT(JT,4).EQ.2112) THEN
54 I_TYPE=2
55 ELSE IF(NFP(JP,4).EQ.2112 .AND. NFT(JT,4).EQ.2212) THEN
56 I_TYPE=3
57 ELSE
58 I_TYPE=4
59 ENDIF
60 ENDIF
61c
62 IF(I_TRIG.NE.0) GO TO 160
63 IF(I_TRIG.EQ.I_LAST) GO TO 150
64 MSTP(2)=2
65c ********second order running alpha_strong
66 MSTP(33)=1
67 PARP(31)=HIPR1(17)
68C ********inclusion of K factor
69 MSTP(51)=3
70C ********Duke-Owens set 1 structure functions
71 MSTP(61)=1
72C ********INITIAL STATE RADIATION
73 MSTP(71)=1
74C ********FINAL STATE RADIATION
75 IF(IHPR2(2).EQ.0.OR.IHPR2(2).EQ.2) MSTP(61)=0
76 IF(IHPR2(2).EQ.0.OR.IHPR2(2).EQ.1) MSTP(71)=0
77c
78 MSTP(81)=0
79C ******** NO MULTIPLE INTERACTION
80 MSTP(82)=1
81C *******STRUCTURE OF MUTLIPLE INTERACTION
82 MSTP(111)=0
83C ********frag off(have to be done by local call)
84 IF(IHPR2(10).EQ.0) MSTP(122)=0
85C ********No printout of initialization information
86 PARP(81)=HIPR1(8)
87 CKIN(5)=HIPR1(8)
88 CKIN(3)=HIPR1(8)
89 CKIN(4)=HIPR1(9)
90 IF(HIPR1(9).LE.HIPR1(8)) CKIN(4)=-1.0
91 CKIN(9)=-10.0
92 CKIN(10)=10.0
93 MSEL=0
94 DO 100 ISUB=1,200
95 MSUB(ISUB)=0
96 100 CONTINUE
97 MSUB(11)=1
98 MSUB(12)=1
99 MSUB(13)=1
100 MSUB(28)=1
101 MSUB(53)=1
102 MSUB(68)=1
103 MSUB(81)=1
104 MSUB(82)=1
105 DO 110 J=1,MIN(8,MDCY(21,3))
106 110 MDME(MDCY(21,2)+J-1,1)=0
107 ISEL=4
108 IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
109 MDME(MDCY(21,2)+ISEL-1,1)=1
110C ********QCD subprocesses
111 MSUB(14)=1
112 MSUB(18)=1
113 MSUB(29)=1
114C ******* direct photon production
115 150 IF(INI(I_TYPE).NE.0) GO TO 800
116 GO TO 400
117C
118C *****triggered subprocesses, jet, photon, heavy quark and DY
119C
120 160 I_TYPE=4+I_TYPE
121 IF(I_TRIG.EQ.I_LAST) GO TO 260
122 PARP(81)=ABS(HIPR1(10))-0.25
123 CKIN(5)=ABS(HIPR1(10))-0.25
124 CKIN(3)=ABS(HIPR1(10))-0.25
125 CKIN(4)=ABS(HIPR1(10))+0.25
126 IF(HIPR1(10).LT.HIPR1(8)) CKIN(4)=-1.0
127c
128 MSEL=0
129 DO 101 ISUB=1,200
130 MSUB(ISUB)=0
131 101 CONTINUE
132 IF(IHPR2(3).EQ.1) THEN
133 MSUB(11)=1
134 MSUB(12)=1
135 MSUB(13)=1
136 MSUB(28)=1
137 MSUB(53)=1
138 MSUB(68)=1
139 MSUB(81)=1
140 MSUB(82)=1
141 MSUB(14)=1
142 MSUB(18)=1
143 MSUB(29)=1
144 DO 102 J=1,MIN(8,MDCY(21,3))
145 102 MDME(MDCY(21,2)+J-1,1)=0
146 ISEL=4
147 IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
148 MDME(MDCY(21,2)+ISEL-1,1)=1
149C ********QCD subprocesses
150 ELSE IF(IHPR2(3).EQ.2) THEN
151 MSUB(14)=1
152 MSUB(18)=1
153 MSUB(29)=1
154C ********Direct photon production
155c q+qbar->g+gamma,q+qbar->gamma+gamma, q+g->q+gamma
156 ELSE IF(IHPR2(3).EQ.3) THEN
157 CKIN(3)=MAX(0.0,HIPR1(10))
158 CKIN(5)=HIPR1(8)
159 PARP(81)=HIPR1(8)
160 MSUB(81)=1
161 MSUB(82)=1
162 DO 105 J=1,MIN(8,MDCY(21,3))
163 105 MDME(MDCY(21,2)+J-1,1)=0
164 ISEL=4
165 IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
166 MDME(MDCY(21,2)+ISEL-1,1)=1
167C **********Heavy quark production
168 ENDIF
169260 IF(INI(I_TYPE).NE.0) GO TO 800
170C
171C
172400 INI(I_TYPE)=1
173 IF(IHPR2(10).EQ.0) MSTP(122)=0
174 IF(NFP(JP,4).EQ.2212) THEN
175 BEAM='P'
176 ELSE IF(NFP(JP,4).EQ.-2212) THEN
177 BEAM='P~'
178 ELSE IF(NFP(JP,4).EQ.2112) THEN
179 BEAM='N'
180 ELSE IF(NFP(JP,4).EQ.-2112) THEN
181 BEAM='N~'
182 ELSE IF(NFP(JP,4).EQ.211) THEN
183 BEAM='PI+'
184 ELSE IF(NFP(JP,4).EQ.-211) THEN
185 BEAM='PI-'
186 ELSE IF(NFP(JP,4).EQ.321) THEN
187 BEAM='PI+'
188 ELSE IF(NFP(JP,4).EQ.-321) THEN
189 BEAM='PI-'
190 ELSE
191 WRITE(6,*) 'unavailable beam type', NFP(JP,4)
192 ENDIF
193 IF(NFT(JT,4).EQ.2212) THEN
194 TARG='P'
195 ELSE IF(NFT(JT,4).EQ.-2212) THEN
196 TARG='P~'
197 ELSE IF(NFT(JT,4).EQ.2112) THEN
198 TARG='N'
199 ELSE IF(NFT(JT,4).EQ.-2112) THEN
200 TARG='N~'
201 ELSE IF(NFT(JT,4).EQ.211) THEN
202 TARG='PI+'
203 ELSE IF(NFT(JT,4).EQ.-211) THEN
204 TARG='PI-'
205 ELSE IF(NFT(JT,4).EQ.321) THEN
206 TARG='PI+'
207 ELSE IF(NFT(JT,4).EQ.-321) THEN
208 TARG='PI-'
209 ELSE
210 WRITE(6,*) 'unavailable target type', NFT(JT,4)
211 ENDIF
212C
213 IHNT2(16)=1
214C ******************indicate for initialization use when
215C structure functions are called in PYTHIA
216C
217 CALL PYINIT_HIJING('CMS',BEAM,TARG,HINT1(1))
218 MINT4=MINT(44)
219 MINT5=MINT(45)
220 MINT44(I_TYPE)=MINT(44)
221 MINT45(I_TYPE)=MINT(45)
222 ATXS(0)=XSEC(0,1)
223 XSEC0(I_TYPE,0)=XSEC(0,1)
224 DO 500 I=1,200
225 ATXS(I)=XSEC(I,1)
226 XSEC0(I_TYPE,I)=XSEC(I,1)
227 DO 500 J=1,20
228 ATCO(I,J)=COEF(I,J)
229 COEF0(I_TYPE,I,J)=COEF(I,J)
230500 CONTINUE
231C
232 IHNT2(16)=0
233C
234 RETURN
235C ********Store the initialization information for
236C late use
237C
238C
239800 MINT(44)=MINT44(I_TYPE)
240 MINT(45)=MINT45(I_TYPE)
241 MINT4=MINT(44)
242 MINT5=MINT(45)
243 XSEC(0,1)=XSEC0(I_TYPE,0)
244 ATXS(0)=XSEC(0,1)
245 DO 900 I=1,200
246 XSEC(I,1)=XSEC0(I_TYPE,I)
247 ATXS(I)=XSEC(I,1)
248 DO 900 J=1,20
249 COEF(I,J)=COEF0(I_TYPE,I,J)
250 ATCO(I,J)=COEF(I,J)
251900 CONTINUE
252 I_LAST=I_TRIG
253 MINT(11)=NFP(JP,4)
254 MINT(12)=NFT(JT,4)
255 RETURN
256 END