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

Support for "assembly" in Gdml geometries #3

Closed
lobis opened this issue Mar 21, 2021 · 4 comments
Closed

Support for "assembly" in Gdml geometries #3

lobis opened this issue Mar 21, 2021 · 4 comments
Assignees

Comments

@lobis
Copy link
Member

lobis commented Mar 21, 2021

As far as I know, until now we had been considering only Gdml geometries which were one level deep in the world, or what is the same, didn't have Gdml assemblies. Gdml assembly is a feature I wasn't aware of until recently were you can group different groups of physical volumes into one making it easier to place and rotate the volume. Also in the root event viewer, you can see a hierarchy of volumes, and can turn on/off visualization for the whole assembly as you can see on the image below.
image

You can explore one geometry defined this way in: https://lfna.unizar.es/iaxo/iaxo-geometry/-/blob/555ac3a2210cf2469dbb4539195ecbdec2a42d8d/BabyIAXO/experimental/Setup.gdml.

I think using assemblies is the most efficient way to manage complex geometries, however it makes the geometry more complex, now its not just a flat list of volumes that you can iterate. This brings additional problems. One such problem that happens when you try to launch a simulation in the geometry I just linked, is that restG4 does not find the gas volume, since its not defined at the root level, but its under the Chamber assembly. This issue has an easy fix but I am sure we would need to modify many other things in geant4lib, and perhaps the framework, in order to fully support assemblies.

@jgalan
Copy link
Member

jgalan commented Mar 21, 2021

In a first guess, I imagine this issue is more connected with restG4, so I move the issue to restG4 repository.

The only way it might affect to geant4lib is in how we will define the volumes. I guess we could just accept a new nomenclature for volume identification. Such as Chamber/gas to identify the gas volume within the Chamber volume. This nomenclature could be probably absorbed by restG4 while we store in TRestGeant4Metadata the full string Chamber/gas.

Regarding the framework, I dont see how the framework will be connected to this issue. The only connection of the framework with geometries is through the ROOT object TGeoManager, or TRestGDMLParser.

@jgalan jgalan transferred this issue from rest-for-physics/geant4lib Mar 21, 2021
@lobis lobis self-assigned this Mar 26, 2021
lobis added a commit that referenced this issue Mar 26, 2021
lobis added a commit that referenced this issue Mar 27, 2021
…ry to associate unequivocally a logical volume to a physical volume. This is a workaround for assembly support (#3).
lobis added a commit that referenced this issue Mar 28, 2021
@lobis
Copy link
Member Author

lobis commented Mar 29, 2021

One additional problem I just noticed is that the names generated for the physical volumes (e.g. assembly-82.scintillatorVolume-800.0mm-0 contain the - and won't be properly processed by root as tree branch names. For example assembly-82.scintillatorVolume-800.0mm-0VolumeEDep will give an error, at least when opening the tree with the TBrowser, as it tries to compute the numerical expresion from the -.

@lobis
Copy link
Member Author

lobis commented Jun 27, 2021

@lobis
Copy link
Member Author

lobis commented Mar 6, 2022

This PR #30 partially solves this. However I detected a bug in previous Geant4 version (current "official" REST Geant4 version) which makes this impossible to fix. This is solved in more recent versions such as 11.0.0

@lobis lobis closed this as completed Mar 9, 2022
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

2 participants