EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lu1ent.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lu1ent.f
1 C
2 C
3 C
4 C Modified for HIJING program
5 c
6 c modification July 22, 1997 In pyremnn put an upper limit
7 c on the total pt kick the parton can accumulate via multiple
8 C scattering. Set the upper limit to be the sqrt(s)/2,
9 c this is fix cronin bug for Pb+Pb events at SPS energy.
10 c
11 C
12 C Last modification Oct. 1993 to comply with non-vax
13 C machines' compiler
14 C
15 C
16  SUBROUTINE lu1ent(IP,KF,PE,THE,PHI)
17 
18 C...Purpose: to store one parton/particle in commonblock LUJETS.
19  common/lujets/n,k(9000,5),p(9000,5),v(9000,5)
20  SAVE /lujets/
21  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
22  SAVE /ludat1/
23  common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
24  SAVE /ludat2/
25 
26 C...Standard checks.
27  mstu(28)=0
28  IF(mstu(12).GE.1) CALL lulist(0)
29  ipa=max(1,iabs(ip))
30  IF(ipa.GT.mstu(4)) CALL luerrm(21,
31  &'(LU1ENT:) writing outside LUJETS memory')
32  kc=lucomp(kf)
33  IF(kc.EQ.0) CALL luerrm(12,'(LU1ENT:) unknown flavour code')
34 
35 C...Find mass. Reset K, P and V vectors.
36  pm=0.
37  IF(mstu(10).EQ.1) pm=p(ipa,5)
38  IF(mstu(10).GE.2) pm=ulmass(kf)
39  DO 100 j=1,5
40  k(ipa,j)=0
41  p(ipa,j)=0.
42  100 v(ipa,j)=0.
43 
44 C...Store parton/particle in K and P vectors.
45  k(ipa,1)=1
46  IF(ip.LT.0) k(ipa,1)=2
47  k(ipa,2)=kf
48  p(ipa,5)=pm
49  p(ipa,4)=max(pe,pm)
50  pa=sqrt(p(ipa,4)**2-p(ipa,5)**2)
51  p(ipa,1)=pa*sin(the)*cos(phi)
52  p(ipa,2)=pa*sin(the)*sin(phi)
53  p(ipa,3)=pa*cos(the)
54 
55 C...Set N. Optionally fragment/decay.
56  n=ipa
57  IF(ip.EQ.0) CALL luexec
58 
59  RETURN
60  END