Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving AdePT Initialization to AdePTTrackingManager::BuildPhysicsTable #283

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

JuanGonzalezCaminero
Copy link
Contributor

@JuanGonzalezCaminero JuanGonzalezCaminero commented Mar 15, 2024

Previously AdePTTransport was initialized at AdePTPhysics::ConstructProcess. However at this point the material-cut couples are not yet initialized in Geant4, which means G4HepEM can't be initialized. The workaround was to manually initialize them in the user detector construction.

This PR delays the AdePT initialization until AdePTTrackingManager::BuildPhysicsTable, at which point we have all the information we need.

One downside of this approach is that now we have a pointer to AdePTConfiguration in AdePTTrackingManager, rather than AdePTPhysics being the only user of the configuration.

@phsft-bot
Copy link

Can one of the admins verify this patch?

@agheata agheata merged commit d78a970 into apt-sim:master Mar 18, 2024
2 checks passed
@JuanGonzalezCaminero JuanGonzalezCaminero deleted the init_order branch October 17, 2024 15:20
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.

3 participants