Skip to content

Refactor AdePT into 2 libraries 3: Remove AdePTGeant4Integration dependency from AdePTTransport initialization#519

Merged
SeverinDiederichs merged 5 commits intoapt-sim:masterfrom
SeverinDiederichs:remove_integration_dependency_in_AdePTTransport
Mar 18, 2026
Merged

Refactor AdePT into 2 libraries 3: Remove AdePTGeant4Integration dependency from AdePTTransport initialization#519
SeverinDiederichs merged 5 commits intoapt-sim:masterfrom
SeverinDiederichs:remove_integration_dependency_in_AdePTTransport

Conversation

@SeverinDiederichs
Copy link
Collaborator

This PR belongs the the refactor of AdePT described in #516.
It is based on #518 and should not be reviewed before that one is merged.

This PR factors out all host-side initializations that were done in the AdePTTransport. Now, they are done in the AdePTTrackingManager (in a separate function). This way, the AdePTTransport does not depend on the AdePTGeant4Integration anymore in the initialization (it still does in the Flush and subsequently in the ProcessGPUSteps).

This cleans up quite a few interfaces and only the G4HepEm config needs to be passed, not the full tracking manager anymore.

There is still a split of host data init - init on device - finalization of host data init - finalization of device data init, which is caused by the dependency of the g4hepem state for the finalization of the host data init.

This will be cleaned next.

It was verified that this PR

  • Changes physics results
  • Does not change physics results

@SeverinDiederichs SeverinDiederichs added the cleaning improves code clarity, readability or other label Mar 18, 2026
@phsft-bot
Copy link

Can one of the admins verify this patch?

@SeverinDiederichs SeverinDiederichs changed the title Remove AdePTGeant4Integration dependency from AdePTTransport Remove AdePTGeant4Integration dependency from AdePTTransport initialization Mar 18, 2026
@SeverinDiederichs SeverinDiederichs force-pushed the remove_integration_dependency_in_AdePTTransport branch from 887e748 to c3015ff Compare March 18, 2026 12:47
Copy link
Contributor

@agheata agheata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup!

@SeverinDiederichs SeverinDiederichs merged commit 0010842 into apt-sim:master Mar 18, 2026
3 of 4 checks passed
@SeverinDiederichs SeverinDiederichs deleted the remove_integration_dependency_in_AdePTTransport branch March 18, 2026 12:54
@SeverinDiederichs SeverinDiederichs changed the title Remove AdePTGeant4Integration dependency from AdePTTransport initialization Refactor AdePT into 2 libraries 3: Remove AdePTGeant4Integration dependency from AdePTTransport initialization Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning improves code clarity, readability or other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants