Problem 2563

Summary: enabling and/or disabling certain physical processes makes the simulation stop after a few events
Product: Examples/Advanced Reporter: Giuseppe Nicotera <giuseppe.nicotera>
Component: purging_magnetAssignee: John Apostolakis <John.Apostolakis>
Status: RESOLVED WONTFIX    
Severity: normal CC: susanna
Priority: P1    
Version: 11.1   
Hardware: PC   
OS: Linux   
Attachments: PurgMagPhysicsList.cc file with the part of the code containing the lines that once commented make the simulation stops after few hundreds of events

Description Giuseppe Nicotera 2023-09-06 11:24:26 CEST
Created attachment 824 [details]
PurgMagPhysicsList.cc file with the part of the code containing the lines that once commented make the simulation stops after few hundreds of events

The Geant4 application I use was created from the example/advanced/Purging_Magnet.
Within my PurgMagPhysicsList.cc i use the G4EmPenelopePhysics and enable the following processes:

- for gammas: G4GammaConversion, G4ComptonScattering, G4PhotoElectricEffect
- for electrons: G4eBremsstrahlung, G4eIonisation, G4eMultipleScattering
- for positrons: G4eBremsstrahlung, G4eIonisation, G4eMultipleScattering, G4eplusAnnihilation.

when all of them are enabled, the computer correctly performs simulations in multithread mode (3 threads) for millions of initially injected particles.

When I comment on the two lines of code enabling G4eIonisation for electrons and positrons, the simulation stops after a few tens of events, without giving an error message.

What am I doing wrong if my aim is to assess the impact of a single process on the simulation (and thus if what I want is to enable/disable individual processes correctly) ?
Comment 1 John Apostolakis 2023-09-13 11:08:35 CEST
Hello.

Making changes in a physics list which disable key processes is a challenging endeavour.

Please look at the examples in examples/extended/electromagnetic and in particular TestEm1 which demonstrates how to deactivate some processes in order to understand their effects.