Skip to content

Conversation

@AlvaroEzq
Copy link
Contributor

@AlvaroEzq AlvaroEzq commented Dec 10, 2025

AlvaroEzq Medium: 141 Powered by Pull Request Badge

Differentiation between identical volumes

Changes to be able to differentiate between identical volumes. In particular there are two cases where the volumes need further filtering:

  • The Geant4 sensitive detectors are associated to logical volumes, thus all physical volumes which share the same logical volume will be sensitive volumes even when the user specifies a particular physical volume name in the configuration of the restG4 simulation.
  • The daughter physical volumes of a mother volume placed several times in the geometry have the same G4VPhysicalVolume object.

The particular physical volume where the step of the Geant4 simulation is happening, can be obtain using the G4VTouchable. This should be done for every part of the simulation where any kind of physical volume given by the user is used. These are:

  • Sensitive volumes
  • Active volumes
  • Primary generation from volume

Primary generator fixes

I also took the oportunity of this PR to fix a couple of problems with the primary generator from gdml volumes:

Important

The changes of PR rest-for-physics/geant4lib#146 are needed.

@AlvaroEzq AlvaroEzq requested a review from lobis as a code owner December 10, 2025 12:54
@AlvaroEzq AlvaroEzq marked this pull request as draft December 10, 2025 12:57
@AlvaroEzq
Copy link
Contributor Author

The last commit fixes #143

@AlvaroEzq AlvaroEzq marked this pull request as ready for review January 19, 2026 12:56
@AlvaroEzq AlvaroEzq merged commit 55df05f into master Jan 22, 2026
250 of 253 checks passed
@AlvaroEzq AlvaroEzq deleted the aezq_differentiatePV branch January 22, 2026 12:47
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

Successfully merging this pull request may close these issues.

4 participants