Skip to content

Conversation

@Saransh-cpp
Copy link
Member

@Saransh-cpp Saransh-cpp commented Mar 9, 2025

Description

Add metric, transformation and boost, and Euler angle conventions followed by vector (aligned with the ones followed in ROOT and GenVector).

See openjournals/joss-reviews#7791 (comment)

Checklist

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't any other open Pull Requests for the required change?
  • Does your submission pass pre-commit? ($ pre-commit run --all-files or $ nox -s lint)
  • Does your submission pass tests? ($ pytest or $ nox -s tests)
  • Does the documentation build with your changes? ($ cd docs; make clean; make html or $ nox -s docs)
  • Does your submission pass the doctests? ($ pytest --doctest-plus src/vector/ or $ nox -s doctests)

Before Merging

  • Summarize the commit messages into a brief review of the Pull request.

@Saransh-cpp Saransh-cpp added the docs Improvements or additions to documentation label Mar 9, 2025
@Saransh-cpp Saransh-cpp self-assigned this Mar 9, 2025
@Saransh-cpp Saransh-cpp force-pushed the saransh/update-conventions branch from d6d6b37 to d453603 Compare March 10, 2025 13:53
Copy link
Member

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Saransh-cpp - I think, it would benefit from a little bit of explanation, but it's just me :-)

docs/index.md Outdated

Names and coordinate conventions were chosen to align with [ROOT](https://root.cern/)'s [TLorentzVector](https://root.cern.ch/doc/master/classTLorentzVector.html) and [Math::LorentzVector](https://root.cern.ch/doc/master/classROOT_1_1Math_1_1LorentzVector.html), as well as [scikit-hep/math](https://github.com/scikit-hep/scikit-hep/tree/master/skhep/math), [uproot-methods TLorentzVector](https://github.com/scikit-hep/uproot3-methods/blob/master/uproot3_methods/classes/TLorentzVector.py), [henryiii/hepvector](https://github.com/henryiii/hepvector), and [coffea.nanoevents.methods.vector](https://coffea-hep.readthedocs.io/en/latest/modules/coffea.nanoevents.methods.vector.html).

Vector follows the `(-, -, -, +)` (`x, y, z, t`) metric convention for Lorentz vectors. Further, the transformations and rotations (including boosts) are active, and the Euler angle conventions align with the formalisations in the [GenVector package](https://root.cern/topical/GenVector.pdf).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, add a bit more details here?

The $(-,-,-,+)$ metric convention for Lorentz vectors corresponds to the Minkowski metric:

$g_{\mu\nu} = \text{diag}(-1, -1, -1, +1)$

For a Lorentz vector $p^\mu = (p_x, p_y, p_z, E)$, the squared norm (or invariant mass squared) is given by:

$p^\mu p_\mu = g_{\mu\nu} p^\mu p^\nu = E^2 - p_x^2 - p_y^2 - p_z^2$

This convention is widely used in high-energy physics (HEP), including frameworks such as ROOT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree and would say this for the whole paragraph: if the Euler angle conventions align, why not write them out here too (copy-paste is even fine). Just to document it standalone. But useful addition anyways!

Copy link
Member Author

@Saransh-cpp Saransh-cpp Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, @ianna and @jonas-eschle! I have added some more details in the paragraph. Let me know if it looks good! :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, looks good to me, many thanks!

@Saransh-cpp Saransh-cpp force-pushed the saransh/update-conventions branch from cc9a8bc to 8254275 Compare March 11, 2025 15:03
@Saransh-cpp
Copy link
Member Author

Merging this in!

@Saransh-cpp Saransh-cpp merged commit 5cb2237 into main Mar 14, 2025
18 checks passed
@Saransh-cpp Saransh-cpp deleted the saransh/update-conventions branch March 14, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants