]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA/pythia/pyinpr.F
Do not save CVS subdirectories
[u/mrichter/AliRoot.git] / PYTHIA / pythia / pyinpr.F
1  
2 C*********************************************************************
3  
4       SUBROUTINE PYINPR
5  
6 C...Selects partonic subprocesses to be included in the simulation.
7       COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
8       COMMON/LUDAT3/MDCY(500,3),MDME(2000,2),BRAT(2000),KFDP(2000,5)
9       COMMON/PYSUBS/MSEL,MSUB(200),KFIN(2,-40:40),CKIN(200)
10       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
11       COMMON/PYINT1/MINT(400),VINT(400)
12       COMMON/PYINT2/ISET(200),KFPR(200,2),COEF(200,20),ICOL(40,4,2)
13       SAVE /LUDAT1/,/LUDAT3/
14       SAVE /PYSUBS/,/PYPARS/,/PYINT1/,/PYINT2/
15  
16 C...Reset processes to be included.
17       IF(MSEL.NE.0) THEN
18         DO 100 I=1,200
19         MSUB(I)=0
20   100   CONTINUE
21       ENDIF
22  
23 C...For e-gamma witn MSTP(14)=10 allow mixture of VMD and anomalous.
24       IF(MINT(121).EQ.2) THEN
25         MSUB(10)=1
26         MINT(123)=MINT(122)+1
27  
28 C...For gamma-p or gamma-gamma with MSTP(14)=10 allow mixture.
29 C...Here also set a few parameters otherwise normally not touched.
30       ELSEIF(MINT(121).GT.1) THEN
31  
32 C...Structure functions dampened at small Q2; go to low energies,
33 C...alpha_s <1; no minimum pT cut-off a priori.
34         MSTP(57)=3
35         MSTP(85)=0
36         PARP(2)=2.
37         PARU(115)=1.
38         CKIN(5)=0.2
39         CKIN(6)=0.2
40  
41 C...Define pT cut-off parameters and whether run involves low-pT.
42         IF(MSTP(82).LE.1) THEN
43           PTMVMD=1.30+0.15*LOG(VINT(1)/200.)/LOG(900./200.)
44         ELSE
45           PTMVMD=1.25+0.15*LOG(VINT(1)/200.)/LOG(900./200.)
46         ENDIF
47         PTMDIR=PARP(15)
48         PTMANO=PTMVMD
49         IF(MSTP(15).EQ.5) PTMANO=0.70+0.17*LOG(1.+0.05*VINT(1))**2
50         IPTL=1
51         IF(VINT(285).GT.MAX(PTMVMD,PTMDIR,PTMANO)) IPTL=0
52         IF(MSEL.EQ.2) IPTL=1
53  
54 C...Set up for p/VMD * VMD.
55         IF(MINT(122).EQ.1) THEN
56           MINT(123)=2
57           MSUB(11)=1
58           MSUB(12)=1
59           MSUB(13)=1
60           MSUB(28)=1
61           MSUB(53)=1
62           MSUB(68)=1
63           IF(IPTL.EQ.1) MSUB(95)=1
64           IF(MSEL.EQ.2) THEN
65             MSUB(91)=1
66             MSUB(92)=1
67             MSUB(93)=1
68             MSUB(94)=1
69           ENDIF
70           PARP(81)=PTMVMD
71           PARP(82)=PTMVMD
72           IF(IPTL.EQ.1) CKIN(3)=0.
73  
74 C...Set up for p/VMD * direct gamma.
75         ELSEIF(MINT(122).EQ.2) THEN
76           MINT(123)=0
77           IF(MINT(121).EQ.6) MINT(123)=5
78           MSUB(33)=1
79           MSUB(54)=1
80           IF(IPTL.EQ.1) CKIN(3)=PTMDIR
81  
82 C...Set up for p/VMD * anomalous gamma.
83         ELSEIF(MINT(122).EQ.3) THEN
84           MINT(123)=3
85           IF(MINT(121).EQ.6) MINT(123)=7
86           MSUB(11)=1
87           MSUB(12)=1
88           MSUB(13)=1
89           MSUB(28)=1
90           MSUB(53)=1
91           MSUB(68)=1
92           IF(MSTP(82).GE.2) MSTP(85)=1
93           IF(IPTL.EQ.1) CKIN(3)=PTMANO
94  
95 C...Set up for direct * direct gamma (switch off leptons).
96         ELSEIF(MINT(122).EQ.4) THEN
97           MINT(123)=0
98           MSUB(58)=1
99           DO 110 II=MDCY(22,2),MDCY(22,2)+MDCY(22,3)-1
100           IF(IABS(KFDP(II,1)).GE.10) MDME(II,1)=MIN(0,MDME(II,1))
101   110     CONTINUE
102           IF(IPTL.EQ.1) CKIN(3)=PTMDIR
103  
104 C...Set up for direct * anomalous gamma.
105         ELSEIF(MINT(122).EQ.5) THEN
106           MINT(123)=6
107           MSUB(33)=1
108           MSUB(54)=1
109           IF(IPTL.EQ.1) CKIN(3)=PTMANO
110  
111 C...Set up for anomalous * anomalous gamma.
112         ELSEIF(MINT(122).EQ.6) THEN
113           MINT(123)=3
114           MSUB(11)=1
115           MSUB(12)=1
116           MSUB(13)=1
117           MSUB(28)=1
118           MSUB(53)=1
119           MSUB(68)=1
120           IF(MSTP(82).GE.2) MSTP(85)=1
121           IF(IPTL.EQ.1) CKIN(3)=PTMANO
122         ENDIF
123  
124 C...End of special set up for gamma-p and gamma-gamma.
125         CKIN(1)=2.*CKIN(3)
126       ENDIF
127  
128 C...Flavour information for individual beams.
129       DO 120 I=1,2
130       MINT(40+I)=1
131       IF(MINT(123).GE.1.AND.MINT(10+I).EQ.22) MINT(40+I)=2
132       IF(IABS(MINT(10+I)).GT.100) MINT(40+I)=2
133       IF(MINT(10+I).EQ.28.OR.MINT(10+I).EQ.29) MINT(40+I)=2
134       MINT(44+I)=MINT(40+I)
135       IF(MSTP(11).GE.1.AND.IABS(MINT(10+I)).EQ.11) MINT(44+I)=3
136   120 CONTINUE
137  
138 C...If two gammas, whereof one direct, pick the first.
139       IF(MINT(11).EQ.22.AND.MINT(12).EQ.22) THEN
140         IF(MINT(123).GE.4.AND.MINT(123).LE.6) THEN
141           MINT(41)=1
142           MINT(45)=1
143         ENDIF
144       ELSEIF(MINT(11).EQ.22.OR.MINT(12).EQ.22) THEN
145         IF(MINT(123).GE.4) CALL LUERRM(26,
146      &  '(PYINPR:) unallowed MSTP(14) code for single photon')
147       ENDIF
148  
149 C...Flavour information on combination of incoming particles.
150       MINT(43)=2*MINT(41)+MINT(42)-2
151       MINT(44)=MINT(43)
152       IF(MINT(123).LE.0) THEN
153         IF(MINT(11).EQ.22) MINT(43)=MINT(43)+2
154         IF(MINT(12).EQ.22) MINT(43)=MINT(43)+1
155       ELSEIF(MINT(123).LE.3) THEN
156         IF(MINT(11).EQ.22) MINT(44)=MINT(44)-2
157         IF(MINT(12).EQ.22) MINT(44)=MINT(44)-1
158       ELSEIF(MINT(11).EQ.22.AND.MINT(12).EQ.22) THEN
159         MINT(43)=4
160         MINT(44)=1
161       ENDIF
162       MINT(47)=2*MIN(2,MINT(45))+MIN(2,MINT(46))-2
163       IF(MIN(MINT(45),MINT(46)).EQ.3) MINT(47)=5
164       MINT(50)=0
165       IF(MINT(41).EQ.2.AND.MINT(42).EQ.2) MINT(50)=1
166       IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.MINT(123).GE.3)
167      &MINT(50)=0
168       MINT(107)=0
169       IF(MINT(11).EQ.22) THEN
170         MINT(107)=MINT(123)
171         IF(MINT(123).GE.4) MINT(107)=0
172         IF(MINT(123).EQ.7) MINT(107)=2
173       ENDIF
174       MINT(108)=0
175       IF(MINT(12).EQ.22) THEN
176         MINT(108)=MINT(123)
177         IF(MINT(123).GE.4) MINT(108)=MINT(123)-3
178         IF(MINT(123).EQ.7) MINT(108)=3
179       ENDIF
180  
181 C...Select default processes according to incoming beams
182 C...(already done for gamma-p and gamma-gamma with MSTP(14)=10).
183       IF(MINT(121).GT.1) THEN
184       ELSEIF(MSEL.EQ.1.OR.MSEL.EQ.2) THEN
185  
186         IF(MINT(43).EQ.1) THEN
187 C...Lepton + lepton -> gamma/Z0 or W.
188           IF(MINT(11)+MINT(12).EQ.0) MSUB(1)=1
189           IF(MINT(11)+MINT(12).NE.0) MSUB(2)=1
190  
191         ELSEIF(MINT(43).LE.3.AND.MINT(123).EQ.0.AND.
192      &  (MINT(11).EQ.22.OR.MINT(12).EQ.22)) THEN
193 C...Unresolved photon + lepton: Compton scattering.
194           MSUB(34)=1
195  
196         ELSEIF(MINT(43).LE.3) THEN
197 C...Lepton + hadron: deep inelastic scattering.
198           MSUB(10)=1
199  
200         ELSEIF(MINT(123).EQ.0.AND.MINT(11).EQ.22.AND.
201      &  MINT(12).EQ.22) THEN
202 C...Two unresolved photons: fermion pair production.
203           MSUB(58)=1
204  
205         ELSEIF((MINT(123).EQ.0.AND.(MINT(11).EQ.22.OR.MINT(12).EQ.22))
206      &  .OR.(MINT(123).GE.4.AND.MINT(123).LE.6.AND.MINT(11).EQ.22.AND.
207      &   MINT(12).EQ.22)) THEN
208 C...Unresolved photon + hadron: photon-parton scattering.
209           MSUB(33)=1
210           MSUB(34)=1
211           MSUB(54)=1
212  
213         ELSEIF(MSEL.EQ.1) THEN
214 C...High-pT QCD processes:
215           MSUB(11)=1
216           MSUB(12)=1
217           MSUB(13)=1
218           MSUB(28)=1
219           MSUB(53)=1
220           MSUB(68)=1
221           IF(MSTP(82).LE.1.AND.CKIN(3).LT.PARP(81)) MSUB(95)=1
222           IF(MSTP(82).GE.2.AND.CKIN(3).LT.PARP(82)) MSUB(95)=1
223           IF(MSUB(95).EQ.1.AND.MINT(50).EQ.0) MSUB(95)=0
224  
225         ELSE
226 C...All QCD processes:
227           MSUB(11)=1
228           MSUB(12)=1
229           MSUB(13)=1
230           MSUB(28)=1
231           MSUB(53)=1
232           MSUB(68)=1
233           MSUB(91)=1
234           MSUB(92)=1
235           MSUB(93)=1
236           MSUB(94)=1
237           MSUB(95)=1
238         ENDIF
239  
240       ELSEIF(MSEL.GE.4.AND.MSEL.LE.8) THEN
241 C...Heavy quark production.
242         MSUB(81)=1
243         MSUB(82)=1
244         MSUB(84)=1
245         DO 130 J=1,MIN(8,MDCY(21,3))
246         MDME(MDCY(21,2)+J-1,1)=0
247   130   CONTINUE
248         MDME(MDCY(21,2)+MSEL-1,1)=1
249         MSUB(85)=1
250         DO 140 J=1,MIN(12,MDCY(22,3))
251         MDME(MDCY(22,2)+J-1,1)=0
252   140   CONTINUE
253         MDME(MDCY(22,2)+MSEL-1,1)=1
254  
255       ELSEIF(MSEL.EQ.10) THEN
256 C...Prompt photon production:
257         MSUB(14)=1
258         MSUB(18)=1
259         MSUB(29)=1
260  
261       ELSEIF(MSEL.EQ.11) THEN
262 C...Z0/gamma* production:
263         MSUB(1)=1
264  
265       ELSEIF(MSEL.EQ.12) THEN
266 C...W+/- production:
267         MSUB(2)=1
268  
269       ELSEIF(MSEL.EQ.13) THEN
270 C...Z0 + jet:
271         MSUB(15)=1
272         MSUB(30)=1
273  
274       ELSEIF(MSEL.EQ.14) THEN
275 C...W+/- + jet:
276         MSUB(16)=1
277         MSUB(31)=1
278  
279       ELSEIF(MSEL.EQ.15) THEN
280 C...Z0 & W+/- pair production:
281         MSUB(19)=1
282         MSUB(20)=1
283         MSUB(22)=1
284         MSUB(23)=1
285         MSUB(25)=1
286  
287       ELSEIF(MSEL.EQ.16) THEN
288 C...H0 production:
289         MSUB(3)=1
290         MSUB(102)=1
291         MSUB(103)=1
292         MSUB(123)=1
293         MSUB(124)=1
294  
295       ELSEIF(MSEL.EQ.17) THEN
296 C...H0 & Z0 or W+/- pair production:
297         MSUB(24)=1
298         MSUB(26)=1
299  
300       ELSEIF(MSEL.EQ.18) THEN
301 C...H0 production; interesting processes in e+e-.
302         MSUB(24)=1
303         MSUB(103)=1
304         MSUB(123)=1
305         MSUB(124)=1
306  
307       ELSEIF(MSEL.EQ.19) THEN
308 C...H0, H'0 and A0 production; interesting processes in e+e-.
309         MSUB(24)=1
310         MSUB(103)=1
311         MSUB(123)=1
312         MSUB(124)=1
313         MSUB(153)=1
314         MSUB(171)=1
315         MSUB(173)=1
316         MSUB(174)=1
317         MSUB(158)=1
318         MSUB(176)=1
319         MSUB(178)=1
320         MSUB(179)=1
321  
322       ELSEIF(MSEL.EQ.21) THEN
323 C...Z'0 production:
324         MSUB(141)=1
325  
326       ELSEIF(MSEL.EQ.22) THEN
327 C...W'+/- production:
328         MSUB(142)=1
329  
330       ELSEIF(MSEL.EQ.23) THEN
331 C...H+/- production:
332         MSUB(143)=1
333  
334       ELSEIF(MSEL.EQ.24) THEN
335 C...R production:
336         MSUB(144)=1
337  
338       ELSEIF(MSEL.EQ.25) THEN
339 C...LQ (leptoquark) production.
340         MSUB(145)=1
341         MSUB(162)=1
342         MSUB(163)=1
343         MSUB(164)=1
344  
345       ELSEIF(MSEL.GE.35.AND.MSEL.LE.38) THEN
346 C...Production of one heavy quark (W exchange):
347         MSUB(83)=1
348         DO 150 J=1,MIN(8,MDCY(21,3))
349         MDME(MDCY(21,2)+J-1,1)=0
350   150   CONTINUE
351         MDME(MDCY(21,2)+MSEL-31,1)=1
352       ENDIF
353  
354 C...Find heaviest new quark flavour allowed in processes 81-84.
355       KFLQM=1
356       DO 160 I=1,MIN(8,MDCY(21,3))
357       IDC=I+MDCY(21,2)-1
358       IF(MDME(IDC,1).LE.0) GOTO 160
359       KFLQM=I
360   160 CONTINUE
361       IF(MSTP(7).GE.1.AND.MSTP(7).LE.8.AND.(MSEL.LE.3.OR.MSEL.GE.9))
362      &KFLQM=MSTP(7)
363       MINT(55)=KFLQM
364       KFPR(81,1)=KFLQM
365       KFPR(81,2)=KFLQM
366       KFPR(82,1)=KFLQM
367       KFPR(82,2)=KFLQM
368       KFPR(83,1)=KFLQM
369       KFPR(84,1)=KFLQM
370       KFPR(84,2)=KFLQM
371  
372 C...Find heaviest new fermion flavour allowed in process 85.
373       KFLFM=1
374       DO 170 I=1,MIN(12,MDCY(22,3))
375       IDC=I+MDCY(22,2)-1
376       IF(MDME(IDC,1).LE.0) GOTO 170
377       KFLFM=KFDP(IDC,1)
378   170 CONTINUE
379       IF(((MSTP(7).GE.1.AND.MSTP(7).LE.8).OR.(MSTP(7).GE.11.AND.
380      &MSTP(7).LE.18)).AND.(MSEL.LE.3.OR.MSEL.GE.9)) KFLFM=MSTP(7)
381       MINT(56)=KFLFM
382       KFPR(85,1)=KFLFM
383       KFPR(85,2)=KFLFM
384  
385       RETURN
386       END