-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update process interface interface #59
Update process interface interface #59
Conversation
@AntonReinhard I think this is ready for review. You are right, deleting lots of code is a lot of fun 😆 BTW: In contrast to #57 the functions |
That makes sense. I think it would be nice to have an I think there are a few options to consider:
const IncomingPSP = PhaseSpacePoint{PROC, MODEL, PSDEF, PSELT, IN_P, 0} where {PROC, MODEL, PSDEF, PSELT, IN_P}
const OutgoingPSP = PhaseSpacePoint{PROC, MODEL, PSDEF, PSELT, 0, OUT_P} where {PROC, MODEL, PSDEF, PSELT, OUT_P} There might be more ideas, but these two came to mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can definitely see your point with the IncomingPhaseSpacePoint
being necessary, there are still way too many functions now that are defined on momenta instead of PSPs now, which propagates through a lot of code. I think the real goal is to have all the public-facing functions defined on (I/O)PSPs.
Together with #49, that should get rid of a lot of boilerplate code again. The solution to that issue is likely to just create constructors for the PSP on Reals/SFMs or any other representation. Then there should be no reason for anything to use flat momenta instead of PSPs. It should also make it simple enough for the user to broadcast functions that it's not really necessary to provide those overloads ourselves.
Understood! I agree that having two distinct types for incoming and outgoing phase spaces adds some duplications and boilerplate code. |
Co-authored-by: Anton Reinhard <[email protected]>
Since we have all the information in the type info now, it should be enough to dispatch on |
Proposal for a rework of the PhaseSpacePoint, according to Issue #58 I did a lot of type magic with recursive variadic templates to find out type information and get functions perfectly type stable. Constructing phase space points is now always type stable and takes a maximum of ~11ns for me when constructing from momenta. Some of the tests are failing for now because some of the interfaces currently don't expect tuples from the PSP implementation. It might make sense to fix this in #59 --------- Co-authored-by: Uwe Hernandez Acosta <[email protected]> Co-authored-by: Uwe Hernandez Acosta <[email protected]> Co-authored-by: AntonReinhard <[email protected]>
With this, we update the process and cross-section interface to adopt the new phase space points. This solved #57.
TODOs