service routine
[u/mrichter/AliRoot.git] / EMCAL / sgpdge.F
CommitLineData
2fa51694 1*
2** 21-feb-2001 get from polar.ihep.su@DATA$STAR:[PAVLINOV.RSC]SGPDGE.CAR
3*
4*-- Author : David Adams 03/11/90
5 SUBROUTINE SGPDGE( I, PDGGEA )
6CA)========================================(begin of short description)
7C Converts a PDG particle number to a GEANT particle number.
8CB)-----------------------------------------(begin of long description)
9C
10C Purpose and methods :
11C Translates the PDG code I to the GEANT particle code PDGGEA.
12C Zero is returned if the PDG code cannot be translated.
13C
14C Called by: SGGENE
15C
16C Input arguments : I - PDG particle code
17C
18C Input/output arguments : none
19C
20C Output arguments: PDGGEA - GEANT particle code
21C
22C Side effects (other variables/banks modified, etc.)
23C
24C Created: dd-mmm-1990 David Adams
25C Modified: 19-FEB-1991 David Adams - fixed bugs in particle codes.
26C
27CC)-------------------------------------------(end of long description)
28CD)----------------------------------(declare common blocks, variables)
29C Common blocks
30C Variables in argument list
31C Save variables
32C Local variables
33 INTEGER I, IABS, PDGGEA
34C External references
35C Statement functions
36C Local data statements
37CE)===============================================(end of declarations)
38C
39 PDGGEA = 0
40 IABS = ABS(I)
41
42C Leptons
43 IF ( IABS .LT. 20 ) THEN
44
45C . e-, e+, nue
46 IF ( I .EQ. 11 ) THEN
47 PDGGEA = 3
48 ELSEIF ( I .EQ. -11 ) THEN
49 PDGGEA = 2
50 ELSEIF ( IABS .EQ. 12 ) THEN
51 PDGGEA = 4
52
53C . mu-, mu+, numu
54 ELSEIF ( I .EQ. 13 ) THEN
55 PDGGEA = 6
56 ELSEIF ( I .EQ. -13 ) THEN
57 PDGGEA = 5
58 ELSEIF ( IABS .EQ. 14 ) THEN
59 PDGGEA = 4
60
61C . tau-, tau+, nutau
62 ELSEIF ( I .EQ. 15 ) THEN
63 PDGGEA = 34
64 ELSEIF ( I .EQ. -15 ) THEN
65 PDGGEA = 33
66 ELSEIF ( IABS .EQ. 16 ) THEN
67 PDGGEA = 4
68
69 ENDIF
70
71 RETURN
72
73C Bosons.
74 ELSEIF ( IABS .LT. 100 ) THEN
75
76C . gamma, W+, W-, Z
77 IF ( I .EQ. 22 ) THEN
78 PDGGEA = 1
79 ELSEIF ( I .EQ. 24 ) THEN
80 PDGGEA = 42
81 ELSEIF ( I .EQ. -24 ) THEN
82 PDGGEA = 43
83 ELSEIF ( I .EQ. 23 ) THEN
84 PDGGEA = 44
85 ENDIF
86
87 RETURN
88
89
90C Mesons
91 ELSEIF ( IABS .LT. 1000 ) THEN
92
93C . pi0, pi+, pi-
94 IF ( I .EQ. 111 ) THEN
95 PDGGEA = 7
96 ELSEIF ( I .EQ. 211 ) THEN
97 PDGGEA = 8
98 ELSEIF ( I .EQ. -211 ) THEN
99 PDGGEA = 9
100
101C . K0L, K0S, K+, K-
102 ELSEIF ( I .EQ. 130 ) THEN
103 PDGGEA = 10
104 ELSEIF ( I .EQ. 310 ) THEN
105 PDGGEA = 16
106 ELSEIF ( I .EQ. 321 ) THEN
107 PDGGEA = 11
108 ELSEIF ( I .EQ. -321 ) THEN
109 PDGGEA = 12
110
111C . K0L, K0S, K+, K-
112 ELSEIF ( I .EQ. 130 ) THEN
113 PDGGEA = 10
114 ELSEIF ( I .EQ. 310 ) THEN
115 PDGGEA = 16
116 ELSEIF ( I .EQ. 321 ) THEN
117 PDGGEA = 11
118 ELSEIF ( I .EQ. -321 ) THEN
119 PDGGEA = 12
120
121C . eta
122 ELSEIF ( I .EQ. 221 ) THEN
123 PDGGEA = 17
124
125C . D+, D-, D0, D0bar
126 ELSEIF ( I .EQ. 411 ) THEN
127 PDGGEA = 35
128 ELSEIF ( I .EQ. -411 ) THEN
129 PDGGEA = 36
130 ELSEIF ( I .EQ. 421 ) THEN
131 PDGGEA = 37
132 ELSEIF ( I .EQ. -421 ) THEN
133 PDGGEA = 38
134
135C . DS+, DS- (previously F+, F-)
136 ELSEIF ( I .EQ. 431 ) THEN
137 PDGGEA = 39
138 ELSEIF ( I .EQ. -431 ) THEN
139 PDGGEA = 40
140
141 ENDIF
142
143 RETURN
144
145
146C Hadrons
147 ELSEIF ( IABS .LT. 10000 ) THEN
148
149C . n, nbar, p, pbar
150 IF ( I .EQ. 2112 ) THEN
151 PDGGEA = 13
152 ELSEIF ( I .EQ. -2112 ) THEN
153 PDGGEA = 25
154 ELSEIF ( I .EQ. 2212 ) THEN
155 PDGGEA = 14
156 ELSEIF ( I .EQ. -2212 ) THEN
157 PDGGEA = 15
158
159C . lambda, antilambda
160 ELSEIF ( I .EQ. 3122 ) THEN
161 PDGGEA = 18
162 ELSEIF ( I .EQ. -3122 ) THEN
163 PDGGEA = 26
164
165C . sigma +, 0, -, antisigma -, 0, +
166 ELSEIF ( I .EQ. 3222 ) THEN
167 PDGGEA = 19
168 ELSEIF ( I .EQ. 3212 ) THEN
169 PDGGEA = 20
170 ELSEIF ( I .EQ. 3112 ) THEN
171 PDGGEA = 21
172 ELSEIF ( I .EQ. -3222 ) THEN
173 PDGGEA = 27
174 ELSEIF ( I .EQ. -3212 ) THEN
175 PDGGEA = 28
176 ELSEIF ( I .EQ. -3112 ) THEN
177 PDGGEA = 29
178
179C . xi 0, xi -, antixi 0, antixi +
180 ELSEIF ( I .EQ. 3322 ) THEN
181 PDGGEA = 22
182 ELSEIF ( I .EQ. 3312 ) THEN
183 PDGGEA = 23
184 ELSEIF ( I .EQ. -3322 ) THEN
185 PDGGEA = 30
186 ELSEIF ( I .EQ. -3312 ) THEN
187 PDGGEA = 31
188
189C . omega, antiomega
190 ELSEIF ( I .EQ. 3334 ) THEN
191 PDGGEA = 24
192 ELSEIF ( I .EQ. -3334 ) THEN
193 PDGGEA = 32
194
195C . lambda C +
196 ELSEIF ( I .EQ. 4122 ) THEN
197 PDGGEA = 41
198
199 ENDIF
200
201 RETURN
202
203
204 ENDIF
205
206 RETURN
207 END
208