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:_11.2.1
_Operating System:_GNU ld (GNU Binutils) 2.37
_Compiler/Version:_11.2.0
_CMake Version:_GNU Make 4.3
Hi, I have a program that needs to use multithreading and merge the results. I am interested in how multithreading works in Geant4. I understand that it is divided into main thread and worker thread. Is the main thread the last to run.cc or runaction.cc? If so, for example, if I want to simulate 100 million particles, will the main thread simulate some of the particles and produce results or will all the particles be simulated by the worker thread? Do I need to consider the simulation values in the main thread when merging?