Fork me on GitHub

Opened 11 years ago

Closed 11 years ago

#202 closed How to (fixed)

random seed in Delphes

Reported by: dimatteo Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear Developers,

when using delphes with parallel job submission, should we take care of reinitializing properly the random seed/seeds, for each job, in order to avoid repetitions in the pseudo-random number generation in the different jobs?
If yes, how can we do that?

Kind regards
Leonardo

Change History (3)

comment:1 by Pavel Demin, 11 years ago

Dear Leonardo,

Thanks for finding this problem.

Delphes uses the default ROOT's random generator accessible via the gRandom global variable.

gRandom is initialized as gRandom = new TRandom3(); in math/mathcore/src/TRandom3.cxx.

So, according to http://root.cern.ch/root/html/TRandom3.html, the seed is always the same (4357).

To automatically generate a random seed, you can add the following line to the constructor of the Delphes main module in modules/Delphes.cc:

gRandom->SetSeed();

This fix will be available in the next release.

Regards,

Pavel


comment:2 by dimatteo, 11 years ago

Thanks for the quick reply!
Leonardo

comment:3 by Pavel Demin, 11 years ago

Resolution: fixed
Status: newclosed

The RandomSeed parameter is available in the new release 3.0.10.

Note: See TracTickets for help on using tickets.