2 """ Class for holding particle data such as charge. 11 """ Class for generic handling particle ids, names and properties. 13 Multiple ids can be mapped to multiple names of particle. 14 First name/id in the list is the default name. But additional names/ids can be given. 15 An examples can be found in the defaultParticleDataList. 18 """ A list of particle ids and names can be given to the constructor. 31 """ Add a paricle with (multiple) ids and names to the list. 33 if not (isinstance(ids,list)
and isinstance(names,list)):
34 raise TypeError(
"addParticle needs to lists as input: e.g. [1,-1],['d','dbar']")
35 self.
_list += [(ids, names, particleData)]
38 """ Return the default (first in list) name given any of the particle's names. 40 for items
in self.
_list:
46 """ Return the default (first in list) id given any of the particle's ids. 48 for items
in self.
_list:
54 """ Return the default (first in list) id given any of the particle's names. 56 for items
in self.
_list:
62 """ Return the default (first in list) name given any of the particle's ids. 64 for items
in self.
_list:
70 for items
in self.
_list:
75 return abs(id)
in [1, 2, 3, 4, 5, 6]
78 return abs(id)
in [11, 12, 13, 14, 15, 16]
81 return abs(id)
in [21, 9]
84 return abs(id)
in [21, 9, 22, 23, 24, 25, 32, 33, 34, 35, 36, 37]
90 return abs(id)
in [25, 35, 36, 37]
93 return abs(id)
in [1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000011, 1000012, 1000013, 1000014, 1000015, 1000016, 2000001, 2000002, 2000003, 2000004, 2000005, 2000006, 2000011, 2000013, 1000021, 1000022, 1000023, 1000024, 1000025, 1000035, 1000037, 1000039]
96 ([1, - 1], [
"d",
"d_quark",
"dbar"],
ParticleData(1.0/3.0)),
97 ([2, - 2], [
"u", "u_quark", "ubar"], ParticleData(2.0/3.0)),
98 ([3, - 3], [
"s",
"s_quark",
"sbar"],
ParticleData(1.0/3.0)),
99 ([4, - 4], [
"c",
"c_quark",
"cbar"],
ParticleData(2.0/3.0)),
100 ([5, - 5], [
"b",
"b_quark",
"bbar"],
ParticleData(1.0/3.0)),
101 ([6, - 6], [
"t",
"t_quark",
"tbar"],
ParticleData(2.0/3.0))
105 ([11, - 11], [
"e",
"electron",
"Electron",
"e+",
"e-"],
ParticleData(1)),
106 ([12, - 12], [
"nu_e",
"Electron_neutrino",
"electron_neutrino",
"nu_electron"],
ParticleData(0)),
107 ([13, - 13], [
"mu",
"Muon",
"muon",
"mu+",
"mu-"],
ParticleData(1)),
108 ([14, - 14], [
"nu_mu",
"nu_muon",
"Muon_neutrino",
"muon_neutrino"],
ParticleData(0)),
109 ([15, - 15], [
"tau",
"Tau",
"tau+",
"tau-"],
ParticleData(1)),
110 ([16, - 16], [
"nu_tau",
"Tau_neutrino",
"tau_neutrino"],
ParticleData(0))
117 ([24, - 24], [
"W",
"W_boson",
"W+",
"W-"],
ParticleData(1)),
118 ([25], [
"h",
"Higgs_boson",
"Higgs",
"higgs_boson"],
ParticleData(0))
144 ([34, - 34], [
"W'",
"W_prime",
"W'+",
"W'-"],
ParticleData(1)),
145 ([37, - 37], [
"H+",
"Charged_Higgs",
"H+",
"H-"],
ParticleData(1)),
146 ([35], [
"H0",
"Neutral_Higgs_H",
"H"],
ParticleData(0)),
151 ([1000001, - 1000001], [
"d_squark_L",
"d~_L",
"d~_L_bar"],
ParticleData(1.0/3.0)),
152 ([1000002, - 1000002], [
"u_squark_L",
"u~_L",
"u~_L_bar"],
ParticleData(2.0/3.0)),
153 ([1000003, - 1000003], [
"s_squark_L",
"s~_L",
"s~_L_bar"],
ParticleData(1.0/3.0)),
154 ([1000004, - 1000004], [
"c_squark_L",
"c~_L",
"c~_L_bar"],
ParticleData(2.0/3.0)),
155 ([1000005, - 1000005], [
"sbottom_L",
"b~_1",
"b~_1_bar"],
ParticleData(1.0/3.0)),
156 ([1000006, - 1000006], [
"stop_L",
"t~_1",
"t~_1_bar"],
ParticleData(2.0/3.0)),
158 ([1000011, - 1000011], [
"Selectron_L",
"selectron_L",
"e~_L",
"e~_L+",
"e~_L-"],
ParticleData(1)),
159 ([1000012, - 1000012], [
"Electron_sneutrino",
"electron_sneutrino",
"nu~_e_L"],
ParticleData(0)),
160 ([1000013, - 1000013], [
"Smuon_L",
"smuon_L",
"mu~_L",
"mu~_L+",
"mu~_L-"],
ParticleData(1)),
161 ([1000014, - 1000014], [
"Muon_sneutrino",
"muon_sneutrino",
"nu~_mu_L"],
ParticleData(0)),
162 ([1000015, - 1000015], [
"Stau_1",
"stau_1",
"tau~_1+",
"tau~_1-"],
ParticleData(1)),
163 ([1000016, - 1000016], [
"Tau_sneutrino",
"tau_sneutrino",
"nu~_tau_L"],
ParticleData(0)),
165 ([2000001, - 2000001], [
"d_squark_R",
"d~_L",
"d~_L_bar"],
ParticleData(1.0/3.0)),
166 ([2000002, - 2000002], [
"u_squark_R",
"u~_L",
"u~_L_bar"],
ParticleData(2.0/3.0)),
167 ([2000003, - 2000003], [
"s_squark_R",
"s~_L",
"s~_L_bar"],
ParticleData(1.0/3.0)),
168 ([2000004, - 2000004], [
"c_squark_R",
"c~_L",
"c~_L_bar"],
ParticleData(2.0/3.0)),
169 ([2000005, - 2000005], [
"sbottom_R",
"b~_2",
"b~_2_bar"],
ParticleData(1.0/3.0)),
170 ([2000006, - 2000006], [
"stop_R",
"t~_2",
"t~_2_bar"],
ParticleData(2.0/3.0)),
172 ([2000011, - 2000011], [
"Selectron_R",
"selectron_R",
"e~_R",
"e~_R+",
"e~_R-"],
ParticleData(1)),
173 ([1000013, - 1000013], [
"Smuon_R",
"smuon_R",
"mu~_L",
"mu~_R+",
"mu~_R-"],
ParticleData(1)),
174 ([1000015, - 1000015], [
"Stau_2",
"stau_2",
"tau~_2+",
"tau~_2 -"],
ParticleData(1)),
176 ([1000021], [
"Gluino",
"gluino",
"g~"],
ParticleData(0)),
177 ([1000022, - 1000022], [
"Neutralino_1",
"neutralino_1",
"chi~_1"],
ParticleData(0)),
178 ([1000023, - 1000023], [
"Neutralino_2",
"neutralino_2",
"chi~_2"],
ParticleData(0)),
179 ([1000025, - 1000025], [
"Neutralino_3",
"neutralino_3",
"chi~_3"],
ParticleData(0)),
180 ([1000035, - 1000035], [
"Neutralino_4",
"neutralino4",
"chi~_4"],
ParticleData(0)),
182 ([1000024, - 1000024], [
"Chargino_1",
"chargino_1",
"chi~_1+",
"chi~_1-"],
ParticleData(1)),
183 ([1000037, - 1000037], [
"Chargino_2",
"chargino_2",
"chi~_2+",
"chi~_2-"],
ParticleData(1)),
185 ([1000039], [
"Gravitino",
"gravitino",
"G"],
ParticleData(0))
189 defaultQuarkDataList.getList() +
190 defaultLeptonDataList.getList() +
191 defaultBosonDataList.getList() +
192 defaultHadronDataList.getList() +
193 defaultExtensionDataList.getList() +
194 defaultSusyDataList.getList())
197 ([1, - 1, 2, - 2, 3, - 3, 4, - 4, 21, 9], [
"parton",
"d",
"dbar",
"u", "ubar", "s", "sbar", "c", "cbar", "b", "bbar", "t", "tbar", "gluon", "g"], ParticleData())
199 defaultLeptonDataList.getList() + [
202 ([24, - 24], [
"W",
"W_boson",
"W+",
"W-"],
ParticleData(1)),
203 ([25], [
"h",
"Higgs_boson",
"Higgs",
"higgs_boson"],
ParticleData(1))
def getParticleDataFromId(self, id)
def addParticle(self, ids, names, particleData)
def __init__(self, charge=0)
def getIdFromName(self, name)
Abs< T >::type abs(const T &t)
def getDefaultId(self, id)
def getNameFromId(self, id)
def __init__(self, list=None)
def getDefaultName(self, name)