Skip to content

Refactor AdePT into 2 libraries 2: Pass B field directly to AdePTTransport#518

Merged
SeverinDiederichs merged 1 commit intoapt-sim:masterfrom
SeverinDiederichs:remove_Bfield_depend_in_AdePTTransport
Mar 18, 2026
Merged

Refactor AdePT into 2 libraries 2: Pass B field directly to AdePTTransport#518
SeverinDiederichs merged 1 commit intoapt-sim:masterfrom
SeverinDiederichs:remove_Bfield_depend_in_AdePTTransport

Conversation

@SeverinDiederichs
Copy link
Collaborator

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

In this PR, the B field is passed directly to the AdePTTransport, such that it does not rely on the AdePTGeant4Integration to get the B field value. In the end, the goal is to not pass the AdePTGeant4Integration to AdePTTransport, to be able to separate the libraries.

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 force-pushed the remove_Bfield_depend_in_AdePTTransport branch from ba808e4 to 3fb71fb Compare March 18, 2026 12:44
@SeverinDiederichs SeverinDiederichs merged commit 34051a7 into apt-sim:master Mar 18, 2026
3 of 4 checks passed
@SeverinDiederichs SeverinDiederichs deleted the remove_Bfield_depend_in_AdePTTransport branch March 18, 2026 12:46
SeverinDiederichs added a commit that referenced this pull request Mar 18, 2026
…zation (#519)

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
- [x] Does not change physics results
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