From 32d92d267259eb556ea0fa152e5fea01dac62943 Mon Sep 17 00:00:00 2001 From: Birgit Stapf Date: Thu, 19 Dec 2024 14:59:01 +0100 Subject: [PATCH] add code for jet matching in pythia > v8.3 --- standalone/src/DelphesPythia8Reader.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/standalone/src/DelphesPythia8Reader.h b/standalone/src/DelphesPythia8Reader.h index f238433..5a67fa4 100644 --- a/standalone/src/DelphesPythia8Reader.h +++ b/standalone/src/DelphesPythia8Reader.h @@ -58,11 +58,17 @@ class DelphesPythia8Reader : public DelphesInputReader { // jet matching #if PYTHIA_VERSION_INTEGER < 8300 + Pythia8::CombineMatchingInput* combined = 0; + Pythia8::UserHooks* m_matching = 0; + m_matching = combined->getHook(*m_pythia); if (!m_matching) { throw std::runtime_error("can't do matching"); } m_pythia->setUserHooksPtr(m_matching); +#else + Pythia8::CombineMatchingInput combined; + combined.setHook(*m_pythia); #endif if (!m_pythia) { @@ -190,12 +196,8 @@ class DelphesPythia8Reader : public DelphesInputReader { TClonesArray* m_branchParticle; TClonesArray* m_branchHepMCEvent; - // for matching - Pythia8::CombineMatchingInput* combined = 0; - Pythia8::UserHooks* m_matching = 0; - //resonance decayfilter Pythia8::ResonanceDecayFilterHook* m_resonanceDecayFilterHook{nullptr}; }; -#endif +#endif \ No newline at end of file