Phase Space Description
Stateful Particles
QEDbase.AbstractParticleStateful — Type
AbstractParticleStateful <: 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 — Function
momentum(part::AbstractParticleStateful)Interface function that must return the particle's AbstractFourMomentum.
QEDbase.momentum_type — Method
QEDbase.momentum_type — Method
momentum_type(part::Type{AbstractParticleStateful})Return the type of the particle's momentum.
sourcemomentum_type(psp::Type{AbstractPhaseSpacePoint})Return the type of the stored momenta in the phase space point.
sourceQEDbase.momentum_eltype — Method
momentum_eltype(part::AbstractParticleStateful)Return the eltype of the particle's momentum type. Short for eltype(momentum_type(ps)).
QEDbase.momentum_eltype — Method
momentum_eltype(part::Type{AbstractParticleStateful})Return the eltype of the particle's momentum type. Short for eltype(momentum_type(ps)).
Phasespace Points
Types
QEDbase.AbstractPhaseSpacePoint — Type
AbstractPhaseSpacePoint{PROC, MODEL, PSL, IN_PARTICLES, OUT_PARTICLES}Representation of a point in the phase space of a process. It has several template arguments:
PROC <:AbstractProcessDefinitionMODEL <:AbstractModelDefinitionPSL <:AbstractPhaseSpaceLayoutIN_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 nthAbstractParticleStatefulof the given direction. ThrowBoundsErrorfor invalid indices.particles(psp::AbstractPhaseSpacePoint, dir::ParticleDirection): Return the particle tuple (typeIN_PARTICLESorOUT_PARTICLESdepending ondir)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 nthAbstractParticleStatefulof the given direction.momenta(psp::PhaseSpacePoint, ::ParticleDirection): Return aTupleof 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 matchincoming_particles(::PROC)in length, order, and type or be an emptyTuple.OUT_PARTICLESmust match theoutgoing_particles(::PROC)in length, order, and type, or be an emptyTuple.IN_PARTICLESandOUT_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 — Type
AbstractInPhaseSpacePointA 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 — Type
AbstractOutPhaseSpacePointA 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 — Function
process(psp::AbstractPhaseSpacePoint)Return the phase space point's set process.
See also: AbstractProcessDefinition
QEDbase.model — Function
model(psp::AbstractPhaseSpacePoint)Return the phase space point's set model.
See also: AbstractModelDefinition
QEDbase.phase_space_layout — Function
phase_space_layout(psp::AbstractPhaseSpacePoint)Return the phase space point's set phase space layout.
See also: AbstractPhaseSpaceLayout
Convenience Functions
QEDbase.particle_direction — Function
particle_direction(part::AbstractParticleStateful)Interface function that must return the particle's ParticleDirection.
QEDbase.particle_species — Function
particle_species(part::AbstractParticleStateful)Interface function that must return the particle's AbstractParticleType, e.g. QEDcore.Electron().
QEDbase.momenta — Method
momenta(psp::AbstractPhaseSpacePoint, ::ParticleDirection)Return a Tuple of all the particles' momenta for the given ParticleDirection.
QEDbase.momenta — Method
momenta(psp::AbstractPhaseSpacePoint)Return a Tuple containing all momenta, with incoming momenta listed before outgoing ones.
QEDbase.momentum_type — Method
momentum_type(psp::AbstractPhaseSpacePoint)Return the type of the stored momenta in the phase space point.
sourceQEDbase.momentum_type — Method
momentum_type(part::Type{AbstractParticleStateful})Return the type of the particle's momentum.
sourcemomentum_type(psp::Type{AbstractPhaseSpacePoint})Return the type of the stored momenta in the phase space point.
sourceQEDbase.momentum_eltype — Method
momentum_eltype(psp::AbstractPhaseSpacePoint)Short for eltype(momentum_type(psp)), i.e., returning the momentum's element type.
QEDbase.momentum_eltype — Method
momentum_eltype(psp::Type{AbstractPhaseSpacePoint})Short for eltype(momentum_type(psp)), i.e., returning the momentum's element type.