From 2dd7627bcfa0cc7137e635889207f12221b33404 Mon Sep 17 00:00:00 2001 From: Anton Reinhard Date: Wed, 19 Jun 2024 22:30:34 +0200 Subject: [PATCH] Update interface description --- src/diagrams/interface.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/diagrams/interface.jl b/src/diagrams/interface.jl index d0a6d13..6e4f5fa 100644 --- a/src/diagrams/interface.jl +++ b/src/diagrams/interface.jl @@ -25,14 +25,15 @@ Return the specific `QEDprocesses.AbstractProcessDefinition` which the given dia function process end """ - virtual_particles(::AbstractTreeLevelFeynmanDiagram)::NTuple{N, Tuple{QEDbase.AbstractParticleType, BitArray}} + virtual_particles(::AbstractTreeLevelFeynmanDiagram)::NTuple{N, Tuple{QEDbase.AbstractParticleType, BitArray, BitArray}} Interface function that must be implemented for an instance of [`AbstractTreeLevelFeynmanDiagram`](@ref). Return an `NTuple` with N elements, where N is the number of virtual particles in this diagram. For tree-level Feynman diagrams, \$N = k - 3\$, where \$k\$ is the number of external particles. -The elements of the `NTuple` are themselves `Tuple`s, containing for each virtual particle its `QEDbase.AbstractParticleType` and a `BitArray` (`Vector{Boolean}`) of length \$k\$, indicating -with a `1` that an external particle's momentum contributes to the virtual particle's momentum, and a `0` otherwise. Outgoing particles will contribute their momentum negatively. -From this definition follows that a particles' `BitArray` is equivalent to the inverse `BitArray`, i.e., a `BitArray` where every bit is negated. +The elements of the `NTuple` are themselves `Tuple`s, containing for each virtual particle its `QEDbase.AbstractParticleType` and a `BitArray` (`Vector{Boolean}`), indicating +with a `1` that an incoming external particle's momentum contributes to the virtual particle's momentum, and a `0` otherwise. The second BitArray does the same for the outgoing external +particles, which contribute their momentum negatively. +From this definition follows that a particles' `BitArray`s are equivalent to the inverse `BitArray`s, i.e., `BitArray`s where every bit is negated. Example: Consider the Compton scattering process \$e^- + \\gamma \\to e^- + \\gamma\$ with the diagram where the incoming electron interacts with the incoming photon first. For this diagram there is exactly one virtual particle, which is an electron. This electron's momentum can be represented as the sum of the two incoming particles' momenta, or