Skip to content

overlap safety call in MSC with relocation - #688

Open
SeverinDiederichs wants to merge 1 commit into
apt-sim:masterfrom
SeverinDiederichs:overlap_MSC_safety_with_Relocation
Open

overlap safety call in MSC with relocation#688
SeverinDiederichs wants to merge 1 commit into
apt-sim:masterfrom
SeverinDiederichs:overlap_MSC_safety_with_Relocation

Conversation

@SeverinDiederichs

Copy link
Copy Markdown
Collaborator

Previously, in the split kernels, the ElectronMSC did the PerformContinuous call to G4HepEm and then the displacement. In case there is no safety left, the displacement involved the expensive ComputeSafety call. As this does not happen if the particle is on boundary (since it skips displacement on boundary), the displacement gives some divergence.

This can be avoided:

Instead, the Displacement and ComputeSafety calls can be moved to the SetupElectronInteraction kernel. Then, at the end of ElectronMSC, the particles are either enqueued directly to the Relocation kernel or to the SetupElectronInteractions. Then, the geometry calls in Relocation can overlap with the geometry call in ComputeSafety in the SetupElectronInteractions.

This PR gives identical results to the current master branch, performance still need to be tested in detail.

@phsft-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

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.

2 participants