4 SUBROUTINE pyhiinki(CHFRAM,CHBEAM,CHTARG,WIN)
8 common/lujets/
n,
k(9000,5),
p(9000,5),
v(9000,5)
10 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
12 common/pyhisubs/msel,msub(200),kfin(2,-40:40),ckin(200)
18 CHARACTER chfram*8,chbeam*8,chtarg*8,chcom(3)*8,chalp(2)*26,
19 &chidnt(3)*8,chtemp*8,chcde(18)*8,chinit*76
20 dimension len(3),kcde(18)
21 DATA chalp/
'abcdefghijklmnopqrstuvwxyz',
22 &
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
23 DATA chcde/
'e- ',
'e+ ',
'nue ',
'nue~ ',
24 &
'mu- ',
'mu+ ',
'numu ',
'numu~ ',
'tau- ',
25 &
'tau+ ',
'nutau ',
'nutau~ ',
'pi+ ',
'pi- ',
26 &
'n ',
'n~ ',
'p ',
'p~ '/
27 DATA kcde/11,-11,12,-12,13,-13,14,-14,15,-15,16,-16,
28 &211,-211,2112,-2112,2212,-2212/
37 IF(len(
i).EQ.ll.AND.chcom(
i)(ll:ll).EQ.
' ') len(
i)=ll-1
39 100
IF(chcom(
i)(ll:ll).EQ.chalp(2)(la:la)) chcom(
i)(ll:ll)=
43 IF(chidnt(
i)(ll:ll+2).EQ.
'bar')
THEN
45 chidnt(
i)=chtemp(1:ll-1)//
'~'//chtemp(ll+3:8)//
' '
49 IF(chidnt(
i)(ll:ll).EQ.
'_')
THEN
51 chidnt(
i)=chtemp(1:ll-1)//chtemp(ll+1:8)//
' '
60 130
IF(chidnt(
i+1).EQ.chcde(
j))
k(
i,2)=kcde(
j)
63 IF(iabs(
k(
i,2)).GT.100)
mint(40+
i)=2
66 IF(
k(1,2).EQ.0)
WRITE(mstu(11),1000) chbeam(1:len(2))
67 IF(
k(2,2).EQ.0)
WRITE(mstu(11),1100) chtarg(1:len(3))
68 IF(
k(1,2).EQ.0.OR.
k(2,2).EQ.0)
stop
74 IF(chcom(1)(1:2).EQ.
'cm')
THEN
75 IF(chcom(2)(1:1).NE.
'e')
THEN
76 loffs=(34-(len(2)+len(3)))/2
77 chinit(loffs+1:76)=
'PYTHIA will be initialized for a '//
78 & chcom(2)(1:len(2))//
'-'//chcom(3)(1:len(3))//
' collider'//
' '
80 loffs=(33-(len(2)+len(3)))/2
81 chinit(loffs+1:76)=
'PYTHIA will be initialized for an '//
82 & chcom(2)(1:len(2))//
'-'//chcom(3)(1:len(3))//
' collider'//
' '
91 p(1,3)=sqrt(((
s-
p(1,5)**2-
p(2,5)**2)**2-(2.*
p(1,5)*
p(2,5))**2)/
94 p(1,4)=sqrt(
p(1,3)**2+
p(1,5)**2)
95 p(2,4)=sqrt(
p(2,3)**2+
p(2,5)**2)
98 ELSEIF(chcom(1)(1:3).EQ.
'fix')
THEN
99 loffs=(29-(len(2)+len(3)))/2
100 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
101 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
102 &
' fixed target'//
' '
110 p(1,4)=sqrt(
p(1,3)**2+
p(1,5)**2)
113 s=
p(1,5)**2+
p(2,5)**2+2.*
p(2,4)*
p(1,4)
114 vint(10)=
p(1,3)/(
p(1,4)+
p(2,4))
119 ELSEIF(chcom(1)(1:3).EQ.
'use')
THEN
120 loffs=(13-(len(1)+len(2)))/2
121 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
122 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
123 &
'user-specified configuration'//
' '
128 p(1,4)=sqrt(
p(1,1)**2+
p(1,2)**2+
p(1,3)**2+
p(1,5)**2)
129 p(2,4)=sqrt(
p(2,1)**2+
p(2,2)**2+
p(2,3)**2+
p(2,5)**2)
131 160
vint(7+
j)=(dble(
p(1,
j))+dble(
p(2,
j)))/dble(
p(1,4)+
p(2,4))
137 s=
p(1,5)**2+
p(2,5)**2+2.*(
p(1,4)*
p(2,4)-
p(1,3)*
p(2,3))
142 WRITE(mstu(11),1800) chfram(1:len(1))
145 IF(
s.LT.
parp(2)**2)
THEN
146 WRITE(mstu(11),1900) sqrt(
s)
165 1000
FORMAT(1
x,
'Error: unrecognized beam particle ''',a,
'''.'/
166 &1
x,
'Execution stopped!')
167 1100
FORMAT(1
x,
'Error: unrecognized target particle ''',a,
'''.'/
168 &1
x,
'Execution stopped!')
169 1200
FORMAT(/1
x,78(
'=')/1
x,
'I',76
x,
'I'/1
x,
'I',a76,
'I')
170 1300
FORMAT(1
x,
'I',18
x,
'at',1
x,f10.3,1
x,
'GeV center-of-mass energy',
171 &19
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
172 1400
FORMAT(1
x,
'I',22
x,
'at',1
x,f10.3,1
x,
'GeV/c lab-momentum',22
x,
'I')
173 1500
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',11
x,
'corresponding to',1
x,f10.3,1
x,
174 &
'GeV center-of-mass energy',12
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
175 1600
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',24
x,
'px (GeV/c)',3
x,
'py (GeV/c)',3
x,
176 &
'pz (GeV/c)',16
x,
'I')
177 1700
FORMAT(1
x,
'I',15
x,a8,3(2
x,f10.3,1
x),15
x,
'I')
178 1800
FORMAT(1
x,
'Error: unrecognized coordinate frame ''',a,
'''.'/
179 &1
x,
'Execution stopped!')
180 1900
FORMAT(1
x,
'Error: too low CM energy,',f8.3,
' GeV for event ',
181 &
'generation.'/1
x,
'Execution stopped!')