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