Skip to content

remove gRandom->SetSeed(0) from the compiled code

Sergey Gorbunov requested to merge se.gorbunov/cbmroot:RandomSeeds into master

This MR removes all the resets of the random seed in the compiled code. I think we should keep the ability to reproduce all the results when a non-zero random seed is set by the main macro.

We need this option because of two reasons:

  1. debugging - to reproduce problems, we need the ability to reproduce the data.

  2. QA. We need the ability to compare different code versions on the same data. Since we run our test suite on a few events only, these events should be exactly the same. Otherwise, the performance fluctuates too much because of the low statistics and we are not able to catch unexpected changes in the results.

So, I think, gRandom->SetSeed(0) statement in the code is a bug.

TRandom3 myGenerator; is ok, because myGenerator's seed is always the same (==1234 or so).

myGenerator.SetSeed(0) is again a bug.

@f.uhlig, @v.friese, code owners,

Please let me know if you have any objections. I made this Merge Request instead of opening a redmine discussion because this way you can immediately see what files are affected.

Edited by Volker Friese

Merge request reports