Skip to content

deltaangle() method usage #104

Answered by jpivarski
henrikas-svidras asked this question in Q&A
Discussion options

You must be logged in to vote

Actually, you found a bug. (Delta angle is arccos of the dot product divided by both vectors' magnitudes, not just the dot product.)

There's an ongoing effort to test all of these methods against their ROOT equivalents in #36, but that isn't complete. It would have caught this error.

Meanwhile, PR #105 fixes it:

>>> v1 = vector.obj(rho=0.6728646250485578,theta=1.669565,phi=2.25748)
>>> v2 = vector.obj(rho=3.765287519203256,theta=1.907928,phi=1.784361)
>>> v1.mag
0.67616
>>> v2.mag
3.989889
>>> v1.deltaangle(v2)
0.5184948169238227

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@henrikas-svidras
Comment options

@jpivarski
Comment options

@henrikas-svidras
Comment options

Answer selected by henrikas-svidras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants