Does ‘accumulableManager->Merge()’ merge the data from different events as well?

I thought the function merged the data returned by multiple threads so it wouldn’t do anything in a non-multithread mode. However, if this is true, the rms calculation in B1RunAction.cc of exampleB1 cannot be explained.

Currently,

G4double rms = edep2 - edep*edep/nofEvents;

if (rms > 0.) rms = std::sqrt(rms); else rms = 0.;

I believe it should be like this:

G4double rms = (edep2 - edep*edep/nofEvents)/nofEvents;

if (rms > 0.) rms = std::sqrt(rms); else rms = 0.;

, unless the Merge() function returns the ‘average’ of the data (deposited energy) from different ‘events’…