Pythia8 seeding improvements#13281
Merged
sawenzel merged 1 commit intoAliceO2Group:devAliceO2Group/AliceO2:devfrom Jul 10, 2024
sawenzel:swenzel/pythia8seedingsawenzel/AliceO2:swenzel/pythia8seedingCopy head branch name to clipboard
Merged
Pythia8 seeding improvements#13281sawenzel merged 1 commit intoAliceO2Group:devAliceO2Group/AliceO2:devfrom sawenzel:swenzel/pythia8seedingsawenzel/AliceO2:swenzel/pythia8seedingCopy head branch name to clipboard
sawenzel merged 1 commit intoAliceO2Group:devAliceO2Group/AliceO2:devfrom
sawenzel:swenzel/pythia8seedingsawenzel/AliceO2:swenzel/pythia8seedingCopy head branch name to clipboard
Conversation
This commit improves the seeding of Pythia8 in O2.
The seeding...
(a) ... is now done as part of the object's Init function automatically.
Users are no longer required to provide own seeding logic,
which can significantly simplify the setup.
By default, Pythia8 will seed against ROOT TRandom::GetSeed,
which is itself set to values of the command line option `--seed`,
used in the o2-sim ... or o2-sim-dpl-eventgen execetuables (which
are the 2 places undertaking event generation). This setup guarantees
that
```
o2-sim-dpl-eventgen --generator pythiapp --seed x
```
will result in different event sequences when x changes.
(b) Users can simply set the seed via a `setInitialSeed` function
on the GeneratorPythia8 object. The function must be called before
GeneratorPythia8::Init is executed. So calling it right after the constructor
is fine.
Example code (e.g., inside user Generator macro) is:
```
auto mygen = new o2::eventgen::GeneratorPythia8();
long seed = atol(getenv(ALIEN_PROC_ID));
if(!mygen->setInitialSeed(seed)) {
std::cerr << "seeding failed";
}
```
In result, the commit leads to a simplification of the Pythia8
setup also in GeneratorFactory.
Contributor
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
Collaborator
|
Error while checking build/O2/fullCI for 75f9579 at 2024-07-08 17:48: Full log here. |
sawenzel
added a commit
to sawenzel/O2DPG
that referenced
this pull request
Jul 10, 2024
This commit harmonizes the seeding procedure of generators based on o2::eventgen::GeneratorPythia8, following a development done in O2 (AliceO2Group/AliceO2#13281) In principle, o2::eventgen::GeneratorPythia8 now performs it's own seeding within the Init function. This seeding makes sure to integrate with the `--seed` command line option of our event generation executable. The commit: * Removes seeding code in O2DPG when it would override the default behaviour from O2. * Uses a new dedicated function `setInitialSeed` instead of manipulating Pythia8 with config strings (in situations in which the user targets seeding based on ALIEN_PROC_ID for instance). * Ensures that event generation becomes more repeatable in situations when the same `--seed` is given to the event generation executable. This may help to debug crashes on the GRID etc.
sawenzel
added a commit
to sawenzel/O2DPG
that referenced
this pull request
Jul 10, 2024
This commit harmonizes the seeding procedure of generators based on o2::eventgen::GeneratorPythia8, following a development done in O2 (AliceO2Group/AliceO2#13281) In principle, o2::eventgen::GeneratorPythia8 now performs it's own seeding within the Init function. This seeding makes sure to integrate with the `--seed` command line option of our event generation executable. The commit: * Removes seeding code in O2DPG when it would override the default behaviour from O2. * Uses a new dedicated function `setInitialSeed` instead of manipulating Pythia8 with config strings (in situations in which the user targets seeding based on ALIEN_PROC_ID for instance). * Ensures that event generation becomes more repeatable in situations when the same `--seed` is given to the event generation executable. This may help to debug crashes on the GRID etc.
sawenzel
added a commit
to sawenzel/O2DPG
that referenced
this pull request
Jul 11, 2024
This commit harmonizes the seeding procedure of generators based on o2::eventgen::GeneratorPythia8, following a development done in O2 (AliceO2Group/AliceO2#13281) In principle, o2::eventgen::GeneratorPythia8 now performs it's own seeding within the Init function. This seeding makes sure to integrate with the `--seed` command line option of our event generation executable. The commit: * Removes seeding code in O2DPG when it would override the default behaviour from O2. * Uses a new dedicated function `setInitialSeed` instead of manipulating Pythia8 with config strings (in situations in which the user targets seeding based on ALIEN_PROC_ID for instance). * Ensures that event generation becomes more repeatable in situations when the same `--seed` is given to the event generation executable. This may help to debug crashes on the GRID etc.
sawenzel
added a commit
to sawenzel/O2DPG
that referenced
this pull request
Jul 11, 2024
This commit harmonizes the seeding procedure of generators based on o2::eventgen::GeneratorPythia8, following a development done in O2 (AliceO2Group/AliceO2#13281) In principle, o2::eventgen::GeneratorPythia8 now performs it's own seeding within the Init function. This seeding makes sure to integrate with the `--seed` command line option of our event generation executable. The commit: * Removes seeding code in O2DPG when it would override the default behaviour from O2. * Uses a new dedicated function `setInitialSeed` instead of manipulating Pythia8 with config strings (in situations in which the user targets seeding based on ALIEN_PROC_ID for instance). * Ensures that event generation becomes more repeatable in situations when the same `--seed` is given to the event generation executable. This may help to debug crashes on the GRID etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit improves the seeding of Pythia8 in O2. The seeding...
(a) ... is now done as part of the object's Init function automatically.
Users are no longer required to provide own seeding logic,
which can significantly simplify the setup.
By default, Pythia8 will seed against ROOT TRandom::GetSeed,
which is itself set to values of the command line option
--seed,used in the o2-sim ... or o2-sim-dpl-eventgen execetuables (which
are the 2 places undertaking event generation). This setup guarantees
that
(b) Users can simply set the seed via a
setInitialSeedfunctionon the GeneratorPythia8 object. The function must be called before
GeneratorPythia8::Init is executed. So calling it right after the constructor
is fine.
In result, the commit leads to a simplification of the Pythia8 setup also in GeneratorFactory.