ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ulmass.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ulmass.f
1 
2 C*********************************************************************
3 
4  FUNCTION ulmass(KF)
5 
6 C...Purpose: to give the mass of a particle/parton.
7  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8  SAVE /ludat1/
9  common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10  SAVE /ludat2/
11 
12 C...Reset variables. Compressed code.
13  ulmass=0.
14  kfa=iabs(kf)
15  kc=lucomp(kf)
16  IF(kc.EQ.0) RETURN
17  parf(106)=pmas(6,1)
18  parf(107)=pmas(7,1)
19  parf(108)=pmas(8,1)
20 
21 C...Guarantee use of constituent masses for internal checks.
22  IF((mstj(93).EQ.1.OR.mstj(93).EQ.2).AND.kfa.LE.10) THEN
23  ulmass=parf(100+kfa)
24  IF(mstj(93).EQ.2) ulmass=max(0.,ulmass-parf(121))
25 
26 C...Masses that can be read directly off table.
27  ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100) THEN
28  ulmass=pmas(kc,1)
29 
30 C...Find constituent partons and their masses.
31  ELSE
32  kfla=mod(kfa/1000,10)
33  kflb=mod(kfa/100,10)
34  kflc=mod(kfa/10,10)
35  kfls=mod(kfa,10)
36  kflr=mod(kfa/10000,10)
37  pma=parf(100+kfla)
38  pmb=parf(100+kflb)
39  pmc=parf(100+kflc)
40 
41 C...Construct masses for various meson, diquark and baryon cases.
42  IF(kfla.EQ.0.AND.kflr.EQ.0.AND.kfls.LE.3) THEN
43  IF(kfls.EQ.1) pmspl=-3./(pmb*pmc)
44  IF(kfls.GE.3) pmspl=1./(pmb*pmc)
45  ulmass=parf(111)+pmb+pmc+parf(113)*parf(101)**2*pmspl
46  ELSEIF(kfla.EQ.0) THEN
47  kmul=2
48  IF(kfls.EQ.1) kmul=3
49  IF(kflr.EQ.2) kmul=4
50  IF(kfls.EQ.5) kmul=5
51  ulmass=parf(113+kmul)+pmb+pmc
52  ELSEIF(kflc.EQ.0) THEN
53  IF(kfls.EQ.1) pmspl=-3./(pma*pmb)
54  IF(kfls.EQ.3) pmspl=1./(pma*pmb)
55  ulmass=2.*parf(112)/3.+pma+pmb+parf(114)*parf(101)**2*pmspl
56  IF(mstj(93).EQ.1) ulmass=pma+pmb
57  IF(mstj(93).EQ.2) ulmass=max(0.,ulmass-parf(122)-
58  & 2.*parf(112)/3.)
59  ELSE
60  IF(kfls.EQ.2.AND.kfla.EQ.kflb) THEN
61  pmspl=1./(pma*pmb)-2./(pma*pmc)-2./(pmb*pmc)
62  ELSEIF(kfls.EQ.2.AND.kflb.GE.kflc) THEN
63  pmspl=-2./(pma*pmb)-2./(pma*pmc)+1./(pmb*pmc)
64  ELSEIF(kfls.EQ.2) THEN
65  pmspl=-3./(pmb*pmc)
66  ELSE
67  pmspl=1./(pma*pmb)+1./(pma*pmc)+1./(pmb*pmc)
68  ENDIF
69  ulmass=parf(112)+pma+pmb+pmc+parf(114)*parf(101)**2*pmspl
70  ENDIF
71  ENDIF
72 
73 C...Optional mass broadening according to truncated Breit-Wigner
74 C...(either in m or in m^2).
75  IF(mstj(24).GE.1.AND.pmas(kc,2).GT.1e-4) THEN
76  IF(mstj(24).EQ.1.OR.(mstj(24).EQ.2.AND.kfa.GT.100)) THEN
77  ulmass=ulmass+0.5*pmas(kc,2)*tan((2.*rlu(0)-1.)*
78  & atan(2.*pmas(kc,3)/pmas(kc,2)))
79  ELSE
80  pm0=ulmass
81  pmlow=atan((max(0.,pm0-pmas(kc,3))**2-pm0**2)/
82  & (pm0*pmas(kc,2)))
83  pmupp=atan((pm0+pmas(kc,3))**2-pm0**2)/(pm0*pmas(kc,2))
84  ulmass=sqrt(max(0.,pm0**2+pm0*pmas(kc,2)*tan(pmlow+
85  & (pmupp-pmlow)*rlu(0))))
86  ENDIF
87  ENDIF
88  mstj(93)=0
89 
90  RETURN
91  END