Phase Space Description
Stateful Particles
QEDbase.AbstractParticleStateful — TypeAbstractParticleStateful <: QEDbase.AbstractParticleAbstract base type for the representation of a particle with a state. It requires the following interface functions to be provided:
- particle_direction: Returning the particle's direction.
- particle_species: Returning the particle's species.
- momentum: Returning the particle's momentum.
Implementations for is_fermion, is_boson, is_particle, is_anti_particle, is_incoming, is_outgoing, mass, and charge are automatically provided using the interface functions above to fulfill the QEDbase.AbstractParticle interface.
QEDbase.momentum — Functionmomentum(part::AbstractParticleStateful)Interface function that must return the particle's AbstractFourMomentum.
QEDbase.momentum_type — Methodmomentum_type(part::AbstractParticleStateful)Return the type of the particle's momentum.
QEDbase.momentum_type — Methodmomentum_type(part::Type{AbstractParticleStateful})Return the type of the particle's momentum.
momentum_type(psp::Type{AbstractPhaseSpacePoint})Return the type of the stored momenta in the phase space point.
QEDbase.momentum_eltype — Methodmomentum_eltype(part::AbstractParticleStateful)Return the eltype of the particle's momentum type. Short for eltype(momentum_type(ps)).
QEDbase.momentum_eltype — Methodmomentum_eltype(part::Type{AbstractParticleStateful})Return the eltype of the particle's momentum type. Short for eltype(momentum_type(ps)).
Phasespace Points
Types
QEDbase.AbstractPhaseSpacePoint — TypeAbstractPhaseSpacePoint{PROC, MODEL, PSL, IN_PARTICLES, OUT_PARTICLES}Representation of a point in the phase space of a process. It has several template arguments:
- PROC <:- AbstractProcessDefinition
- MODEL <:- AbstractModelDefinition
- PSL <:- AbstractPhaseSpaceLayout
- IN_PARTICLES <:Tuple{Vararg{AbstractParticleStateful}}- : The tuple type of all the incoming [AbstractParticleStateful`](@ref)s.
- OUT_PARTICLES <:Tuple{Vararg{AbstractParticleStateful}}- : The tuple type of all the outgoing [AbstractParticleStateful`](@ref)s.
The following interface functions must be provided:
- Base.getindex(psp::AbstractPhaseSpacePoint, dir::ParticleDirection, n::Int): Return the nth- AbstractParticleStatefulof the given direction. Throw- BoundsErrorfor invalid indices.
- particles(psp::AbstractPhaseSpacePoint, dir::ParticleDirection): Return the particle tuple (type- IN_PARTICLESor- OUT_PARTICLESdepending on- dir)
- process: Return the process.
- model: Return the model.
- phase_space_layout: Return the phase space layout.
From this, the following functions are automatically derived:
- momentum(psp::AbstractPhaseSpacePoint, dir::ParticleDirection, n::Int): Return the momentum of the nth- AbstractParticleStatefulof the given direction.
- momenta(psp::PhaseSpacePoint, ::ParticleDirection): Return a- Tupleof all the momenta of the given direction.
Furthermore, an implementation of an AbstractPhaseSpacePoint has to verify on construction that it is valid, i.e., the following conditions are fulfilled:
- IN_PARTICLESmust match- incoming_particles(::PROC)in length, order, and type or be an empty- Tuple.
- OUT_PARTICLESmust match the- outgoing_particles(::PROC)in length, order, and type, or be an empty- Tuple.
- IN_PARTICLESand- OUT_PARTICLESmay not both be empty.
If IN_PARTICLES is non-empty, AbstractPhaseSpacePoint <: AbstractInPhaseSpacePoint is true. Likewise, if OUT_PARTICLES is non-empty, AbstractPhaseSpacePoint <: AbstractOutPhaseSpacePoint is true. Consequently, if both IN_PARTICLES and OUT_PARTICLES are non-empty, both <: statements are true.
QEDbase.AbstractInPhaseSpacePoint — TypeAbstractInPhaseSpacePointA partial type specialization on AbstractPhaseSpacePoint which can be used for dispatch in functions requiring only the in channel of the phase space to exist, for example implementations of _incident_flux. No restrictions are imposed on the out-channel, which may or may not exist.
See also: AbstractOutPhaseSpacePoint
QEDbase.AbstractOutPhaseSpacePoint — TypeAbstractOutPhaseSpacePointA partial type specialization on AbstractPhaseSpacePoint which can be used for dispatch in functions requiring only the out channel of the phase space to exist. No restrictions are imposed on the in-channel, which may or may not exist.
See also: AbstractInPhaseSpacePoint
Interface
QEDbase.process — Functionprocess(psp::AbstractPhaseSpacePoint)Return the phase space point's set process.
See also: AbstractProcessDefinition
QEDbase.model — Functionmodel(psp::AbstractPhaseSpacePoint)Return the phase space point's set model.
See also: AbstractModelDefinition
QEDbase.phase_space_layout — Functionphase_space_layout(psp::AbstractPhaseSpacePoint)Return the phase space point's set phase space layout.
See also: AbstractPhaseSpaceLayout
Convenience Functions
QEDbase.particle_direction — Functionparticle_direction(part::AbstractParticleStateful)Interface function that must return the particle's ParticleDirection.
QEDbase.particle_species — Functionparticle_species(part::AbstractParticleStateful)Interface function that must return the particle's AbstractParticleType, e.g. QEDcore.Electron().
QEDbase.momenta — Functionmomenta(psp::AbstractPhaseSpacePoint, ::ParticleDirection)Return a Tuple of all the particles' momenta for the given ParticleDirection.
QEDbase.momentum_type — Methodmomentum_type(psp::AbstractPhaseSpacePoint)Return the type of the stored momenta in the phase space point.
QEDbase.momentum_type — Methodmomentum_type(part::Type{AbstractParticleStateful})Return the type of the particle's momentum.
momentum_type(psp::Type{AbstractPhaseSpacePoint})Return the type of the stored momenta in the phase space point.
QEDbase.momentum_eltype — Methodmomentum_eltype(psp::AbstractPhaseSpacePoint)Short for eltype(momentum_type(psp)), i.e., returning the momentum's element type.
QEDbase.momentum_eltype — Methodmomentum_eltype(psp::Type{AbstractPhaseSpacePoint})Short for eltype(momentum_type(psp)), i.e., returning the momentum's element type.