feynml.pdgid.PDG
- class feynml.pdgid.PDG(id: str | None = None, pdgid: int | None = None, name: str | None = None, type: str | None = None, particle: particle.particle.particle.Particle | None = None)[source]
Bases:
Identifiable
- __init__(id: str | None = None, pdgid: int | None = None, name: str | None = None, type: str | None = None, particle: Particle | None = None) None
Methods
__init__
([id, pdgid, name, type, particle])is_anti
()Return True if the particle is an anti particle, False otherwise.
Return True if the particle is an anti fermion, False otherwise.
Return True if the particle is a fermion or anti fermion, False otherwise.
Return True if the particle is a fermion, False otherwise.
with_id
(id)set id
with_name
(value[, k])Set name to value and return self.
generate new id
with_particle
(value[, k])Set particle to value and return self.
with_pdgid
(value[, k])Set pdgid to value and return self.
with_type
(value[, k])Set type to value and return self.
Attributes
id
Name of the particle
Particle object from the particle package
PDG ID of the particle
Type of the particle, e.g.
- is_any_fermion()[source]
Return True if the particle is a fermion or anti fermion, False otherwise.
- name: str | None = None
Name of the particle
- particle: Particle | None = None
Particle object from the particle package
- pdgid: int | None = None
PDG ID of the particle
- type: str | None = None
Type of the particle, e.g. fermion, boson, etc.
- with_id(id: str)
set id
- with_name(value, k='name')
Set name to value and return self.
- with_new_id()
generate new id
- with_particle(value, k='particle')
Set particle to value and return self.
- with_pdgid(value, k='pdgid')
Set pdgid to value and return self.
- with_type(value, k='type')
Set type to value and return self.