ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lufowo.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lufowo.f
1 
2 C*********************************************************************
3 
4  SUBROUTINE lufowo(H10,H20,H30,H40)
5 
6 C...Purpose: to calculate the first few Fox-Wolfram moments.
7  common/lujets/n,k(9000,5),p(9000,5),v(9000,5)
8  SAVE /lujets/
9  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10  SAVE /ludat1/
11  common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
12  SAVE /ludat2/
13 
14 C...Copy momenta for particles and calculate H0.
15  np=0
16  h0=0.
17  hd=0.
18  DO 110 i=1,n
19  IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 110
20  IF(mstu(41).GE.2) THEN
21  kc=lucomp(k(i,2))
22  IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
23  & kc.EQ.18) goto 110
24  IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.luchge(k(i,2)).EQ.0)
25  & goto 110
26  ENDIF
27  IF(n+np.GE.mstu(4)-mstu(32)-5) THEN
28  CALL luerrm(11,'(LUFOWO:) no more memory left in LUJETS')
29  h10=-1.
30  h20=-1.
31  h30=-1.
32  h40=-1.
33  RETURN
34  ENDIF
35  np=np+1
36  DO 100 j=1,3
37  100 p(n+np,j)=p(i,j)
38  p(n+np,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
39  h0=h0+p(n+np,4)
40  hd=hd+p(n+np,4)**2
41  110 CONTINUE
42  h0=h0**2
43 
44 C...Very low multiplicities (0 or 1) not considered.
45  IF(np.LE.1) THEN
46  CALL luerrm(8,'(LUFOWO:) too few particles for analysis')
47  h10=-1.
48  h20=-1.
49  h30=-1.
50  h40=-1.
51  RETURN
52  ENDIF
53 
54 C...Calculate H1 - H4.
55  h10=0.
56  h20=0.
57  h30=0.
58  h40=0.
59  DO 120 i1=n+1,n+np
60  DO 120 i2=i1+1,n+np
61  cthe=(p(i1,1)*p(i2,1)+p(i1,2)*p(i2,2)+p(i1,3)*p(i2,3))/
62  &(p(i1,4)*p(i2,4))
63  h10=h10+p(i1,4)*p(i2,4)*cthe
64  h20=h20+p(i1,4)*p(i2,4)*(1.5*cthe**2-0.5)
65  h30=h30+p(i1,4)*p(i2,4)*(2.5*cthe**3-1.5*cthe)
66  h40=h40+p(i1,4)*p(i2,4)*(4.375*cthe**4-3.75*cthe**2+0.375)
67  120 CONTINUE
68 
69 C...Calculate H1/H0 - H4/H0. Output.
70  mstu(61)=n+1
71  mstu(62)=np
72  h10=(hd+2.*h10)/h0
73  h20=(hd+2.*h20)/h0
74  h30=(hd+2.*h30)/h0
75  h40=(hd+2.*h40)/h0
76 
77  RETURN
78  END