Skip to content

Commit

Permalink
EvtGen patch for Pythia 8.310
Browse files Browse the repository at this point in the history
  • Loading branch information
mseidel42 committed Jan 22, 2024
1 parent 59f650a commit 732951f
Showing 1 changed file with 39 additions and 0 deletions.
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();

0 comments on commit 732951f

Please sign in to comment.