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

angles and ranges #20

Open
mmikhasenko opened this issue Oct 5, 2024 · 0 comments · May be fixed by #22
Open

angles and ranges #20

mmikhasenko opened this issue Oct 5, 2024 · 0 comments · May be fixed by #22

Comments

@mmikhasenko
Copy link
Member

Prefer using acos for polar angle, that make the angle defined in the range [0,pi]
The range matters very much in my field.

@inline function polar_angle(::XYZE, mom)
xcomp = px(mom)
ycomp = py(mom)
zcomp = pz(mom)
return if iszero(xcomp) && iszero(ycomp) && iszero(zcomp)
zero(xcomp)
else
atan(transverse_momentum(mom), zcomp)
end
end

@mmikhasenko mmikhasenko linked a pull request Oct 5, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant