1 | <chapter name="Random-Number Seed"> |
---|
2 | |
---|
3 | <h2>Random-Number Seed</h2> |
---|
4 | |
---|
5 | The seed of the random number generator can be set as follows: |
---|
6 | |
---|
7 | <flag name="Random:setSeed" default="off"> |
---|
8 | Indicates whether a user-set seed should be used every time the |
---|
9 | <code>Pythia::init</code> routine is called. If off, the random number |
---|
10 | generator is initialized with its default seed at the beginning |
---|
11 | of the run, and never again. If on, each new <code>Pythia::init</code> |
---|
12 | call (should several be made in the same run) results in the random |
---|
13 | number being re-initialized, thereby possibly starting over with the |
---|
14 | same sequence, if you do not watch out. |
---|
15 | </flag> |
---|
16 | |
---|
17 | <modeopen name="Random:seed" default="-1" max="900000000"> |
---|
18 | The seed to be used, if <code>setSeed</code> is on.<br/> |
---|
19 | A negative value gives the default seed,<br/> |
---|
20 | a value 0 gives a random seed based on the time, and<br/> |
---|
21 | a value between 1 and 900,000,000 a unique different random number |
---|
22 | sequence. |
---|
23 | </modeopen> |
---|
24 | |
---|
25 | <p/> |
---|
26 | For more on random numbers see <aloc href="RandomNumbers">here</aloc>. |
---|
27 | This includes methods to save and restore the state of the generator, |
---|
28 | and some preprogrammed methods to generate non-uniform random numbers. |
---|
29 | |
---|
30 | </chapter> |
---|
31 | |
---|
32 | <!-- Copyright (C) 2012 Torbjorn Sjostrand --> |
---|