-
Notifications
You must be signed in to change notification settings - Fork 210
fix: TGeoSurfaceConverter toRadian conversion #4428
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
base: main
Are you sure you want to change the base?
fix: TGeoSurfaceConverter toRadian conversion #4428
Conversation
Plugins/Root/include/Acts/Plugins/Root/TGeoSurfaceConverter.hpp
Outdated
Show resolved
Hide resolved
The ROOT TGeo phi convention is the following:
In my case it was:
The And the Unit test @asalzburger, what exactly should it check? |
some unit tests seem to fail - any ideas @plariono @asalzburger ? |
@andiwand Might be because I forgot to run clang tidy. |
Guys @asalzburger @andiwand this looks fine on the TGeo side but not on the DD4HEP one. I have troubles debugging it bc I didn't manage to build the dd4hep plugins and unit tests on my system. Could you help with the issue please?
|
@plariono I think the underlying issue with DD4hep is the first line: the test sets up a cylinder surface that, with this PR, produces defining parameters that are outside the accepted valid range. I'm not exactly sure why that happens. The remaining errors are, I think, noise from DD4hep after the exception is thrown. |
I ran the test locally, and the phi value that's being handed over to
Ah, the DD4hep plugin calls into the TGeo surface converter for the actual surface conversion. So what happens is this:
The original function returns I imagine what we want here is to return a range between |
Thank you for the check @paulgessinger. Yes, we need to return the So I added a new method to calculate the halfPhi and avgPhi using the degree input which returns the average |
@plariono I don't see a change in the DD4hep unit test unfortunately. I think the issue remains that 360 deg is mapped to 0 deg, which |
@paulgessinger I see, thanks. Maybe it should be defined according to the |
Will be superseded. |
This PR fixes the incorrect conversion to radians for angles > 360. in TGeoSurfaceConverter.