feynml.particle.Particle
- class feynml.particle.Particle(pdgid: int | None = None, name: str | None = None, mass: float | None = None, charge: float | None = None, spin: int | None = None, texname: str | None = None)[source]
Bases:
object
- __init__(pdgid: int | None = None, name: str | None = None, mass: float | None = None, charge: float | None = None, spin: int | None = None, texname: str | None = None) None
Methods
__init__
([pdgid, name, mass, charge, spin, ...])fromfeynmodel
(pdgid, fm)Create a Particle from a FeynModel
fromname
(name)Create a Particle from a name
frompdg
(pdgid)Create a Particle from a PDG
get_particletype
()get_type
()with_charge
(value[, k])Set charge to value and return self.
with_mass
(value[, k])Set mass to value and return self.
with_name
(value[, k])Set name to value and return self.
with_pdgid
(value[, k])Set pdgid to value and return self.
with_spin
(value[, k])Set spin to value and return self.
with_texname
(value[, k])Set texname to value and return self.
Attributes
Charge of the particle
Mass of the particle
Name of the particle
PDGID of the particle
Spin of the particle
texname
- charge: float | None = None
Charge of the particle
- static fromfeynmodel(pdgid: int, fm: FeynModel) Particle [source]
Create a Particle from a FeynModel
- mass: float | None = None
Mass of the particle
- name: str | None = None
Name of the particle
- pdgid: int | None = None
PDGID of the particle
- spin: int | None = None
Spin of the particle
- with_charge(value, k='charge')
Set charge to value and return self.
- with_mass(value, k='mass')
Set mass to value and return self.
- with_name(value, k='name')
Set name to value and return self.
- with_pdgid(value, k='pdgid')
Set pdgid to value and return self.
- with_spin(value, k='spin')
Set spin to value and return self.
- with_texname(value, k='texname')
Set texname to value and return self.