random generator and seed

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Fri, 4 Mar 2011 21:21:41 +0100


Hello,

when one is using a random generator as, for example TRandom3, one can choose a given seed, with myrandom3.SetSeed(MyValue)

one could do the following to make a smearing of a given variable inside a file, according to a gaussian centred to 0) :

(option A) :
myrandom3.SetSeed(a given seed);
for (...) {
...

   myrandom3.Gaus(0,a given value);
   make the correction to the variable
...

}

(option B)
for (...) {
...

   myrandom3.SetSeed(TheEventNumberOfAFile); //for example one needs to smear a variable inside a file // for which each event has a different event number

   myrandom3.Gaus(0,a given value);
   make the correction to the variable
...

}

Is there a "pathology" in the option B in terms of distribution of the random numbers ?

(there are no problems, just asking a naive question)

thanks Received on Fri Mar 04 2011 - 21:21:45 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 04 2011 - 23:50:01 CET