Problems with multiple runs

Dear Geant4 users:
I want to count the dose deposited per pixel in the detector (100 100 pixels), so I modify the code of exampleB1. I need to run 1,000 “run” at one time and to calculate the final total dose. I found that my code ended up output 1000100100 data, which means it outputs 100100 data after each run . Is there any way to directly output the total dose of 1000 runs ? Thanks for your help.

Yes, of course. You need to sum up the data inside the application. Make your ThreadRun class and do the total scoring at the end of each run.

Thanks for your reply! I‘ll try it. :smiley: