is it possible to get the number of how many particles will be created in total? E.g. I’m setting a certain number of particles via
/beamOn but as I also have a for loop for one of several particle guns, I’m not quite sure how to estimate/determine the total number of particles that will be generated.
Then, I would like to print something in the terminal like “10 % done, 20 % done,…”.
Currently, I’m only using
G4int evt = G4RunManager::GetRunManager()->GetCurrentEvent()->GetEventID(); to print the actual particle number but this doesn’t include how many are left plus, I guess this is because of my for loop(?), the current number is printed several dozens times.