7 SUBROUTINE pyinbm(CHFRAM,CHBEAM,CHTARG,WIN)
10 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
17 INTEGER idbmup,pdfgup,pdfsup,idwtup,nprup,lprup
18 DOUBLE PRECISION ebmup,xsecup,xerrup,xmaxup
19 common/heprup/idbmup(2),ebmup(2),pdfgup(2),pdfsup(2),
20 &idwtup,nprup,xsecup(maxpup),xerrup(maxpup),xmaxup(maxpup),
26 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
27 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
28 common/
pysubs/msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
34 CHARACTER chfram*12,chbeam*12,chtarg*12,chcom(3)*12,chalp(2)*26,
35 &chidnt(3)*12,chtemp*12,chcde(39)*12,chinit*76,chname*16
36 dimension len(3),kcde(39),pm(2)
37 DATA chalp/
'abcdefghijklmnopqrstuvwxyz',
38 &
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
39 DATA chcde/
'e- ',
'e+ ',
'nu_e ',
40 &
'nu_ebar ',
'mu- ',
'mu+ ',
'nu_mu ',
41 &
'nu_mubar ',
'tau- ',
'tau+ ',
'nu_tau ',
42 &
'nu_taubar ',
'pi+ ',
'pi- ',
'n0 ',
43 &
'nbar0 ',
'p+ ',
'pbar- ',
'gamma ',
44 &
'lambda0 ',
'sigma- ',
'sigma0 ',
'sigma+ ',
45 &
'xi- ',
'xi0 ',
'omega- ',
'pi0 ',
46 &
'reggeon ',
'pomeron ',
'gamma/e- ',
'gamma/e+ ',
47 &
'gamma/mu- ',
'gamma/mu+ ',
'gamma/tau- ',
'gamma/tau+ ',
48 &
'k+ ',
'k- ',
'ks0 ',
'kl0 '/
49 DATA kcde/11,-11,12,-12,13,-13,14,-14,15,-15,16,-16,
50 &211,-211,2112,-2112,2212,-2212,22,3122,3112,3212,3222,
51 &3312,3322,3334,111,110,990,6*22,321,-321,310,130/
58 IF(chfram(1:1).EQ.
'u'.OR.chfram(1:1).EQ.
'U')
THEN
60 IF(pdfgup(1).EQ.-9.OR.pdfgup(2).EQ.-9)
mint(111)=12
61 CALL
pyname(idbmup(1),chname)
63 CALL
pyname(idbmup(2),chname)
74 IF(len(
i).EQ.ll.AND.chcom(
i)(ll:ll).EQ.
' ') len(
i)=ll-1
76 IF(chcom(
i)(ll:ll).EQ.chalp(2)(la:la)) chcom(
i)(ll:ll)=
84 IF(chidnt(
i)(ll:ll).EQ.
'~')
THEN
86 chidnt(
i)=chtemp(1:ll-1)//
'bar'//chtemp(ll+1:10)//
' '
89 IF(chidnt(
i)(1:2).EQ.
'nu'.AND.chidnt(
i)(3:3).NE.
'_')
THEN
91 chidnt(
i)=
'nu_'//chtemp(3:7)
92 ELSEIF(chidnt(
i)(1:2).EQ.
'n ')
THEN
94 ELSEIF(chidnt(
i)(1:4).EQ.
'nbar')
THEN
95 chidnt(
i)(1:5)=
'nbar0'
96 ELSEIF(chidnt(
i)(1:2).EQ.
'p ')
THEN
98 ELSEIF(chidnt(
i)(1:4).EQ.
'pbar'.OR.
99 & chidnt(
i)(1:2).EQ.
'p-')
THEN
100 chidnt(
i)(1:5)=
'pbar-'
101 ELSEIF(chidnt(
i)(1:6).EQ.
'lambda')
THEN
103 ELSEIF(chidnt(
i)(1:3).EQ.
'reg')
THEN
104 chidnt(
i)(1:7)=
'reggeon'
105 ELSEIF(chidnt(
i)(1:3).EQ.
'pom')
THEN
106 chidnt(
i)(1:7)=
'pomeron'
111 IF(chcom(1)(1:2).EQ.
'no')
THEN
119 IF(chidnt(
i+1).EQ.chcde(
j))
mint(10+
i)=kcde(
j)
124 IF(
mint(10+
i).EQ.22.AND.chidnt(
i+1)(6:6).EQ.
'/')
THEN
125 chtemp=chidnt(
i+1)(7:12)//
' '
127 IF(chtemp.EQ.chcde(
j))
mint(140+
i)=kcde(
j)
133 IF(
mint(11).EQ.0)
WRITE(mstu(11),5000) chbeam(1:len(2))
134 IF(
mint(12).EQ.0)
WRITE(mstu(11),5100) chtarg(1:len(3))
141 IF(chcom(1)(1:2).EQ.
'cm')
THEN
144 IF(
mstp(122).GE.1)
THEN
145 IF(chcom(2)(1:1).NE.
'e')
THEN
146 loffs=(31-(len(2)+len(3)))/2
147 chinit(loffs+1:76)=
'PYTHIA will be initialized for a '//
148 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
151 loffs=(30-(len(2)+len(3)))/2
152 chinit(loffs+1:76)=
'PYTHIA will be initialized for an '//
153 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
156 WRITE(mstu(11),5200) chinit
157 WRITE(mstu(11),5300) win
161 ELSEIF(chcom(1)(1:3).EQ.
'fix')
THEN
163 s=pm(1)**2+pm(2)**2+2d0*pm(2)*sqrt(pm(1)**2+win**2)
164 IF(
mstp(122).GE.1)
THEN
165 loffs=(29-(len(2)+len(3)))/2
166 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
167 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
168 &
' fixed target'//
' '
169 WRITE(mstu(11),5200) chinit
170 WRITE(mstu(11),5400) win
171 WRITE(mstu(11),5500) sqrt(
s)
175 ELSEIF(chcom(1)(1:1).EQ.
'3')
THEN
179 p(1,4)=sqrt(
p(1,1)**2+
p(1,2)**2+
p(1,3)**2+
p(1,5)**2)
180 p(2,4)=sqrt(
p(2,1)**2+
p(2,2)**2+
p(2,3)**2+
p(2,5)**2)
182 s=(
p(1,4)+
p(2,4))**2-(
p(1,1)+
p(2,1))**2-(
p(1,2)+
p(2,2))**2-
184 IF(
mstp(122).GE.1)
THEN
185 loffs=(22-(len(2)+len(3)))/2
186 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
187 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
188 &
' user configuration'//
' '
189 WRITE(mstu(11),5200) chinit
191 WRITE(mstu(11),5700) chcom(2),
p(1,1),
p(1,2),
p(1,3),
p(1,4)
192 WRITE(mstu(11),5700) chcom(3),
p(2,1),
p(2,2),
p(2,3),
p(2,4)
193 WRITE(mstu(11),5500) sqrt(
max(0d0,
s))
197 ELSEIF(chcom(1)(1:1).EQ.
'4')
THEN
199 pms1=
p(1,4)**2-
p(1,1)**2-
p(1,2)**2-
p(1,3)**2
200 p(1,5)=
sign(sqrt(abs(pms1)),pms1)
201 pms2=
p(2,4)**2-
p(2,1)**2-
p(2,2)**2-
p(2,3)**2
202 p(2,5)=
sign(sqrt(abs(pms2)),pms2)
203 s=(
p(1,4)+
p(2,4))**2-(
p(1,1)+
p(2,1))**2-(
p(1,2)+
p(2,2))**2-
205 IF(
mstp(122).GE.1)
THEN
206 loffs=(22-(len(2)+len(3)))/2
207 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
208 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
209 &
' user configuration'//
' '
210 WRITE(mstu(11),5200) chinit
212 WRITE(mstu(11),5700) chcom(2),
p(1,1),
p(1,2),
p(1,3),
p(1,4)
213 WRITE(mstu(11),5700) chcom(3),
p(2,1),
p(2,2),
p(2,3),
p(2,4)
214 WRITE(mstu(11),5500) sqrt(
max(0d0,
s))
218 ELSEIF(chcom(1)(1:1).EQ.
'5')
THEN
220 s=(
p(1,4)+
p(2,4))**2-(
p(1,1)+
p(2,1))**2-(
p(1,2)+
p(2,2))**2-
222 IF(
mstp(122).GE.1)
THEN
223 loffs=(22-(len(2)+len(3)))/2
224 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
225 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
226 &
' user configuration'//
' '
227 WRITE(mstu(11),5200) chinit
229 WRITE(mstu(11),5700) chcom(2),
p(1,1),
p(1,2),
p(1,3),
p(1,4)
230 WRITE(mstu(11),5700) chcom(3),
p(2,1),
p(2,2),
p(2,3),
p(2,4)
231 WRITE(mstu(11),5500) sqrt(
max(0d0,
s))
235 ELSEIF(
mint(111).GE.11)
THEN
236 s=(ebmup(1)+ebmup(2))**2-(sqrt(
max(0d0,ebmup(1)**2-pm(1)**2))-
237 & sqrt(
max(0d0,ebmup(2)**2-pm(2)**2)))**2
238 IF(
mstp(122).GE.1)
THEN
239 loffs=(22-(len(2)+len(3)))/2
240 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
241 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
242 &
' user configuration'//
' '
243 WRITE(mstu(11),5200) chinit
244 WRITE(mstu(11),6000) ebmup(1),ebmup(2)
245 WRITE(mstu(11),5500) sqrt(
max(0d0,
s))
250 WRITE(mstu(11),5800) chfram(1:len(1))
253 IF(
s.LT.
parp(2)**2)
THEN
254 WRITE(mstu(11),5900) sqrt(
s)
259 5000
FORMAT(1
x,
'Error: unrecognized beam particle ''',a,
'''D0'/
260 &1
x,
'Execution stopped!')
261 5100
FORMAT(1
x,
'Error: unrecognized target particle ''',a,
'''D0'/
262 &1
x,
'Execution stopped!')
263 5200
FORMAT(/1
x,78(
'=')/1
x,
'I',76
x,
'I'/1
x,
'I',a76,
'I')
264 5300
FORMAT(1
x,
'I',18
x,
'at',1
x,f10.3,1
x,
'GeV center-of-mass energy',
265 &19
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
266 5400
FORMAT(1
x,
'I',22
x,
'at',1
x,f10.3,1
x,
'GeV/c lab-momentum',22
x,
'I')
267 5500
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',11
x,
'corresponding to',1
x,f10.3,1
x,
268 &
'GeV center-of-mass energy',12
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
269 5600
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',18
x,
'px (GeV/c)',3
x,
'py (GeV/c)',3
x,
270 &
'pz (GeV/c)',6
x,
'E (GeV)',9
x,
'I')
271 5700
FORMAT(1
x,
'I',8
x,a8,4(2
x,f10.3,1
x),8
x,
'I')
272 5800
FORMAT(1
x,
'Error: unrecognized coordinate frame ''',a,
'''D0'/
273 &1
x,
'Execution stopped!')
274 5900
FORMAT(1
x,
'Error: too low CM energy,',f8.3,
' GeV for event ',
275 &
'generation.'/1
x,
'Execution stopped!')
276 6000
FORMAT(1
x,
'I',12
x,
'with',1
x,f10.3,1
x,
'GeV on',1
x,f10.3,1
x,
277 &
'GeV beam energies',13
x,
'I')