Problem 1414

Summary: simulation results with statistical uncertainty are not expressed correctly
Product: Examples/Basic and Novice Reporter: Fada Guan <guanfada>
Component: N03Assignee: Michel.Maire
Status: RESOLVED FIXED    
Severity: trivial CC: michel.maire
Priority: P5    
Version: 9.6   
Hardware: All   
OS: All   

Description Fada Guan 2012-12-26 09:29:28 CET
the simulation result should be expressed by:

sample mean +- S/sqrt(n),

where sample mean is sum/n, and S is square root of sample variance, and n is number of events. Here S/sqrt(n) is the standard error of the sample mean.

However, the simulation result in N03 and N03Con is expressed by:

sample mean +- S.


My suggestion is please correct some statements in the RunAction.cc

for example, rmsEAbs = std::sqrt(rmsEAbs); should be:

rmsEAbs = std::sqrt(rmsEAbs)/std::sqrt(NbOfEvents); 

other three statements, like rmsEGap should also be corrected.

For examples\extended\analysis\N03Con, it has the same problem.

Actually, the calculation in G4ConvergenceTester() is correct.
Comment 1 michel.maire 2013-01-05 11:44:05 CET
Done.
As results are printed, you are right.
However, in HEP, S is also a quantity of interest: it is related to the intrinsic resolution of the calorimeter. This was the initial motivation of the example.