Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pythia 8.311 #8938

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions evtgen-2.0.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,42 @@

template <class T>
class EvtMatrix {

--- a/EvtGenExternal/EvtPythiaEngine.hh
+++ b/EvtGenExternal/EvtPythiaEngine.hh
@@ -82,7 +82,7 @@

bool _convertPhysCodes, _initialised, _useEvtGenRandom;

- std::unique_ptr<EvtPythiaRandom> _evtgenRandom;
+ std::shared_ptr<EvtPythiaRandom> _evtgenRandom;

std::map<int, int> _addedPDGCodes;
};

--- a/src/EvtGenExternal/EvtPythiaEngine.cpp
+++ b/src/EvtGenExternal/EvtPythiaEngine.cpp
@@ -75,7 +75,7 @@
// from EvtGen for Pythia 8.
_useEvtGenRandom = useEvtGenRandom;

- _evtgenRandom = std::make_unique<EvtPythiaRandom>();
+ _evtgenRandom = std::make_shared<EvtPythiaRandom>();

_initialised = false;
}
@@ -128,8 +128,13 @@

// Set the random number generator
if ( _useEvtGenRandom == true ) {
+#if PYTHIA_VERSION_INTEGER < 8310
_genericPythiaGen->setRndmEnginePtr( _evtgenRandom.get() );
_aliasPythiaGen->setRndmEnginePtr( _evtgenRandom.get() );
+#else
+ _genericPythiaGen->setRndmEnginePtr( _evtgenRandom );
+ _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom );
+#endif
}

_genericPythiaGen->init();

5 changes: 1 addition & 4 deletions pythia8.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
### RPM external pythia8 309
### RPM external pythia8 311

Source: https://pythia.org/download/pythia83/%{n}%{realversion}.tgz
# https://gitlab.com/Pythia8/releases/-/issues/289: fix compilation of C++20 code with pythia8
Patch0: pythia8_309-289

Requires: hepmc hepmc3 lhapdf

%prep
%setup -q -n %{n}%{realversion}
%patch0 -p1

./configure --prefix=%i --enable-shared --with-hepmc2=${HEPMC_ROOT} --with-hepmc3=${HEPMC3_ROOT} --with-lhapdf6=${LHAPDF_ROOT} --enable-mg5mes

Expand Down
31 changes: 0 additions & 31 deletions pythia8_309-289.patch

This file was deleted.