smash-transport / sparkx

SPARKX - Software Package for Analyzing Relativistic Kinematics in Collision eXperiments
https://smash-transport.github.io/sparkx/
GNU General Public License v3.0
5 stars 0 forks source link

Sass/add mT to particle #264

Closed nilssass closed 1 month ago

nilssass commented 1 month ago

This PR adds transverse mass as a member function to Particle. Besides the general use case, we need the transverse mass for the new BulkObservables class.

nilssass commented 1 month ago

Thank you for the comment @Hendrik1704 . I will let you know as soon as the PR is ready for the second review

nilssass commented 1 month ago

@Hendrik1704 this PR is ready for a second review. I have realized that we have quite some code duplications in Filter.py Therefore I have encapsulated some tests of cutting tuples in the new function

__ensure_tuple_is_valid_else_raise_error(value_tuple, allow_none=False)

Besides that, the warning behavior of some cuts were not consistent in case of lower_cut > upper_cut. This PR solves this issue. Now, all cuts will give a warning and automatically switch the order of the cutting values.

nilssass commented 1 month ago

Are the new nan outputs of the Particle functions captured in the unit tests?

Yes, I have just added them. Once the tests are complete the PR is ready for the final review

nilssass commented 1 month ago

Great, thank you for capturing the typos :D