-
Notifications
You must be signed in to change notification settings - Fork 168
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: Bind some Gen1 geometry building functionality to python #3448
feat: Bind some Gen1 geometry building functionality to python #3448
Conversation
Examples/Io/Root/include/ActsExamples/Io/Root/RootPropagationStepsWriter.hpp
Outdated
Show resolved
Hide resolved
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.
Sorry to push back on this a little bit, but I don't think we should substantially increase the amount of Core API surface that we expose to python, and then implement logic that can be implemented in C++ in python instead.
The python bindings are supposed to steer the examples, and help with configuration, not contain sophisticated logic and algorithms.
Aside from this, I see a number of unrelated changes, that should be broken out into one or more separate PRs, in my opinion.
Can we hold this until Thursday so we can discuss how to proceed with this? |
Unfortunately I won't be there on thursday, and also not in the first week of August. But maybe we can resolve this online... Regarding the question if it at all should be in python and cannot be in C++: I think that adding bindings to a few building structures does not substentially increase the API surface, and is well justified in that case: I don't think its good to have details like regex parsing of ITK database strings, number of layers, radii of volumes etc. in C++ rather then in a python script. I think the chosen approach is actually quite in the spirit of having configuration logic in python, and generic functionality in C++. In todays standup meeting we also clarified, that the build script itself will not become part of the ACTS repository, but rather the ITk repository where also the database is located. Also from this perspective I think a python script is favourable over a C++-compiled version of the geometry building. |
For the record: build script has been removed, unrelated/propagation related changes have been reverted |
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.
@benjaminhuth Sure.
Mainly I'm concerned with creating volume bounds and tracking volumes directly in Python, and doing any of the sizing calculations in Python.
Especially the latter clearly deviates from configuration over calculation. If that's outside the repository and hence specific to the ITk test, I'm ok with that.
If you ask me, I would suggest to find a way to put the sizing logic into C++ with some form of configuration at the boundary and bind that to Python.
I think the main difference here in our approach is that I only aime for "making it work until NextGen Geometry is ready", so the approach was never to port the full flexibility of Gen1 geometry building to python. I don't think we open the box of pandora with that. I think it would be far from straight forward to do a generic C++ sizing logic for Gen1 geometry (I think that is done in the In my opinion it is be okay to have incomplete and inconsistent bindings for this for the time being, just make things work in this geometry transistion phase that will be anyways a bit unpleasent... |
I see your point. But to some degree the thing is that yes, the sizing logic it possibly non-trivial, I wrote the code to do that in Athena for the Gen1 ACTS geometry.
Correct, the interfaces were meant to be used in experiment specific code to write geometry construction. The dd4hep and TGeo plugins achieve this through configuration, which is necessary because we ship them as plugins. GeoModel is a bit different because it's only used by ATLAS, but I don't think we should ship a plugin that's "GeoModel, but only for ITk kind of". Now, with the Python building code gone from the repository, I don't have fundamental objections against the rest of this PR. I would still encourage evaluating the code that we do put in, so that it makes sense, and is not just whatever needed to be added to get something done. |
@paulgessinger @andiwand I changed the PR as follows:
Is this good to go in from your perspective? |
I think I addressed your comments, can you have a look again @paulgessinger ? |
Co-authored-by: Paul Gessinger <[email protected]>
Quality Gate failedFailed conditions |
Merging this manually. |
Gen1 Geometry building ist better than its reputation, if you bind it to python. Was used to build ITk from GeoModel.
Necessary changes to the GeoModel Plugin will come in a subsequent PR, the script that actually builds the ITk won't live in the ACTS repository.