-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat!: (fix + chore) streamline nSegments usage #3419
feat!: (fix + chore) streamline nSegments usage #3419
Conversation
d15136a
to
863cc15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you avoid the physmon output changes? This should not affect the reconstruction at all should it?
I was wondering generally: wouldn't we be able to get rid of manual passing of segments if we just define a maximum arc length |
I suppose that we get a slightly different bin association for one or another surface now ... hence the fluctuation in the output. |
@asalzburger Is this because we use it for the auto-binning in the Gen1 layer building? |
That's a possibility, however:
For latter (in many cases) a choice of For displaying, however, this newly implemented schema - where the number of segments is given per quarter (and drives the vertex generation) will guarantee that attaching surfaces (even with different phi sector openings) will have vertices at the same points in space and hence will "look attaching". That's why I changed to this schema. |
That is my assumption, I will try to dig down a bit on this - I was surprised as well .... |
@asalzburger Do we need the extent building from cartesian vertices if we switch to local sizing in Gen3 and potentially reconsider the global root volume finders? Maybe something we can discuss going forward, since relying on the approximation seems a bit fragile to me. |
there is a small build issue @paulgessinger
|
@andiwand meh, I thought that was because of the merge conflict. I'll fix it. |
@andiwand Compile fixes should be in now. |
@paulgessinger can you also approve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go from my side.
Quality Gate passedIssues Measures |
The generation of display vertices for segments was buggy and very unstable, I have put this onto more solid grounds, which helps displaying (not only)
AnnulusBounds
correctly.ITk Petal Before:
ITk Petal After:
When checking the code, I see that there was a pretty big inconsistency in how the nSegments have been handled, so I re-worked that:
nSegments
(full 2 * PI segments) -> changed and renamed toquaterSegments
This guarantees that the number of segments for a full circle is a multiplier of 4 and hence the phi extrema points at
(-pi,-0.5*pi,0,0.5*pi,pi)
are consistently added. This will lead to a correctx
andy
estimation for theExtent
of thePolyhedron
.This also guarantees that e.g. overlapping/attaching surfaces with the same number of segments will have vertices at the same positions, which will be better for the displaying.
inconsitent use of
unsigned int
(SurfaceBounds) andstd::size_t
-> changed to `unsigned int everywhereIntroduces tests for the vertex generation (which were missing)