Skip to content
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

Need registry for make_hpge #65

Closed
tdixon97 opened this issue Feb 2, 2025 · 3 comments
Closed

Need registry for make_hpge #65

tdixon97 opened this issue Feb 2, 2025 · 3 comments

Comments

@tdixon97
Copy link
Contributor

tdixon97 commented Feb 2, 2025

We always need to supply a registery for make_hpge and you get errors if you make the same HPGe twice. This is a bit annoying when you want to access just some methods of HPGe not use it in geometry. Maybe we could make this optional?

@gipert
Copy link
Member

gipert commented Feb 3, 2025

#61

@ManuelHu
Copy link
Collaborator

ManuelHu commented Feb 3, 2025

In the past, the registry parameter was optional.

And it (sadly) created quite some problems, when using those objects with no registry in a full geometry. Mainly it skipped duplicate-name checks, which could lead to objects being skipped while being written out to GDML - whithout warning or error message. This is a limitation of how pyg4ometry works internally.

The option I implemented back then is to require an explicit registry=None parameter to ensure the user is aware what they are doing. I do not have a better idea how to fulfill this requirement in any other way.

for reference: #59, #60, #61, g4edge/pyg4ometry#216

@tdixon97
Copy link
Contributor Author

tdixon97 commented Feb 3, 2025

Sorry I forgot the option to pass None this should be totally ok for reboost so we can close this

@ManuelHu ManuelHu closed this as completed Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants