fix: TGeoSurfaceConverter toRadian conversion#4428
fix: TGeoSurfaceConverter toRadian conversion#4428plariono wants to merge 4 commits intoacts-project:mainfrom
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 should substitute #4428. This should allow us for correctly wrap angles larger than 360.0 in TGeoPlugin I'm not sure we need the unit tests for this. The DD4HEP test should tell if things still fail.
This PR fixes the incorrect conversion to radians for angles > 360. in TGeoSurfaceConverter.