it seems that there is small feature/bug in TRandom3.
To illustrate it, please this line commands illustration:
1) example of TRandom (which works), but which is not recommended since TRandom3 is supposed to be better (more uniform, bigger period, etc.)
As you see below, each time we require a new random number, the seed is changed :
this is a normal behaviour, and it allows, to store the seed for some analysis, for debugging purpose (for example if we wish to directly regenerate the random number for a given event without to have to generate the previous ones : for that we need to have access to the chosen seed of the current iteration)
The algorithm reason is that in the code of TRandom1::Rndm() (which is called by Poisson), the seed is updated :
line 555 : update of the seed
2) For TRandom3, the seed is not updated, so it is very painful if we wish to regenerate a number for a given seed : we don't know what was the seed.
etc... (I tried) : always the same seed
We can see the reason in TRandom3::Rndm() : the seed is not updated :
-->Could it be fixed ?