Generic Settings

Here are collected a few scattered minor topics, controlled from the main Pythia class. Currently this concerns how to set the seed of the random numbers and how to regulate error checks on the generated event.

Random numbers

The seed of the random number generator can be set here:

flag  Pythia:setSeed   (default = off)
Indicates whether a user-set seed should be used every time the Pythia::init routine is called. If off, the random number generator is initialized with its default seed at the beginning of the run, and never again. If on, each new Pythia::init call (should several be made in the same run) results in the random number being re-initialized, thereby possibly starting over with the same sequence, if you do not watch out.

mode  Pythia:seed   (default = -1; maximum = 900000000)
The seed to be used, if setSeed is on.
A negative value gives the default seed,
a value 0 gives a random seed based on the time, and
a value between 1 and 900,000,000 a unique different random number sequence.

Error Checks

There is also a few settings related to error checking.

flag  Pythia:checkEvent   (default = on)
When an event has been successfully generated, check that the final event record does not contain any unphysical particles, or nonconserved charge or energy-momentum. If this check fails, then pythia.next() obtains the value false.

mode  Pythia:nErrList   (default = 0)
The number of erroneous events, in the above check, for which event listing and other detailed information will be printed. After that, only the normal error messages will be issued. Error counters are always updated, and accumulated numbers can be shown with pythia.statistics() at the end of the run.

parm  Pythia:epTolerance   (default = 1e-5)
Maximum allowed summed deviation of E, p_x, p_y and p_z between the incoming beams and the final state, as a fraction of the initial energy. (Unfortunetely roundoff errors do not scale linearly with the energy, and also have a very long tail. So while most events at lower energies may be correct to better than 1e-10, at LHC it does not have to signal any fundamental bug if also the default tolerance above is violated occasionally.)