ATLAS Offline Software
Event/PyDumper/python/PDG.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 #
4 # File: PDG.py
5 # Created: sss, Mar 2005
6 # Purpose: Define PDG ID codes.
7 #
8 
9 """
10 This module contains names for the various PDG particle ID codes.
11 The names are the same as in EventKernel/PdtPdg.h.
12 
13 This module also contains a dictionary pdgid_names mapping ID codes
14 back to printable strings, and a function pdgid_to_name to do this
15 conversion. Similarly, root_names and pdgid_to_root_name translate to
16 strings with root markup.
17 """
18 
19 # Table to translate from PDG IDs to printable strings.
20 pdgid_names = {}
21 
22 # Table to translate from PDG IDs to strings with root markup.
23 root_names = {}
24 
25 
26 def pdgid_to_name (id):
27  """Convert a PDG ID to a printable string.
28  """
29  name = pdgid_names.get(id)
30  if not name:
31  name = str(id)
32  return name
33 
34 
36  """Convert a PDG ID to a string with root markup.
37  """
38  name = root_names.get(id)
39  if not name:
40  name = str(id)
41  return name
42 
43 
44 
45 #
46 # Table of PDG IDs, associating the ID codes with up to several names.
47 # This is formatted as one big string to make it easier to maintain
48 # (don't need to quote everything individually).
49 # The format of each line is like this:
50 #
51 # mname = id pname rname
52 #
53 # An attribute mname will be added to this module with a value of id.
54 # These names are intended to match those in PdgPdt.h.
55 # pname is a printable name for the entry, and rname is a name
56 # with root-style markup. These names will be put into the pdgid_names
57 # and root_names dictionaries, respectively. They can be left as `!'
58 # if no name is available. pname and rname should not contain spaces.
59 # Blank lines or those starting with `#' will be ignored.
60 #
61 _pdgtable = \
62 """
63 d = 1 D d
64 anti_d = -1 DBAR #bar{d}
65 u = 2 U u
66 anti_u = -2 UBAR #bar{u}
67 s = 3 S s
68 anti_s = -3 SBAR #bar{s}
69 c = 4 C c
70 anti_c = -4 CBAR #bar{c}
71 b = 5 B b
72 anti_b = -5 BBAR #bar{b}
73 t = 6 T t
74 anti_t = -6 TBAR #bar{t}
75 l = 7 LPRIME !
76 anti_l = -7 LPRIMEBAR !
77 h = 8 ! !
78 anti_h = -8 ! !
79 g = 21 GLUE g
80 e_minus = 11 E- e^{-}
81 e_plus = -11 E+ e^{+}
82 nu_e = 12 NUE #nu_{e}
83 anti_nu_e = -12 ANUE #bar{#nu}_{e}
84 mu_minus = 13 MU- #mu^{-}
85 mu_plus = -13 MU+ #mu^{+}
86 nu_mu = 14 NUM #nu_{#mu}
87 anti_nu_mu = -14 ANUM #bar{#nu}_{#mu}
88 tau_minus = 15 TAU- #tau^{-}
89 tau_plus = -15 TAU+ #tau^{+}
90 nu_tau = 16 NUT #nu_{#tau}
91 anti_nu_tau = -16 ANUT #bar{nu}_{#tau}
92 L_minus = 17 ! !
93 L_plus = -17 ! !
94 nu_L = 18 ! !
95 anti_nu_L = -18 ! !
96 gamma = 22 PHOT #gamma
97 Z0 = 23 Z0 Z
98 W_plus = 24 W+ W^{+}
99 W_minus = -24 W- W^{-}
100 Higgs0 = 25 H0 h^{0}
101 reggeon = 28 ! !
102 pomeron = 29 ! !
103 Z_prime0 = 32 ! !
104 Z_prime_prime0 = 33 ! !
105 W_prime_plus = 34 ! !
106 W_prime_minus = -34 ! !
107 Higgs_prime0 = 35 ! !
108 A0 = 36 ! !
109 Higgs_plus = 37 ! !
110 Higgs_minus = -37 ! !
111 R0 = 40 ! !
112 anti_R0 = -40 ! !
113 specflav = 81 ! !
114 rndmflav = 82 ! !
115 anti_rndmflav = -82 ! !
116 phasespa = 83 ! !
117 c_minushadron = 84 ! !
118 anti_c_minushadron = -84 ! !
119 b_minushadron = 85 ! !
120 anti_b_minushadron = -85 ! !
121 t_minushadron = 86 ! !
122 anti_t_minushadron = -86 ! !
123 Wvirt_plus = 89 ! !
124 Wvirt_minus = -89 ! !
125 diquark = 90 ! !
126 anti_diquark = -90 ! !
127 cluster = 91 CLUSTER cluster
128 string = 92 ! !
129 indep = 93 ! !
130 CMshower = 94 ! !
131 SPHEaxis = 95 ! !
132 THRUaxis = 96 ! !
133 CLUSjet = 97 ! !
134 CELLjet = 98 ! !
135 table = 99 ! !
136 pi0 = 111 PI0 #pi^{0}
137 pi_plus = 211 PI+ #pi^{+}
138 pi_minus = -211 PI- #pi^{-}
139 pi_diffr_plus = 210 ! !
140 pi_diffr_minus = -210 ! !
141 pi_2S0 = 20111 ! !
142 pi_2S_plus = 20211 ! !
143 pi_2S_minus = -20211 ! !
144 eta = 221 ETA #eta
145 eta_2S = 20221 ! !
146 eta_prime = 331 ! !
147 rho0 = 113 ! #rho^{0}
148 rho_plus = 213 RHO+ #rho^{+}
149 rho_minus = -213 RHO- #rho^{-}
150 rho_2S0 = 30113 ! !
151 rho_2S_plus = 30213 ! !
152 rho_2S_minus = -30213 ! !
153 rho_3S0 = 40113 ! !
154 rho_3S_plus = 40213 ! !
155 rho_3S_minus = -40213 ! !
156 omega = 223 ! !
157 omega_2S = 30223 ! !
158 phi = 333 PHI #phi
159 a_00 = 10111 ! !
160 a_0_plus = 10211 ! !
161 a_0_minus = -10211 ! !
162 f_0 = 10221 ! !
163 f_prime_0 = 10331 ! !
164 b_10 = 10113 ! !
165 b_1_plus = 10213 ! !
166 b_1_minus = -10213 ! !
167 h_1 = 10223 h_1 h_{1}
168 h_prime_1 = 10333 ! !
169 a_10 = 20113 ! !
170 a_1_plus = 20213 ! !
171 a_1_minus = -20213 ! !
172 f_1 = 20223 ! !
173 f_prime_1 = 20333 ! !
174 a_20 = 115 ! !
175 a_2_plus = 215 a_2+ a_{2}^{+}
176 a_2_minus = -215 a_2- a_{2}^{-}
177 f_2 = 225 ! !
178 f_prime_2 = 335 ! !
179 K0 = 311 K0 K^{0}
180 anti_K0 = -311 K0BAR #bar{K}^0
181 K_S0 = 310 K_S0 K_{S}^{0}
182 K_L0 = 130 K_L0 K_{L}^{0}
183 K_plus = 321 K+ K^{+}
184 K_minus = -321 K- K^{-}
185 K_star0 = 313 K* K^{*}
186 anti_K_star0 = -313 K*BAR #bar{K}^{*}
187 K_star_plus = 323 ! !
188 K_star_minus = -323 ! !
189 K_0_star0 = 10311 ! !
190 anti_K_0_star0 = -10311 ! !
191 K_0_star_plus = 10321 ! !
192 K_0_star_minus = -10321 ! !
193 K_10 = 10313 ! !
194 anti_K_10 = -10313 ! !
195 K_1_plus = 10323 ! !
196 K_1_minus = -10323 ! !
197 K_2_star0 = 315 ! !
198 anti_K_2_star0 = -315 ! !
199 K_2_star_plus = 325 K_2*+ K_{2}^{*+}
200 K_2_star_minus = -325 K_2*- K_{2}^{*-}
201 K_prime_10 = 20313 ! !
202 anti_K_prime_10 = -20313 ! !
203 K_prime_1_plus = 20323 ! !
204 K_prime_1_minus = -20323 ! !
205 D_plus = 411 D+ D^{+}
206 D_minus = -411 D- D^{-}
207 D0 = 421 D0 D^{0}
208 anti_D0 = -421 D0BAR #bar{D}^{0}
209 D_star_plus = 413 ! !
210 D_star_minus = -413 ! !
211 D_star0 = 423 ! !
212 anti_D_star0 = -423 ! !
213 D_0_star_plus = 10411 ! !
214 D_0_star_minus = -10411 ! !
215 D_0_star0 = 10421 ! !
216 anti_D_0_star0 = -10421 ! !
217 D_1_plus = 10413 ! !
218 D_1_minus = -10413 ! !
219 D_10 = 10423 ! !
220 anti_D_10 = -10423 ! !
221 D_2_star_plus = 415 ! !
222 D_2_star_minus = -415 ! !
223 D_2_star0 = 425 ! !
224 anti_D_2_star0 = -425 ! !
225 D_prime_1_plus = 20413 ! !
226 D_prime_1_minus = -20413 ! !
227 D_prime_10 = 20423 ! !
228 anti_D_prime_10 = -20423 ! !
229 D_s_plus = 431 D_S+ D_{s}^{+}
230 D_s_minus = -431 D_S- D_{s}^{-}
231 D_s_star_plus = 433 ! !
232 D_s_star_minus = -433 ! !
233 D_s0_star_plus = 10431 ! !
234 D_s0_star_minus = -10431 ! !
235 D_s1_plus = 10433 ! !
236 D_s1_minus = -10433 ! !
237 D_s2_star_plus = 435 ! !
238 D_s2_star_minus = -435 ! !
239 D_prime_s1_plus = 20433 ! !
240 D_prime_s1_minus = -20433 ! !
241 B0 = 511 B0 B^{0}
242 anti_B0 = -511 B0BAR #bar{B}^{0}
243 B_plus = 521 B+ B^{+}
244 B_minus = -521 B- B^{-}
245 B_star0 = 513 ! !
246 anti_B_star0 = -513 ! !
247 B_star_plus = 523 ! !
248 B_star_minus = -523 ! !
249 B_0_star0 = 10511 ! !
250 anti_B_0_star0 = -10511 ! !
251 B_0_star_plus = 10521 ! !
252 B_0_star_minus = -10521 ! !
253 B_10 = 10513 ! !
254 anti_B_10 = -10513 ! !
255 B_1_plus = 10523 ! !
256 B_1_minus = -10523 ! !
257 B_2_star0 = 515 ! !
258 anti_B_2_star0 = -515 ! !
259 B_2_star_plus = 525 ! !
260 B_2_star_minus = -525 ! !
261 B_prime_10 = 20513 ! !
262 anti_B_prime_10 = -20513 ! !
263 B_prime_1_plus = 20523 ! !
264 B_prime_1_minus = -20523 ! !
265 B_s0 = 531 B_S0 B_{s}^{0}
266 anti_B_s0 = -531 B_S0BAR #bar{B}_{s}^{0}
267 B_s_star0 = 533 ! !
268 anti_B_s_star0 = -533 ! !
269 B_s0_star0 = 10531 ! !
270 anti_B_s0_star0 = -10531 ! !
271 B_s10 = 10533 ! !
272 anti_B_s10 = -10533 ! !
273 B_s2_star0 = 535 ! !
274 anti_B_s2_star0 = -535 ! !
275 B_prime_s10 = 20533 ! !
276 anti_B_prime_s10 = -20533 ! !
277 B_c_plus = 541 BC+ B_{c}^{+}
278 B_c_minus = -541 BC- B_{c}^{-}
279 B_c_star_plus = 543 BC*+ B_{c}^{*+}
280 B_c_star_minus = -543 BC*- B_{c}^{*-}
281 B_c0_star_plus = 10541 ! !
282 B_c0_star_minus = -10541 ! !
283 B_c1_plus = 10543 ! !
284 B_c1_minus = -10543 ! !
285 B_c2_star_plus = 545 ! !
286 B_c2_star_minus = -545 ! !
287 B_prime_c1_plus = 20543 ! !
288 B_prime_c1_minus = -20543 ! !
289 eta_c = 441 ! !
290 eta_c_2S = 20441 ! !
291 J_psi = 443 JPSI J/#psi
292 psi_2S = 20443 ! !
293 chi_c0 = 10441 ! !
294 chi_c1 = 10443 ! !
295 chi_c2 = 445 ! !
296 eta_b_2S = 20551 ! !
297 eta_b_3S = 40551 ! !
298 Upsilon = 553 ! !
299 Upsilon_2S = 20553 ! !
300 Upsilon_3S = 60553 ! !
301 Upsilon_4S = 70553 ! !
302 Upsilon_5S = 80553 ! !
303 h_b = 10553 ! !
304 h_b_2P = 40553 ! !
305 h_b_3P = 100553 ! !
306 chi_b0 = 551 ! !
307 chi_b1 = 20553 ! !
308 chi_b2 = 555 ! !
309 chi_b0_2P = 30551 ! !
310 chi_b1_2P = 50553 ! !
311 chi_b2_2P = 10555 ! !
312 chi_b0_3P = 50551 ! !
313 chi_b1_3P = 110553 ! !
314 chi_b2_3P = 20555 ! !
315 eta_b2_1D = 40555 ! !
316 eta_b2_2D = 60555 ! !
317 Upsilon_1_1D = 120553 ! !
318 Upsilon_2_1D = 30555 ! !
319 Upsilon_3_1D = 557 ! !
320 Upsilon_1_2D = 130553 ! !
321 Upsilon_2_2D = 50555 ! !
322 Upsilon_3_2D = 10557 ! !
323 Delta_minus = 1114 DELTA- #Delta^{-}
324 anti_Delta_plus = -1114 DELTA+ #Delta^{+}
325 n_diffr = 2110 ! !
326 anti_n_diffr = -2110 ! !
327 n0 = 2112 N n
328 anti_n0 = -2112 NBAR #bar{n}
329 Delta0 = 2114 ! !
330 anti_Delta0 = -2114 ! !
331 p_diffr_plus = 2210 ! !
332 anti_p_diffr_minus = -2210 ! !
333 p_plus = 2212 P+ p^{+}
334 anti_p_minus = -2212 P- p^{-}
335 Delta_plus = 2214 ! !
336 anti_Delta_minus = -2214 ! !
337 Delta_plus_plus = 2224 ! !
338 anti_Delta_minus_minus = -2224 ! !
339 Sigma_minus = 3112 SIGMA- #Sigma^{-}
340 anti_Sigma_plus = -3112 SIGMABAR+ #bar{#Sigma}^{+}
341 Sigma_star_minus = 3114 ! !
342 anti_Sigma_star_plus = -3114 ! !
343 Lambda0 = 3122 LAMBDA_D0 #Lambda^{0}
344 anti_Lambda0 = -3122 LAMBDABAR_D0 #bar{#Lambda}^{0}
345 Sigma0 = 3212 ! !
346 anti_Sigma0 = -3212 ! !
347 Sigma_star0 = 3214 ! !
348 anti_Sigma_star0 = -3214 ! !
349 Sigma_plus = 3222 SIGMA+ #Sigma^{+}
350 anti_Sigma_minus = -3222 SIGMABAR- #bar{#Sigma}^{-}
351 Sigma_star_plus = 3224 ! !
352 anti_Sigma_star_minus = -3224 ! !
353 Xi_minus = 3312 XI- #Xi^{-}
354 anti_Xi_plus = -3312 XI+ #Xi^{+}
355 Xi_star_minus = 3314 ! !
356 anti_Xi_star_plus = -3314 ! !
357 Xi0 = 3322 XI0 #Xi^{0}
358 anti_Xi0 = -3322 XIBAR0 #bar{Xi}^{0}
359 Xi_star0 = 3324 ! !
360 anti_Xi_star0 = -3324 ! !
361 Omega_minus = 3334 ! !
362 anti_Omega_plus = -3334 ! !
363 Sigma_c0 = 4112 ! !
364 anti_Sigma_c0 = -4112 ! !
365 Sigma_c_star0 = 4114 SIGMA_C0* #Sigma_{c}^{*0}
366 anti_Sigma_c_star0 = -4114 SIGMABAR_C0* #bar{#Sigma}_{c}^{*0}
367 Lambda_c_plus = 4122 LAMBDA_C+ #Lambda_{c}^{+}
368 anti_Lambda_c_minus = -4122 LAMBDA_C- #Lambda_{c}^{-}
369 Xi_c0 = 4132 XI_C0 #Xi_{c}^{0}
370 anti_Xi_c0 = -4132 XIBAR_C0 #bar{#Xi}_{c}^{0}
371 Sigma_c_plus = 4212 SIGMA_C+ #Sigma_{c}^{+}
372 anti_Sigma_c_minus = -4212 SIGMA_C- #Sigma_{c}^{-}
373 Sigma_c_star_plus = 4214 SIGMA_C+* #Sigma_{c}^{*+}
374 anti_Sigma_c_star_minus = -4214 SIGMA_C-* #Sigma_{c}^{*-}
375 Sigma_c_plus_plus = 4222 SIGMA_C++ #Sigma_{c}^{++}
376 anti_Sigma_c_minus_minus = -4222 SIGMA_C-- #Sigma_{c}^{--}
377 Sigma_c_star_plus_plus = 4224 SIGMA_C++* #Sigma_{c}^{*++}
378 anti_Sigma_c_star_minus_minus = -4224 SIGMA_C--* #Sigma_{c}^{*--}
379 Xi_c_plus = 4322 XI_C+ #Xi_{c}^{+}
380 anti_Xi_c_minus = -4322 XI_C- #Xi_{c}^{-}
381 Xi_prime_c0 = 4312 XI'_C0 #Xi\'_{c}^{0}
382 Xi_primeanti__c0 = -4312 XIBAR'_C0 #bar{#Xi}\'_{c}^{0}
383 Xi_c_star0 = 4314 XI_C0* #Xi_{c}^{*0}
384 anti_Xi_c_star0 = -4314 XIBAR_C0* #bar{#Xi}_{c}^{*0}
385 Xi_prime_c_plus = 4232 XI'_C+ #Xi\'_{c}^{+}
386 Xi_primeanti__c_minus = -4232 XIBAR'_C- #Xi\'_{c}^{-}
387 Xi_c_star_plus = 4324 XI_C+* #Xi_{c}^{*+}
388 anti_Xi_c_star_minus = -4324 XI_C-* #Xi_{c}^{*-}
389 Omega_c0 = 4332 OMEGA_C0 #Omega_{c}^{0}
390 anti_Omega_c0 = -4332 OMEGABAR_C0 #bar{#Omega}_{c}^{0}
391 Omega_c_star0 = 4334 OMEGA_C0* #Omega_{c}^{*0}
392 anti_Omega_c_star0 = -4334 OMEGA_C0* #bar{#Omega}_{c}^{*0}
393 Sigma_b_minus = 5112 SIGMA_B- #Sigma_{b}^{-}'
394 anti_Sigma_b_plus = -5112 SIGMA_B+ #Sigma_{b}^{+}'
395 Sigma_b_star_minus = 5114 ! !
396 anti_Sigma_b_star_plus = -5114 ! !
397 Lambda_b0 = 5122 LAMBDA_B0 #Lambda_{b}^{0}
398 anti_Lambda_b0 = -5122 LAMBDA_B0BAR #bar{#Lambda}_{b}^0
399 Xi_b_minus = 5132 ! !
400 anti_Xi_b_plus = -5132 ! !
401 Sigma_b0 = 5212 SIGMA_B0 #Sigma_{b}^{0}
402 anti_Sigma_b0 = -5212 SIGMABAR_B0 #bar{#Sigma}_{b}^{0}
403 Sigma_b_star0 = 5214 ! !
404 anti_Sigma_b_star0 = -5214 ! !
405 Sigma_b_plus = 5222 ! !
406 anti_Sigma_b_minus = -5222 ! !
407 Sigma_star_ = 5224 ! !
408 anti_Sigma_b_star_minus = -5224 ! !
409 Xi_b0 = 5232 XI_B0 #Xi_b^{0}
410 anti_Xi_b0 = -5232 XIBAR_B0 #bar{#Xi}_b^{0}
411 Xi_prime_b_minus = 5312 ! !
412 anti_Xi_prime_b_plus = -5312 ! !
413 Xi_b_star_minus = 5314 ! !
414 anti_Xi_b_star_plus = -5314 ! !
415 Xi_prime_b0 = 5322 ! !
416 anti_Xi_prime_b0 = -5322 ! !
417 Xi_b_star0 = 5324 ! !
418 anti_Xi_b_star0 = -5324 ! !
419 Omega_b_minus = 5332 ! !
420 anti_Omega_b_plus = -5332 ! !
421 Omega_b_star_minus = 5334 ! !
422 anti_Omega_b_star_plus = -5334 ! !
423 dd_0 = 1101 ! !
424 anti_dd_0 = -1101 ! !
425 ud_0 = 2101 UD0 !
426 anti_ud_0 = -2101 UD0BAR !
427 uu_0 = 2201 ! !
428 anti_uu_0 = -2201 ! !
429 sd_0 = 3101 ! !
430 anti_sd_0 = -3101 ! !
431 su_0 = 3201 ! !
432 anti_su_0 = -3201 ! !
433 ss_0 = 3301 ! !
434 anti_ss_0 = -3301 ! !
435 cd_0 = 4101 ! !
436 anti_cd_0 = -4101 ! !
437 cu_0 = 4201 ! !
438 anti_cu_0 = -4201 ! !
439 cs_0 = 4301 ! !
440 anti_cs_0 = -4301 ! !
441 cc_0 = 4401 ! !
442 anti_cc_0 = -4401 ! !
443 bd_0 = 5101 ! !
444 anti_bd_0 = -5101 ! !
445 bu_0 = 5201 ! !
446 anti_bu_0 = -5201 ! !
447 bs_0 = 5301 ! !
448 anti_bs_0 = -5301 ! !
449 bc_0 = 5401 ! !
450 anti_bc_0 = -5401 ! !
451 bb_0 = 5501 ! !
452 anti_bb_0 = -5501 ! !
453 dd_1 = 1103 ! !
454 anti_dd_1 = -1103 ! !
455 ud_1 = 2103 ! !
456 anti_ud_1 = -2103 ! !
457 uu_1 = 2203 ! !
458 anti_uu_1 = -2203 ! !
459 sd_1 = 3103 ! !
460 anti_sd_1 = -3103 ! !
461 su_1 = 3203 ! !
462 anti_su_1 = -3203 ! !
463 ss_1 = 3303 ! !
464 anti_ss_1 = -3303 ! !
465 cd_1 = 4103 ! !
466 anti_cd_1 = -4103 ! !
467 cu_1 = 4203 ! !
468 anti_cu_1 = -4203 ! !
469 cs_1 = 4303 ! !
470 anti_cs_1 = -4303 ! !
471 cc_1 = 4403 ! !
472 anti_cc_1 = -4403 ! !
473 bd_1 = 5103 ! !
474 anti_bd_1 = -5103 ! !
475 bu_1 = 5203 ! !
476 anti_bu_1 = -5203 ! !
477 bs_1 = 5303 ! !
478 anti_bs_1 = -5303 ! !
479 bc_1 = 5403 ! !
480 anti_bc_1 = -5403 ! !
481 bb_1 = 5503 ! !
482 anti_bb_1 = -5503 ! !
483 
484 # SUSY Particles names modified from /Control/AthenaCommon/PDGTABLE.MeV
485 # naming convention change
486 # '~' to 's_'
487 # '(' to '_'
488 # ')' to nothing
489 # '+' to 'plus'
490 # '' to '_'
491 # for the negatively charged particles so I add "minus" to the name and a corresponding "plus" entry with -pdg code
492 # for the neutrals I add a corresponding "anti" entry with -pdg code
493 # for the particles with positive charge entries I add a corresponding "minus" entry with -pdg code
494 # ************ (the above is not consistent with the convention that minus=particle plus=anti-particle
495 #
496 # Next remove Majorana particles and rename L-R stau to mass eigenstates.
497 #
498 # This is all ugly but sort of consistent with previous naming convention
499 
500 s_e_minus_L =1000011 ! !
501 s_e_plus_L =-1000011 ! !
502 
503 s_nu_e_L =1000012 ! !
504 s_anti_nu_e_L =-1000012 ! !
505 
506 s_mu_minus_L =1000013 ! !
507 s_mu_plus_L =-1000013 ! !
508 
509 s_nu_mu_L =1000014 ! !
510 s_anti_nu_mu_L =-1000014 ! !
511 
512 # s_tau_minus_L =1000015
513 # s_tau_plus_L =-1000015
514 
515 # L-R mixing significant use _1 and _2 for names instead
516 s_tau_minus_1 =1000015 ! !
517 s_tau_plus_1 =-1000015 ! !
518 
519 s_nu_tau_L =1000016 ! !
520 s_anti_nu_tau_L=-1000016 ! !
521 
522 s_e_minus_R =2000011 ! !
523 s_e_plus_R =-2000011 ! !
524 
525 s_mu_minus_R =2000013 ! !
526 s_mu_plus_R =-2000013 ! !
527 
528 s_tau_minus_2 =2000015 ! !
529 s_tau_plus_2 =-2000015 ! !
530 
531 s_g =1000021 ! !
532 # s_anti_g =-1000021 # Majorana
533 
534 s_chi_0_1 =1000022 ! !
535 # s_anti_chi_0_1 =-1000022 # Majorana
536 
537 s_chi_0_2 =1000023 ! !
538 # s_anti_chi_0_2 =-1000023 # Majorana
539 
540 s_chi_plus_1 =1000024 ! !
541 # Majorana
542 s_chi_minus_1 =-1000024 ! !
543 
544 s_chi_0_3 =1000025 ! !
545 # s_anti_chi_0_3 =-1000025 # Majorana
546 
547 s_chi_0_4 =1000035 ! !
548 # s_anti_chi_0_4 =-1000035 # Majorana
549 
550 s_chi_plus_2 =1000037 ! !
551 s_chi_minus_2 =-1000037 ! !
552 
553 s_G =1000039 ! !
554 # s_anti_G =-1000039 # Majorana
555 
556 # note mismatch with PDGTable and pre-existing PdtPdg.h
557 #M 999 0.E+00 +0.0E+00 -0.0E+00 Geantino 0
558 #W 999 0.E+00 +0.0E+00 -0.0E+00 Geantino 0
559 
560 # doubly charged Higgs
561 Higgs_plus_plus_L = 9900041 ! !
562 Higgs_minus_minus_L = -9900041 ! !
563 Higgs_plus_plus_R = 9900042 ! !
564 Higgs_minus_minus_R = -9900042 ! !
565 
566 
567 # Null particles
568 deuteron = 0 ! !
569 tritium = 0 ! !
570 alpha = 0 ! !
571 geantino = 0 ! !
572 He3 = 0 ! !
573 Cerenkov = 0 ! !
574 null = 0 ! !
575 
576 
577 # Some extra particles that weren't in PdgPdt.h
578 Xi_cc_plus = 4412 XI_CC+ #Xi_{cc}^{+}
579 anti_Xi_cc_minus = -4412 XI_CC- #Xi_{cc}^{-}
580 Xi_cc_plus_plus = 4422 XI_CC++ #Xi_{cc}^{++}
581 anti_Xi_cc_minus_minus = -4422 XI_CC-- #Xi_{cc}^{--}
582 Xi_cc_star_plus = 4414 XI_CC+* #Xi_{cc}^{*+}
583 anti_Xi_cc_star_minus = -4414 XI_CC-* #Xi_{cc}^{*-}
584 Xi_cc_star_plus_plus = 4424 XI_CC++* #Xi_{cc}^{*++}
585 anti_Xi_cc_star_minus_minus = -4424 XI_CC--* #Xi_{cc}^{*--}
586 Omega_cc_plus = 4432 OMEGA_CC+ #Omega_{cc}^{+}
587 anti_Omega_cc_minus = -4432 OMEGA_CC- #Omega_{cc}^{-}
588 Omega_cc_star_plus = 4434 OMEGA_CC+* #Omega_{cc}^{*+}
589 anti_Omega_cc_star_minus = -4434 OMEGA_CC-* #Omega_{cc}^{*-}
590 Omega_ccc_plus_plus = 4444 OMEGA_CCC++ #Omega_{ccc}^{++}
591 anti_Omega_ccc_minus_minus = -4444 OMEGA_CCC-- #Omega_{ccc}^{--}
592 
593 
594 # A couple extra synonyms that weren't in PdgPdt.h.
595 e = e_minus ! !
596 mu = mu_minus ! !
597 tau = tau_minus ! !
598 W = W_plus ! !
599 """
600 
601 
602 # Parse _pdgtable and fill in dictionaries.
604  pdgid_names.clear()
605  root_names.clear()
606  global _pdgtable
607  for line in _pdgtable.split ('\n'):
608  line = line.strip()
609  if len(line) == 0 or line[0] == '#':
610  continue
611  ll = line.split('=', 1)
612  if len(ll) < 2:
613  print ('bad line', line)
614  continue
615  mname = ll[0].strip()
616  ll = ll[1].split()
617  if len(ll) < 1:
618  print ('bad line', line)
619  continue
620  id = ll[0]
621  pname = None
622  if len(ll) >= 2 and ll[1] != '!':
623  pname = ll[1]
624  rname = None
625  if len(ll) >= 3 and ll[2] != '!':
626  rname = ll[2]
627  try:
628  id = int(id)
629  except ValueError:
630  id = globals().get(id)
631  if id is None:
632  print ('bad line', line)
633  continue
634 
635  if pname is None:
636  pname = mname
637  if rname is None:
638  rname = pname
639 
640  globals()[mname] = id
641  if id not in pdgid_names:
642  pdgid_names[id] = pname
643  if id not in root_names:
644  root_names[id] = rname
645  return
646 
647 # Fill the dictionaries.
648 _fill_dicts()
649 
650 # Kill these now to save memory.
651 del _pdgtable
652 del _fill_dicts
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.PDG.pdgid_to_name
def pdgid_to_name(id)
Definition: Event/PyDumper/python/PDG.py:26
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
str
Definition: BTagTrackIpAccessor.cxx:11
python.PDG.pdgid_to_root_name
def pdgid_to_root_name(id)
Definition: Event/PyDumper/python/PDG.py:35
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
python.PDG._fill_dicts
def _fill_dicts()
Definition: Event/PyDumper/python/PDG.py:603