]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HIJING/hijing1_36/jetini.F
Small modif to switch of gluon radiation and pT kick for triggered jets.
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / jetini.F
1 * $Id$
2 C
3 C
4 C
5 C
6 C
7         SUBROUTINE JETINI(JP,JT,I_TRIG)
8 C*******Initialize PYTHIA for jet production**********************
9 C       I_TRIG=0: for normal processes
10 C       I_TRIG=1: for triggered processes
11 C       JP: sequence number of the projectile
12 C       JT: sequence number of the target
13 C     For A+A collisions, one has to initilize pythia
14 C     separately for each type of collisions, pp, pn,np and nn,
15 C     or hp and hn for hA collisions. In this subroutine we use the following
16 C     catalogue for different type of collisions:
17 C     h+h: h+h (I_TYPE=1)
18 C     h+A: h+p (I_TYPE=1), h+n (I_TYPE=2)
19 C     A+h: p+h (I_TYPE=1), n+h (I_TYPE=2)
20 C     A+A: p+p (I_TYPE=1), p+n (I_TYPE=2), n+p (I_TYPE=3), n+n (I_TYPE=4)
21 C*****************************************************************
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"
29 C
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
39 C
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
61 c
62         IF(I_TRIG.NE.0) GO TO 160
63         IF(I_TRIG.EQ.I_LAST) GO TO 150
64         MSTP(2)=2
65 c                       ********second order running alpha_strong
66         MSTP(33)=1
67         PARP(31)=HIPR1(17)
68 C                       ********inclusion of K factor
69         MSTP(51)=3
70 C                       ********Duke-Owens set 1 structure functions
71         MSTP(61)=1
72 C                       ********INITIAL STATE RADIATION
73         MSTP(71)=1
74 C                       ********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
77         MSTP(91) = 1
78 c
79         MSTP(81)=0
80 C                       ******** NO MULTIPLE INTERACTION
81         MSTP(82)=1
82 C                       *******STRUCTURE OF MUTLIPLE INTERACTION
83         MSTP(111)=0
84 C               ********frag off(have to be done by local call)
85         IF(IHPR2(10).EQ.0) MSTP(122)=0
86 C               ********No printout of initialization information
87         PARP(81)=HIPR1(8)
88         CKIN(5)=HIPR1(8)
89         CKIN(3)=HIPR1(8)
90         CKIN(4)=HIPR1(9)
91         IF(HIPR1(9).LE.HIPR1(8)) CKIN(4)=-1.0
92         CKIN(9)=-10.0
93         CKIN(10)=10.0
94         MSEL=0
95         DO 100 ISUB=1,200
96            MSUB(ISUB)=0
97  100    CONTINUE
98         MSUB(11)=1
99         MSUB(12)=1
100         MSUB(13)=1
101         MSUB(28)=1
102         MSUB(53)=1
103         MSUB(68)=1
104         MSUB(81)=1
105         MSUB(82)=1
106         DO 110 J=1,MIN(8,MDCY(21,3))
107  110    MDME(MDCY(21,2)+J-1,1)=0
108         ISEL=4
109         IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
110         MDME(MDCY(21,2)+ISEL-1,1)=1
111 C                       ********QCD subprocesses
112         MSUB(14)=1
113         MSUB(18)=1
114         MSUB(29)=1
115 C                       ******* direct photon production
116  150    IF(INI(I_TYPE).NE.0) GO TO 800
117         GO TO 400
118 C
119 C       *****triggered subprocesses, jet, photon, heavy quark and DY
120 C
121  160    I_TYPE=4+I_TYPE
122         IF(I_TRIG.EQ.I_LAST) GO TO 260
123         PARP(81)=ABS(HIPR1(10))-0.25
124         CKIN(5)=ABS(HIPR1(10))-0.25
125         CKIN(3)=ABS(HIPR1(10))-0.25
126         CKIN(4)=ABS(HIPR1(10))+0.25
127         IF(HIPR1(10).LT.HIPR1(8)) CKIN(4)=-1.0
128 C       WRITE(6,*) "TRIGGERED", CKIN(3), CKIN(4), CKIN(5), IHPR2(3)
129 C
130 C ALICE
131 C
132         IF (HIPR1(50) .EQ. 1) THEN
133            MSTP(61) = 0
134            MSTP(71) = 0
135            MSTP(91) = 0
136         ENDIF
137
138 c
139         MSEL=0
140         DO 101 ISUB=1,200
141            MSUB(ISUB)=0
142  101    CONTINUE
143         IF(IHPR2(3).EQ.1) THEN
144            MSUB(11)=1
145            MSUB(12)=1
146            MSUB(13)=1
147            MSUB(28)=1
148            MSUB(53)=1
149            MSUB(68)=1
150            MSUB(81)=1
151            MSUB(82)=1
152            MSUB(14)=1
153            MSUB(18)=1
154            MSUB(29)=1
155            DO 102 J=1,MIN(8,MDCY(21,3))
156  102       MDME(MDCY(21,2)+J-1,1)=0
157            ISEL=4
158            IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
159            MDME(MDCY(21,2)+ISEL-1,1)=1
160 C                       ********QCD subprocesses
161         ELSE IF(IHPR2(3).EQ.2) THEN
162 C          WRITE(6,*) "DIRECT PHOTON PRODUCTION"
163            MSUB(14)=1
164            MSUB(18)=1
165            MSUB(29)=1
166 C               ********Direct photon production
167 c               q+qbar->g+gamma,q+qbar->gamma+gamma, q+g->q+gamma
168         ELSE IF(IHPR2(3).EQ.3) THEN
169            CKIN(3)=MAX(0.0,HIPR1(10))
170            CKIN(5)=HIPR1(8)
171            PARP(81)=HIPR1(8)
172            MSUB(81)=1
173            MSUB(82)=1
174            DO 105 J=1,MIN(8,MDCY(21,3))
175  105       MDME(MDCY(21,2)+J-1,1)=0
176            ISEL=4
177            IF(HINT1(1).GE.20.0 .and. IHPR2(18).EQ.1) ISEL=5
178            MDME(MDCY(21,2)+ISEL-1,1)=1
179 C             **********Heavy quark production
180         ENDIF
181 260     IF(INI(I_TYPE).NE.0) GO TO 800
182 C
183 C
184 400     INI(I_TYPE)=1
185         IF(IHPR2(10).EQ.0) MSTP(122)=0
186         IF(NFP(JP,4).EQ.2212) THEN
187                 BEAM='P'
188         ELSE IF(NFP(JP,4).EQ.-2212) THEN
189                 BEAM='P~'
190         ELSE IF(NFP(JP,4).EQ.2112) THEN
191                 BEAM='N'
192         ELSE IF(NFP(JP,4).EQ.-2112) THEN
193                 BEAM='N~'
194         ELSE IF(NFP(JP,4).EQ.211) THEN
195                 BEAM='PI+'
196         ELSE IF(NFP(JP,4).EQ.-211) THEN
197                 BEAM='PI-'
198         ELSE IF(NFP(JP,4).EQ.321) THEN
199                 BEAM='PI+'
200         ELSE IF(NFP(JP,4).EQ.-321) THEN
201                 BEAM='PI-'
202         ELSE
203                 WRITE(6,*) 'unavailable beam type', NFP(JP,4)
204         ENDIF
205         IF(NFT(JT,4).EQ.2212) THEN
206                 TARG='P'
207         ELSE IF(NFT(JT,4).EQ.-2212) THEN
208                 TARG='P~'
209         ELSE IF(NFT(JT,4).EQ.2112) THEN
210                 TARG='N'
211         ELSE IF(NFT(JT,4).EQ.-2112) THEN
212                 TARG='N~'
213         ELSE IF(NFT(JT,4).EQ.211) THEN
214                 TARG='PI+'
215         ELSE IF(NFT(JT,4).EQ.-211) THEN
216                 TARG='PI-'
217         ELSE IF(NFT(JT,4).EQ.321) THEN
218                 TARG='PI+'
219         ELSE IF(NFT(JT,4).EQ.-321) THEN
220                 TARG='PI-'
221         ELSE
222                 WRITE(6,*) 'unavailable target type', NFT(JT,4)
223         ENDIF
224 C
225         IHNT2(16)=1
226 C       ******************indicate for initialization use when
227 C                         structure functions are called in PYTHIA
228 C
229 C       WRITE(6,*) "CALL PYINIT WITH", CKIN(3), CKIN(4), MSTP(61), MSTP(71), MSTP(91)
230         CALL PYINIT_HIJING('CMS',BEAM,TARG,HINT1(1))
231         MINT4=MINT(44)
232         MINT5=MINT(45)
233         MINT44(I_TYPE)=MINT(44)
234         MINT45(I_TYPE)=MINT(45)
235         ATXS(0)=XSEC(0,1)
236         XSEC0(I_TYPE,0)=XSEC(0,1)
237         DO 500 I=1,200
238                 ATXS(I)=XSEC(I,1)
239                 XSEC0(I_TYPE,I)=XSEC(I,1)
240                 DO 500 J=1,20
241                         ATCO(I,J)=COEF(I,J)
242                         COEF0(I_TYPE,I,J)=COEF(I,J)
243 500     CONTINUE
244 C
245         IHNT2(16)=0
246 C
247         I_LAST=I_TRIG
248         RETURN
249 C               ********Store the initialization information for
250 C                               late use
251 C
252 C
253 800     MINT(44)=MINT44(I_TYPE)
254         MINT(45)=MINT45(I_TYPE)
255         MINT4=MINT(44)
256         MINT5=MINT(45)
257         XSEC(0,1)=XSEC0(I_TYPE,0)
258         ATXS(0)=XSEC(0,1)
259         DO 900 I=1,200
260                 XSEC(I,1)=XSEC0(I_TYPE,I)
261                 ATXS(I)=XSEC(I,1)
262         DO 900 J=1,20
263                 COEF(I,J)=COEF0(I_TYPE,I,J)
264                 ATCO(I,J)=COEF(I,J)
265 900     CONTINUE
266         I_LAST=I_TRIG
267         MINT(11)=NFP(JP,4)
268         MINT(12)=NFT(JT,4)
269         RETURN
270         END
271
272
273
274
275
276
277
278
279