QEDjl-project / QEDprocesses.jl

[WIP]: QEDprocesses.jl: Modeling of scattering processes for QED.jl
https://qedjl-project.github.io/QEDprocesses.jl/stable/
MIT License
1 stars 3 forks source link

Dev particle interface #8

Closed szabo137 closed 1 year ago

szabo137 commented 1 year ago

Generatities

This MR adds a Julia interface including types and functions to describe particles in the sense of the standard model of particle physics. The description is not restricted to static properties, but can in general be fulfilled by any instance of particles in general.

Furthermore, this MR contains an implementation of a type hierarchy for Bosons, Fermions, and their respective anti-particles, as well as particle types for Electrons, Positrons, and Photons. Again, the type hierarchy is not restricted to these particle types.

Particles

Abstract particle interface

In the implementation, the notion of particles is derived from an abstract type AbstractParticle and the following interface functions:

For more detailed descriptions, see the respective docstrings.

Particle type hierarchy

The abstract type AbstractParticleType <: AbstractParticle is the root type for all types of particles, where type means, that all subtypes only provide static information about a certain particle species. Beginning with AbstractParticleType, there is a hierarchy of particle types indicating if there are fermions, bosons, and their respective anti-particles. The leaves of the hierarchy tree are the concrete types for Electrons, Positrons, and Photons.

Within this MR, the particle type hierarchy looks like this:

graph TD
    A(a_AbstractParticleType) --> B1(a_FermionLike)
    B1 --> B11(a_Fermion)
    B11 --> B111(Electron)
    B1 --> B12(a_AntiFermion)
    B12 --> B121(Positron)
    B1 --> B13(a_MajoranaFermion)
    A --> B2(a_BosonLike)
    B2 --> B21(a_Boson)
    B2 --> B22(a_AntiBoson)
    B2 --> B23(a_MajoranaBoson)
    B23 --> B231(Photon)

(The leading a_ indicates that the type is abstract. This was done only here and not in the code.)

It can easily be extended by concrete types to other particles, e.g. Gluons, Higgs, W-, or Z-Bosons as well as Neutrinos, but also quasi-particles like Cooper-pairs or phonons. Except for mass and charge, inserting particle types into the hierarchy above will provide default implementations for the particle interface functions. This means the only interface functions which need to be implemented for additional particles are mass and charge. For Electron, Positron, and Photon, this is already done.) Using reasonable defaults, the particle interface can be extended, e.g. by functions like flavor, color_charge, and so on.