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

Refactor: FourMomentum interface #92

Open
szabo137 opened this issue Mar 26, 2024 · 2 comments
Open

Refactor: FourMomentum interface #92

szabo137 opened this issue Mar 26, 2024 · 2 comments
Labels
05 - Enhancement Improvements of existing code

Comments

@szabo137
Copy link
Member

Using traits to define the Lorentz vector interface seems to limit the implementation just to cartesian coordinates. One solution could be a simplified interface, maybe just for four-momenta. A prototype for such a interface is given in https://github.com/szabo137/FourMomentumBase.jl/pull/4

@szabo137 szabo137 added the 05 - Enhancement Improvements of existing code label Mar 26, 2024
@szabo137
Copy link
Member Author

Update: As discussed in several issues and offline, the interface for Lorentz vectors especially four-momenta needs a facelift. Therefore, I propose to refactor the interface entirely.

Suggested solution

As mentioned above, in https://github.com/szabo137/FourMomentumBase.jl I implemented a possible interface for four-momenta, which makes use of Julia capabilities for generic implementations, and provides the possibility to register any four-momentum type for a given coordinate system. Once registered, a set of common accessor functions are implemented for the respective momentum type. This should unify the API for four-momenta (and probably Lorentz vectors as well).

I suggest leaving the four-momentum interface in a separate package but moving it from my private account to a more appropriate place. The JuliaHEP organization could be suitable. However, since QEDbase should provide every interface within the QED.jl ecosystem, I propose to make FourMomentumBase a dependency of QEDbase.jl and reexport all types and functions. This avoids too many imports in the downstream packages.

The actual implementation of four-momenta (e.g. SFourMomentum) should be moved to QEDcore.

@szabo137 szabo137 changed the title simplify FourMomentum interface Refactor: FourMomentum interface Jun 18, 2024
@szabo137
Copy link
Member Author

Related issues: QEDjl-project/QEDbase.jl#24 #93

@szabo137 szabo137 mentioned this issue Jun 18, 2024
9 tasks
@szabo137 szabo137 transferred this issue from QEDjl-project/QEDbase.jl Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 - Enhancement Improvements of existing code
Projects
None yet
Development

No branches or pull requests

1 participant