Fork me on GitHub

Opened 11 years ago

Closed 10 years ago

#229 closed Bug (fixed)

Problem with the random number generator in version 3.0.10

Reported by: roberto ruiz Owned by:
Priority: major Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear developers,

Passing the same hepmc file through delphes v3.0.10 several times gives a different output for each one. After some inspection I have found that the line

gRandom->SetSeed(confReader->GetInt("::RandomSeed", 0));

in the init routine is not effective in the sense that it does not change the seed any time it is called.
It leads to a different sequence of random numbers. I have found that replacing the 0 by
another arbitrary number works.

Best Regards,
Roberto.


Change History (3)

comment:1 by Pavel Demin, 11 years ago

Dear Roberto,

This behavior was requested in

https://cp3.irmp.ucl.ac.be/projects/delphes/ticket/202

If you need the same sequence of random numbers for every run you can specify the fixed seed value in the configuration file with the following command:

set RandomSeed 123

Regards,

Pavel

comment:2 by Pavel Demin, 11 years ago

I propose to add

###########################################
# Set the random generator seed
# If zero the seed is set to a random value
###########################################
set RandomSeed 0

to all the example cards.

comment:3 by Pavel Demin, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.