Skip to content

Commit

Permalink
PWGLF: fix seeding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Nov 12, 2024
1 parent 15de97a commit 5b6b9fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion MC/config/PWGLF/pythia8/generator_pythia8_extraStrangeness.C
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,9 @@ private:

FairGenerator *generator_extraStrangeness()
{
return new GeneratorPythia8ExtraStrangeness();
auto generator = new GeneratorPythia8ExtraStrangeness();
gRandom->SetSeed(0);
generator.readString("Random:setSeed = on");
generator.readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}
6 changes: 5 additions & 1 deletion MC/config/PWGLF/pythia8/generator_pythia8_syntheFlow.C
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,9 @@ private:

FairGenerator *generator_syntheFlow()
{
return new GeneratorPythia8SyntheFlow();
auto generator = new GeneratorPythia8SyntheFlow();
gRandom->SetSeed(0);
generator.readString("Random:setSeed = on");
generator.readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}
6 changes: 5 additions & 1 deletion MC/config/PWGLF/pythia8/generator_pythia8_syntheFlowXi.C
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,9 @@ private:

FairGenerator *generator_syntheFlowXi()
{
return new GeneratorPythia8SyntheFlowXi();
auto generator = new GeneratorPythia8SyntheFlowXi();
gRandom->SetSeed(0);
generator.readString("Random:setSeed = on");
generator.readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}

0 comments on commit 5b6b9fe

Please sign in to comment.