Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
luname.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file luname.f
1 
2 C*********************************************************************
3 
4  SUBROUTINE luname(KF,CHAU)
5 
6 C...Purpose: to give the particle/parton name as a character string.
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  common/ludat4/chaf(500)
12  CHARACTER chaf*8
13  SAVE /ludat4/
14  CHARACTER chau*16
15 
16 C...Initial values. Charge. Subdivide code.
17  chau=' '
18  kfa=iabs(kf)
19  kc=lucomp(kf)
20  IF(kc.EQ.0) RETURN
21  kq=luchge(kf)
22  kfla=mod(kfa/1000,10)
23  kflb=mod(kfa/100,10)
24  kflc=mod(kfa/10,10)
25  kfls=mod(kfa,10)
26  kflr=mod(kfa/10000,10)
27 
28 C...Read out root name and spin for simple particle.
29  IF(kfa.LE.100.OR.(kfa.GT.100.AND.kc.GT.100)) THEN
30  chau=chaf(kc)
31  len=0
32  DO 100 lem=1,8
33  100 IF(chau(lem:lem).NE.' ') len=lem
34 
35 C...Construct root name for diquark. Add on spin.
36  ELSEIF(kflc.EQ.0) THEN
37  chau(1:2)=chaf(kfla)(1:1)//chaf(kflb)(1:1)
38  IF(kfls.EQ.1) chau(3:4)='_0'
39  IF(kfls.EQ.3) chau(3:4)='_1'
40  len=4
41 
42 C...Construct root name for heavy meson. Add on spin and heavy flavour.
43  ELSEIF(kfla.EQ.0) THEN
44  IF(kflb.EQ.5) chau(1:1)='B'
45  IF(kflb.EQ.6) chau(1:1)='T'
46  IF(kflb.EQ.7) chau(1:1)='L'
47  IF(kflb.EQ.8) chau(1:1)='H'
48  len=1
49  IF(kflr.EQ.0.AND.kfls.EQ.1) THEN
50  ELSEIF(kflr.EQ.0.AND.kfls.EQ.3) THEN
51  chau(2:2)='*'
52  len=2
53  ELSEIF(kflr.EQ.1.AND.kfls.EQ.3) THEN
54  chau(2:3)='_1'
55  len=3
56  ELSEIF(kflr.EQ.1.AND.kfls.EQ.1) THEN
57  chau(2:4)='*_0'
58  len=4
59  ELSEIF(kflr.EQ.2) THEN
60  chau(2:4)='*_1'
61  len=4
62  ELSEIF(kfls.EQ.5) THEN
63  chau(2:4)='*_2'
64  len=4
65  ENDIF
66  IF(kflc.GE.3.AND.kflr.EQ.0.AND.kfls.LE.3) THEN
67  chau(len+1:len+2)='_'//chaf(kflc)(1:1)
68  len=len+2
69  ELSEIF(kflc.GE.3) THEN
70  chau(len+1:len+1)=chaf(kflc)(1:1)
71  len=len+1
72  ENDIF
73 
74 C...Construct root name and spin for heavy baryon.
75  ELSE
76  IF(kflb.LE.2.AND.kflc.LE.2) THEN
77  chau='Sigma '
78  IF(kflc.GT.kflb) chau='Lambda'
79  IF(kfls.EQ.4) chau='Sigma*'
80  len=5
81  IF(chau(6:6).NE.' ') len=6
82  ELSEIF(kflb.LE.2.OR.kflc.LE.2) THEN
83  chau='Xi '
84  IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau='Xi'''
85  IF(kfls.EQ.4) chau='Xi*'
86  len=2
87  IF(chau(3:3).NE.' ') len=3
88  ELSE
89  chau='Omega '
90  IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau='Omega'''
91  IF(kfls.EQ.4) chau='Omega*'
92  len=5
93  IF(chau(6:6).NE.' ') len=6
94  ENDIF
95 
96 C...Add on heavy flavour content for heavy baryon.
97  chau(len+1:len+2)='_'//chaf(kfla)(1:1)
98  len=len+2
99  IF(kflb.GE.kflc.AND.kflc.GE.4) THEN
100  chau(len+1:len+2)=chaf(kflb)(1:1)//chaf(kflc)(1:1)
101  len=len+2
102  ELSEIF(kflb.GE.kflc.AND.kflb.GE.4) THEN
103  chau(len+1:len+1)=chaf(kflb)(1:1)
104  len=len+1
105  ELSEIF(kflc.GT.kflb.AND.kflb.GE.4) THEN
106  chau(len+1:len+2)=chaf(kflc)(1:1)//chaf(kflb)(1:1)
107  len=len+2
108  ELSEIF(kflc.GT.kflb.AND.kflc.GE.4) THEN
109  chau(len+1:len+1)=chaf(kflc)(1:1)
110  len=len+1
111  ENDIF
112  ENDIF
113 
114 C...Add on bar sign for antiparticle (where necessary).
115  IF(kf.GT.0.OR.len.EQ.0) THEN
116  ELSEIF(kfa.GT.10.AND.kfa.LE.40.AND.kq.NE.0) THEN
117  ELSEIF(kfa.EQ.89.OR.(kfa.GE.91.AND.kfa.LE.99)) THEN
118  ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kq.NE.0) THEN
119  ELSEIF(mstu(15).LE.1) THEN
120  chau(len+1:len+1)='~'
121  len=len+1
122  ELSE
123  chau(len+1:len+3)='bar'
124  len=len+3
125  ENDIF
126 
127 C...Add on charge where applicable (conventional cases skipped).
128  IF(kq.EQ.6) chau(len+1:len+2)='++'
129  IF(kq.EQ.-6) chau(len+1:len+2)='--'
130  IF(kq.EQ.3) chau(len+1:len+1)='+'
131  IF(kq.EQ.-3) chau(len+1:len+1)='-'
132  IF(kq.EQ.0.AND.(kfa.LE.22.OR.len.EQ.0)) THEN
133  ELSEIF(kq.EQ.0.AND.(kfa.GE.81.AND.kfa.LE.100)) THEN
134  ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kflb.EQ.kflc.AND.
135  &kflb.NE.1) THEN
136  ELSEIF(kq.EQ.0) THEN
137  chau(len+1:len+1)='0'
138  ENDIF
139 
140  RETURN
141  END