Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for PhaseSpacePoint improvement #63

Merged
merged 24 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
70ce920
updated tests for process interface
May 16, 2024
6baf36c
updated docstrings describing the process interface
May 16, 2024
ae0f18e
formatting
May 16, 2024
f9705ae
opt out the evaluation of cross sections and probabilities on sets of…
May 16, 2024
24e49b2
formatting
May 16, 2024
69593f2
updated diffCS and diffProb to PSPs, removed old interface, updated t…
May 16, 2024
dff0d20
updated perturbative Compton to PSPs
May 16, 2024
62c430d
formatting
May 16, 2024
63c3ec6
cleanup tests for cross sections and probabilities; formatting
May 16, 2024
7e78c2b
Apply suggestions from code review
szabo137 May 21, 2024
94a560c
Improve type info for PS
AntonReinhard May 18, 2024
f2b646c
Move generate_phasespacepoint into constructor
AntonReinhard May 18, 2024
a00d35b
Improve performance with type magic
AntonReinhard May 19, 2024
7a1fa95
EOD
May 19, 2024
1010dae
Improve type checking with even more type magic and fix (some) tests
AntonReinhard May 20, 2024
2cf05e6
Fix last type instability in psp construction from momenta
AntonReinhard May 20, 2024
11250f3
Rebase fix
AntonReinhard May 21, 2024
6deedcc
Add (possibly temporary) fix for tests
AntonReinhard May 21, 2024
3b479ab
Fix doctests
AntonReinhard May 21, 2024
a3ed261
Remove unused functions
AntonReinhard May 21, 2024
aaab777
Make pretty print tests prettier
AntonReinhard May 21, 2024
c7692ee
Tentative merge remote-tracking branch 'Uwe/update-diffCS-interface' …
May 21, 2024
6da8127
Merge remote-tracking branch 'QED/dev' into 58-ps-improve
May 21, 2024
179fb0b
Review changes
AntonReinhard May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/QEDprocesses.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export AbstractCoordinateSystem, SphericalCoordinateSystem
export AbstractFrameOfReference, CenterOfMomentumFrame, ElectronRestFrame
export AbstractPhasespaceDefinition, PhasespaceDefinition
export ParticleStateful, PhaseSpacePoint
export spin, polarization, particle_direction, particle_species, momentum, getindex
export generate_phase_space
export spin, polarization, particle_direction, particle_species, momentum, momenta, getindex

# specific compute models
export PerturbativeQED
Expand Down
2 changes: 1 addition & 1 deletion src/cross_section/diff_cross_section.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
########################

function _incident_flux(psp::PhaseSpacePoint)
return _incident_flux(psp.proc, psp.model, momentum.(psp.in_particles))
return _incident_flux(psp.proc, psp.model, momenta(psp, Incoming()))
end

"""
Expand Down
16 changes: 4 additions & 12 deletions src/cross_section/internal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ function _unsafe_differential_probability(
in_phase_space::AbstractVector{T},
out_phase_space::AbstractVector{T},
) where {T<:QEDbase.AbstractFourMomentum}
psp = generate_phase_space(
proc, model, phase_space_def, in_phase_space, out_phase_space
)
psp = PhaseSpacePoint(proc, model, phase_space_def, in_phase_space, out_phase_space)
return unsafe_differential_probability(psp)
end

Expand Down Expand Up @@ -45,9 +43,7 @@ function _differential_probability(
in_phase_space::AbstractVector{T},
out_phase_space::AbstractVector{T},
) where {T<:QEDbase.AbstractFourMomentum}
psp = generate_phase_space(
proc, model, phase_space_def, in_phase_space, out_phase_space
)
psp = PhaseSpacePoint(proc, model, phase_space_def, in_phase_space, out_phase_space)
return differential_probability(psp)
end

Expand Down Expand Up @@ -79,9 +75,7 @@ function _unsafe_differential_cross_section(
in_phase_space::AbstractVector{T},
out_phase_space::AbstractVector{T},
) where {T<:QEDbase.AbstractFourMomentum}
psp = generate_phase_space(
proc, model, phase_space_def, in_phase_space, out_phase_space
)
psp = PhaseSpacePoint(proc, model, phase_space_def, in_phase_space, out_phase_space)
return unsafe_differential_cross_section(psp)
end

Expand Down Expand Up @@ -114,9 +108,7 @@ function _differential_cross_section(
in_phase_space::AbstractVector{T},
out_phase_space::AbstractVector{T},
) where {T<:QEDbase.AbstractFourMomentum}
psp = generate_phase_space(
proc, model, phase_space_def, in_phase_space, out_phase_space
)
psp = PhaseSpacePoint(proc, model, phase_space_def, in_phase_space, out_phase_space)
return differential_cross_section(psp)
end

Expand Down
2 changes: 0 additions & 2 deletions src/interfaces/process_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function _phase_space_factor end
#######################

"""

number_incoming_particles(proc_def::AbstractProcessDefinition)

Return the number of incoming particles of a given process.
Expand All @@ -150,7 +149,6 @@ Return the number of incoming particles of a given process.
end

"""

number_outgoing_particles(proc_def::AbstractProcessDefinition)

Return the number of outgoing particles of a given process.
Expand Down
Loading
Loading