Skip to content

Fix PhaseSpaceActor scoring in nested attached volumes#975

Open
nkrah wants to merge 3 commits intomasterfrom
phasespaceactor-volume-hierarchy
Open

Fix PhaseSpaceActor scoring in nested attached volumes#975
nkrah wants to merge 3 commits intomasterfrom
phasespaceactor-volume-hierarchy

Conversation

@nkrah
Copy link
Copy Markdown
Collaborator

@nkrah nkrah commented Mar 28, 2026

Summary:

  • add a GateVActor helper to detect whether a step occurs in the top attached volume rather than a daughter
  • use that helper in GatePhaseSpaceActor to ignore subtree-triggered internal surface crossings

Motivation:
PhaseSpaceActor is attached to a single volume in GATE, but the underlying sensitive detector registration is recursive over the attached volume hierarchy. This can lead to surprising extra phase-space entries when daughter volumes are crossed.

Changes:

  • add GateVActor::IsStepInTopAttachedVolume(const G4Step*)
  • early-return in GatePhaseSpaceActor::SteppingAction() unless the step is in the top attached volume

Notes:

  • this keeps the framework helper isolated from the actor behavior change in two separate commits
  • it does not change recursive SD registration globally; it only tightens PhaseSpaceActor behavior

@tbaudier
Copy link
Copy Markdown
Contributor

Hello @nkrah
I think your PR modify the behavior of the test: geometry/test058_iec_six_spheres.py

@dsarrut dsarrut requested a review from tbaudier April 14, 2026 13:53
@dsarrut dsarrut added the bug Something isn't working label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants