Page MenuHomeHEPForge

Work around change of interface for setRndmEnginePtr in Pythia8 310
ClosedPublic

Authored by tlatham on Aug 21 2023, 12:10 PM.

Details

Summary

As detailed in T228, the interface of setRndmEnginePtr has changed in Pythia8
version 310, which results in build failures for EvtGen.

This revision works around this change by modifying the internal storage of the
EvtPythiaRandom pointer from a std::unique_ptr to a std::shared_ptr and then
having a compile-time switch on the Pythia8 version to either pass directly the
shared_ptr (in versions 310 and later) or the underlying raw pointer (in
earlier versions).

Closes T228.

Test Plan

Code compiles successfully with Pythia8 310 and also earlier versions.
Comparison of generated validation distributions before and after change look good.

Diff Detail

Repository
rEVTGEN evtgen
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tlatham published this revision for review.Aug 21 2023, 1:07 PM
tlatham edited the summary of this revision. (Show Details)
tlatham edited the test plan for this revision. (Show Details)
tlatham added reviewers: jback, kreps, abudinen.
tlatham changed the visibility from "All Users" to "Public (No Login Required)".
tlatham changed the edit policy from "All Users" to "Restricted Project (Project)".
tlatham added a project: Restricted Project.
tlatham edited the summary of this revision. (Show Details)
tlatham added a subscriber: Restricted Project.

We should also decide how to release this once reviewed and approved. Obviously this can be merged into master but do we then release 02-03-00 from master (i.e. also rolling-up all other changes that have accumulated there) or do we cherry-pick this commit to a branch based on 02-02-00 and release 02-02-01 from that? I'm not sure that we want to release everything that's in master right now, i.e. before we finish fixing all the models that show problems in the tests. So I would tend towards releasing in a patch release.

Thanks for updating the interface, Tom. I agree that it will be easier to release this as a patch release based on R02-02-00.

We don't have any Pythia-specific JSON tests at the moment, although the scripts genAllDecayExamples.sh and compareAllDecays.sh can be used to generate and compare momentum and multiplicity histograms for a range of Pythia modes, although I don't think we currently have reference Pythia ROOT files for the comparison script.

This revision is now accepted and ready to land.Aug 21 2023, 2:22 PM
In D96#2504, @jback wrote:

Thanks for updating the interface, Tom. I agree that it will be easier to release this as a patch release based on R02-02-00.

We don't have any Pythia-specific JSON tests at the moment, although the scripts genAllDecayExamples.sh and compareAllDecays.sh can be used to generate and compare momentum and multiplicity histograms for a range of Pythia modes, although I don't think we currently have reference Pythia ROOT files for the comparison script.

Many thanks @jback, I've successfully run the genAllDecayExamples.sh and am now also running it from a build of the master branch with Pythia8 version 309 and will then run the comparison script. Will report back what I find.

Comparisons look good I think.
You can find the plots here:
/home/epp/phsdba/Development/EvtGen/pythia8-build-problem/install/share/EvtGen/validation/gifFiles
if you want to take a quick look.

I checked the test plots together with Tom. They look fine. There are slight differences before/after the changes in some plots for inclusive B decays, which I presume might be due to changes in Pythia itself. However, the results before/after are statistically compatible. As for exclusive decays, the comparison before/after the changes shows no differences at all.