feat: VectorHelpers - Add generic eta method#5598
Conversation
|
| /// @param v Any type that implements a theta method | ||
| /// @return The pseudo rapidity value | ||
| template <typename T> | ||
| double eta(const T& v) noexcept |
There was a problem hiding this comment.
Hmm why not double eta(double theta), wouldn't that be even more generic?
There was a problem hiding this comment.
I was taking the phi implementation as my template here. Yeah, that would be another option
There was a problem hiding this comment.
in the best case we could have both. we have many implementations for eta -> theta and the other way flying around which could be centralized. but a scalar transformation is out of scope for vector helpers I believe
There was a problem hiding this comment.
Do we already have a central eta implementation?
There was a problem hiding this comment.
Hmm yeah make sense that its not for vector helpers. But I think code like eta(myFancyType) which internally calls myFancyType.theta() is just less transparent as eta(myFancyType.theta())...
So I don't like the phi function either I think :D
There was a problem hiding this comment.
ah we actually have a helper
acts/Core/include/Acts/Utilities/AngleHelpers.hpp
Lines 35 to 89 in 0dda19a



PLEASE DESCRIBE YOUR CHANGES.
THIS MESSAGE ENDS UP AS THE COMMIT MESSAGE.
DO NOT USE @-MENTIONS HERE!
--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat,fix,refactor,docs,choreandbuildtypes.