is there any feature to receive the statistical error resp. uncertainty of a simulation. Afaik Monte carlo simulation usually provide quantities like these(?), is there also something available for G4?

My actual purpose is to determine how many photons I should generate to get stable results.

The answer depends on how you are getting your results. If it is via scoring , Geant4 provides stat. error, if you make an histogram, for example in ROOT, ROOT provides error bars in each bin

If you fill a histogram from a branch, then ROOT will compute symmetric error bars for you. You can have them drawn by specifying one of the â€śEâ€ť options to Draw().

If you do your own analysis, then you get to do stuff like compute sum of weights, sum of squared weights, etc. Woo hooâ€¦

For an unweighted histogram, they are sqrt(N) (â€śRMSâ€ť, â€śone sigmaâ€ť) for each bin. For weights, they are sqrt(sum-weights) for each bin. See the ROOT documentation for more details, and for options to display error-on-the-mean, or asymmetric (Poissonian) error bars.

As usually, thanks a lot for all your help and inputs! The question is cleared but Iâ€™m still unsure of how many photons (or particles, generally spoken) Iâ€™ve to generate. How can I determine this?
Is there a thumb of rule for G4 or purposes? Can I use some calculated values?

Geant4 generates events, not â€śactivity,â€ť so what youâ€™d need to do is understand first what your source activity is, and what time interval you want to simulate. The product of those two is the number of events.

Having said that, the next question is what uncertainty do you want (1%, 0.1%, 10% whateverâ€¦)? The relative uncertainty goes like 1/sqrt(N), so you can use that to estimate the number of events you need. Given the number of events, you can rescale to time interval or activity as needed.