Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version:
Operating System:
Compiler/Version:
CMake Version:
We are simulating Bi@Cu core-shell nanoparticle radiosensitization using Geant4-DNA chemistry (option3, IRT model) with a single NP geometry.
Current status after debugging:
- Changing World from G4_WATER to G4_Galactic + nested water mother volume resolved the initial crash.
- Chemistry now works at low statistics (history=1000).
- Crash persists at history=2000+ when H2O2 molecules are injected via G4MoleculeGun in StackingAction.
Geometry:
- World: G4_Galactic
- WaterMother: large G4_WATER sphere containing everything
- NP: Bi core + Cu shell (nested inside WaterMother)
- Water shells: hollow G4Sphere volumes, nested inside WaterMother
- DNA region: single “WaterShells” region assigned to shell logical volumes
H2O2 injection:
- Done in StackingAction::NewStage() via G4MoleculeGun + DefineTracks()
- 20 molecules per event, injected into spherical shell around NP
What we tried:
- G4MoleculeCounter::ResetCounter() at BeginOfEventAction → no effect
- G4Scheduler::Instance()->Reset() at BeginOfEventAction → no effect
- Reducing endTimePs → no effect
- NTotalTrack = 0 at each event start (confirmed via debug log)
Crash location:
Run 0 starts.
DNAMolecularIRTModel will be used
[exit code -1073740940]
Question:
Is there a known issue with G4MoleculeGun injection combined with IRT model at higher event counts? Is there a correct way to reset IRT internal state between events?
Geant4 version: 11.1.3 | OS: Windows | Build: Release, MSVC