deltaangle() method usage #104
-
Hello developers! I wanted to thank you for developing this in Python. However, I was struggling to implement a feature while trying to follow your examples. I am not sure if this is the correct place to ask this, but let me know where this should be moved otherwise. I have been recently trying out this package but I am completely puzzled by the
The expected result would have been:
Am I just misunderstanding something fundamental? Perhaps I initialise the vector object incorectly? Is it possible to get the same result as the one that I show in ROOT with this package as well? Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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 |
Beta Was this translation helpful? Give feedback.
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: