From ed89fd13dbed03c4fc2c51922a50f5a1a9c76437 Mon Sep 17 00:00:00 2001 From: Francesco Mazzaschi Date: Fri, 25 Apr 2025 10:52:16 +0200 Subject: [PATCH 1/4] Add common coalescence utility + HF -> nuclei generator --- .../generator_pythia8_hfhadron_to_nuclei.C | 174 +++++++++++++++++ .../PWGLF/ini/GeneratorLF_Coalescence.ini | 3 +- .../pythia8/generator_pythia8_coalescence.C | 101 ++-------- .../external/generator/CoalescencePythia8.h | 182 ++++++++++++++++++ 4 files changed, 370 insertions(+), 90 deletions(-) create mode 100644 MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C create mode 100644 MC/config/common/external/generator/CoalescencePythia8.h diff --git a/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C b/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C new file mode 100644 index 000000000..ad403e991 --- /dev/null +++ b/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C @@ -0,0 +1,174 @@ +#include "FairGenerator.h" +#include "Generators/GeneratorPythia8.h" +#include "Pythia8/Pythia.h" +#include "TRandom.h" +#include +#include +#include + +R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT) +#include "MC/config/common/external/generator/CoalescencePythia8.h" + +using namespace Pythia8; + +class GeneratorPythia8HFHadToNuclei : public o2::eventgen::GeneratorPythia8 +{ + public: + /// default constructor + GeneratorPythia8HFHadToNuclei() = default; + + /// constructor + GeneratorPythia8HFHadToNuclei(int inputTriggerRatio = 5, std::vector hfHadronPdgList = {}, std::vector nucleiPdgList = {}, bool trivialCoal = false, float coalMomentum = 0.4) + { + + mGeneratedEvents = 0; + mInverseTriggerRatio = inputTriggerRatio; + mHadRapidityMin = -1.5; + mHadRapidityMax = 1.5; + mHadronPdg = 0; + mHFHadronPdgList = hfHadronPdgList; + mNucleiPdgList = nucleiPdgList; + mTrivialCoal = trivialCoal; + mCoalMomentum = coalMomentum; + Print(); + } + + /// Destructor + ~GeneratorPythia8HFHadToNuclei() = default; + + /// Print the input + void Print() + { + LOG(info) << "********** GeneratorPythia8HFHadToNuclei configuration dump **********"; + LOG(info) << Form("* Trigger ratio: %d", mInverseTriggerRatio); + LOG(info) << Form("* Hadron rapidity: %f - %f", mHadRapidityMin, mHadRapidityMax); + LOG(info) << Form("* Hadron pdg list: "); + for (auto pdg : mHFHadronPdgList) { + LOG(info) << Form("* %d ", pdg); + } + LOG(info) << Form("* Trivial coalescence: %d", mTrivialCoal); + LOG(info) << Form("* Coalescence momentum: %f", mCoalMomentum); + LOG(info) << Form("* Nuclei pdg list: "); + for (auto pdg : mNucleiPdgList) { + LOG(info) << Form("* %d ", pdg); + } + LOG(info) << "***********************************************************************"; + } + + bool Init() override + { + addSubGenerator(0, "Minimum bias"); + addSubGenerator(1, "HF + Coalescence"); + return o2::eventgen::GeneratorPythia8::Init(); + } + + void setHadronRapidity(float yMin, float yMax) + { + mHadRapidityMin = yMin; + mHadRapidityMax = yMax; + }; + void setUsedSeed(unsigned int seed) + { + mUsedSeed = seed; + }; + unsigned int getUsedSeed() const + { + return mUsedSeed; + }; + + protected: + //__________________________________________________________________ + bool generateEvent() override + { + // Simple straightforward check to alternate generators + if (mGeneratedEvents % mInverseTriggerRatio == 0) { + int nInjectedEvents = mGeneratedEvents / mInverseTriggerRatio; + // Alternate hadrons if enabled (with the same ratio) + if (mHFHadronPdgList.size() >= 1) { + int iHadron = nInjectedEvents % mHFHadronPdgList.size(); + mHadronPdg = mHFHadronPdgList[iHadron]; + LOG(info) << "Selected hadron: " << mHFHadronPdgList[iHadron]; + } + + // Generate event of interest + bool genOk = false; + while (!genOk) { + if (GeneratorPythia8::generateEvent()) { + genOk = selectEvent(mPythia.event); + } + } + notifySubGenerator(1); + } else { + // Generate minimum-bias event + bool genOk = false; + while (!genOk) { + genOk = GeneratorPythia8::generateEvent(); + } + notifySubGenerator(0); + } + + mGeneratedEvents++; + + return true; + } + + bool selectEvent(Pythia8::Event& event) + { + for (auto iPart{0}; iPart < event.size(); ++iPart) { + // search for hadron in rapidity window + int id = std::abs(event[iPart].id()); + float rap = event[iPart].y(); + if (id == mHadronPdg && rap > mHadRapidityMin && rap < mHadRapidityMax) { + LOG(info) << "-----------------------------------------------------"; + LOG(info) << "Found hadron " << event[iPart].id() << " with rapidity " << rap << " and daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); + // print pdg code of daughters + LOG(info) << "Daughters: "; + for (int iDau = event[iPart].daughter1(); iDau <= event[iPart].daughter2(); ++iDau) { + LOG(info) << "Daughter " << iDau << ": " << event[iDau].id(); + } + bool isCoalDone = CoalescencePythia8(event, mNucleiPdgList, mTrivialCoal, mCoalMomentum, event[iPart].daughter1(), event[iPart].daughter2()); + if (isCoalDone) { + LOG(info) << "Coalescence process found for hadron " << event[iPart].id() << " with daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); + LOG(info) << "Check updated daughters: "; + for (int iDau = event[iPart].daughter1(); iDau <= event[iPart].daughter2(); ++iDau) { + LOG(info) << "Daughter " << iDau << ": " << event[iDau].id(); + } + return true; + } + } + } + return false; + }; + + private: + // Interface to override import particles + Pythia8::Event mOutputEvent; + + // Properties of selection + int mHadronPdg; + float mHadRapidityMin; + float mHadRapidityMax; + unsigned int mUsedSeed; + + // Control gap-triggering + unsigned long long mGeneratedEvents; + int mInverseTriggerRatio; + + // Control alternate trigger on different hadrons + std::vector mHFHadronPdgList = {}; + std::vector mNucleiPdgList = {}; + + bool mTrivialCoal = false; /// if true, the coalescence is done without checking the distance in the phase space of the nucleons + float mCoalMomentum; /// coalescence momentum +}; + + +///___________________________________________________________ +FairGenerator *generateHFHadToNuclei(int input_trigger_ratio = 5, std::vector hf_hadron_pdg_list = {}, std::vector nuclei_pdg_list = {}, bool trivial_coal = false, float coal_momentum = 0.4) +{ + auto myGen = new GeneratorPythia8HFHadToNuclei(input_trigger_ratio, hf_hadron_pdg_list, nuclei_pdg_list, trivial_coal, coal_momentum); + auto seed = (gRandom->TRandom::GetSeed() % 900000000); + myGen->readString("Random:setSeed on"); + myGen->readString("Random:seed " + std::to_string(seed)); + return myGen; +} \ No newline at end of file diff --git a/MC/config/PWGLF/ini/GeneratorLF_Coalescence.ini b/MC/config/PWGLF/ini/GeneratorLF_Coalescence.ini index 94129d323..3d7c6c7c9 100644 --- a/MC/config/PWGLF/ini/GeneratorLF_Coalescence.ini +++ b/MC/config/PWGLF/ini/GeneratorLF_Coalescence.ini @@ -1,6 +1,7 @@ [GeneratorExternal] fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C -funcName = generateCoalescence(1, 0.239) +funcName = generateCoalescence({1000010030, 1000020030, 1010010030}, 1, 0.239) [GeneratorPythia8] config=${O2_ROOT}/share/Generators/egconfig/pythia8_inel.cfg + diff --git a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C index ec5d1c6e1..4d1235d99 100644 --- a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C +++ b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C @@ -14,21 +14,23 @@ #include #include using namespace Pythia8; +R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT) +#include "MC/config/common/external/generator/CoalescencePythia8.h" #endif /// First version of the simple coalescence generator based PYTHIA8 -/// TODO: extend to other nuclei (only He3 is implemented now) class GeneratorPythia8Coalescence : public o2::eventgen::GeneratorPythia8 { public: /// Constructor - GeneratorPythia8Coalescence(int input_trigger_ratio = 1, double coal_momentum = 0.4) + GeneratorPythia8Coalescence(std::vector pdgList, int input_trigger_ratio = 1, double coal_momentum = 0.4) : o2::eventgen::GeneratorPythia8() { fmt::printf(">> Coalescence generator %d\n", input_trigger_ratio); mInverseTriggerRatio = input_trigger_ratio; mCoalMomentum = coal_momentum; + mPdgList = pdgList; } /// Destructor ~GeneratorPythia8Coalescence() = default; @@ -47,13 +49,14 @@ protected: // Simple straightforward check to alternate generators if (mGeneratedEvents % mInverseTriggerRatio == 0) { + fmt::printf(">> Generating coalescence event %d\n", mGeneratedEvents); bool genOk = false; int localCounter{0}; while (!genOk) { if (GeneratorPythia8::generateEvent()) { - genOk = selectEvent(mPythia.event); + genOk = o2::CoalAfterburner(mPythia.event, mPdgList, mCoalMomentum); } localCounter++; } @@ -63,6 +66,7 @@ protected: } else { + fmt::printf(">> Generating minimum-bias event %d\n", mGeneratedEvents); // Generate minimum-bias event bool genOk = false; while (!genOk) @@ -71,106 +75,25 @@ protected: } notifySubGenerator(0); } - mGeneratedEvents++; - return true; } - bool selectEvent(Pythia8::Event &event) - { - std::vector protons[2], neutrons[2], lambdas[2]; - for (auto iPart{0}; iPart < event.size(); ++iPart) - { - if (std::abs(event[iPart].y()) > 1.) // skip particles with y > 1 - { - continue; - } - switch (std::abs(event[iPart].id())) - { - case 2212: - protons[event[iPart].id() > 0].push_back(iPart); - break; - case 2112: - neutrons[event[iPart].id() > 0].push_back(iPart); - break; - case 3122: - lambdas[event[iPart].id() > 0].push_back(iPart); - break; - default: - break; - } - } - const double coalescenceRadius{0.5 * 1.122462 * mCoalMomentum}; /// 1.122462 [2^(1/6)] from PRL 126, 101101 (2021), only for 3 body coalescence - - auto coalescence = [&](int iC, int pdgCode, float mass, int iD1, int iD2, int iD3) { - if (event[iD1].status() < 0 || event[iD2].status() < 0 || event[iD3].status() < 0) - { - return false; - } - auto p1 = event[iD1].p(); - auto p2 = event[iD2].p(); - auto p3 = event[iD3].p(); - auto p = p1 + p2 + p3; - p1.bstback(p); - p2.bstback(p); - p3.bstback(p); - - if (p1.pAbs() <= coalescenceRadius && p2.pAbs() <= coalescenceRadius && p3.pAbs() <= coalescenceRadius) - { - p.e(std::hypot(p.pAbs(), mass)); - /// In order to avoid the transport of the mother particles, but to still keep them in the stack, we set the status to negative and we mark the nucleus status as 94 (decay product) - event.append((iC * 2 - 1) * pdgCode, 94, 0, 0, 0, 0, 0, 0, p.px(), p.py(), p.pz(), p.e(), mass); - event[iD1].statusNeg(); - event[iD1].daughter1(event.size() - 1); - event[iD2].statusNeg(); - event[iD2].daughter1(event.size() - 1); - event[iD3].statusNeg(); - event[iD3].daughter1(event.size() - 1); - - fmt::printf(">> Adding a %i with p = %f, %f, %f, E = %f\n", (iC * 2 - 1) * pdgCode, p.px(), p.py(), p.pz(), p.e()); - - return true; - } - return false; - }; - - bool coalHappened = false; - for (int iC{0}; iC < 2; ++iC) - { - for (int iP{0}; iP < protons[iC].size(); ++iP) { - for (int iN{0}; iN < neutrons[iC].size(); ++iN) { - /// H3L loop - for (int iL{0}; iL < lambdas[iC].size(); ++iL) { - coalHappened |= coalescence(iC, 1010010030, 2.991134, protons[iC][iP], neutrons[iC][iN], lambdas[iC][iL]); - } - /// H3 loop - for (int iN2{iN + 1}; iN2 < neutrons[iC].size(); ++iN2) { - coalHappened |= coalescence(iC, 1000010030, 2.80892113298, protons[iC][iP], neutrons[iC][iN], neutrons[iC][iN2]); - } - /// He3 loop - for (int iP2{iP + 1}; iP2 < protons[iC].size(); ++iP2) { - coalHappened |= coalescence(iC, 1000020030, 2.808391, protons[iC][iP], protons[iC][iP2], neutrons[iC][iN]); - } - } - } - } - return coalHappened; - } private: - // Control gap-triggering - float mCoalMomentum = 0.4; + std::vector mPdgList; /// list of pdg codes to be generated + float mCoalMomentum = 0.4; /// coalescence momentum uint64_t mGeneratedEvents = 0; /// number of events generated so far int mInverseTriggerRatio = 1; /// injection gap }; ///___________________________________________________________ -FairGenerator *generateCoalescence(int input_trigger_ratio, double coal_momentum = 0.4) +FairGenerator *generateCoalescence(std::vector pdgList, int input_trigger_ratio, double coal_momentum = 0.4) { - auto myGen = new GeneratorPythia8Coalescence(input_trigger_ratio, coal_momentum); + auto myGen = new GeneratorPythia8Coalescence(pdgList, input_trigger_ratio, coal_momentum); auto seed = (gRandom->TRandom::GetSeed() % 900000000); myGen->readString("Random:setSeed on"); myGen->readString("Random:seed " + std::to_string(seed)); return myGen; } +///___________________________________________________________ \ No newline at end of file diff --git a/MC/config/common/external/generator/CoalescencePythia8.h b/MC/config/common/external/generator/CoalescencePythia8.h new file mode 100644 index 000000000..7fbeac6db --- /dev/null +++ b/MC/config/common/external/generator/CoalescencePythia8.h @@ -0,0 +1,182 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#include "Pythia8/Pythia.h" +#include "fairlogger/Logger.h" +#include "TParticlePDG.h" +#include "TDatabasePDG.h" +#include "TSystem.h" +#include "TMath.h" +#include +#include +#include +#include +using namespace Pythia8; + +/// Coalescence afterburner for Pythia8 +/// Utility to compute naive coalescence afterburner as done in PRL 126, 101101 (2021) + +enum NucleiBits { + kDeuteron = 0, + kTriton = 1, + kHe3 = 2, + kHyperTriton = 3, + kHe4 = 4, +}; + +std::vector pdgList = {10010010, 1000010030, 1000020030, 1010010030, 1000020040}; +std::vector massList = {1.875612, 2.80892113298, 2.808391, 2.991134, 3.727379}; + +bool doCoal(Pythia8::Event& event, int charge, int pdgCode, float mass, bool trivialCoal, double coalescenceRadius, bool nuclFromDecay, int iD1, int iD2, int iD3 = -1, int iD4 = -1) +{ + std::vector nucleonIDs = std::vector{iD1, iD2}; + // add A=3 and A=4 nuclei if enabled + if (iD3 > 0) { + nucleonIDs.push_back(iD3); + } + if (iD4 > 0) { + nucleonIDs.push_back(iD4); + } + Pythia8::Vec4 p; + for (auto nID : nucleonIDs) { + if (event[nID].status() < 0) { + // nucleon already used in coalescence + return false; + } + p += event[nID].p(); + } + bool isCoalescence = true; + for (auto nID : nucleonIDs) { + auto pN = event[nID].p(); + pN.bstback(p); + // trivial coal does not check the distance of the nucleons + if (pN.pAbs() > coalescenceRadius && !trivialCoal) { + isCoalescence = false; + break; + } + } + if (!isCoalescence) { + return false; + } + p.e(std::hypot(p.pAbs(), mass)); + + if (!nuclFromDecay) { + /// keep the original nucleons with negative status, store the mother with status 94 + event.append((charge * 2 - 1) * pdgCode, 94, 0, 0, 0, 0, 0, 0, p.px(), p.py(), p.pz(), p.e(), mass); + for (auto nID : nucleonIDs) { + event[nID].statusNeg(); + event[nID].daughter1(event.size() - 1); + } + } else { + // first nucleon will be replaced by the nucleus, the others will be removed + bool swap = true; + int nRemoved = 0; + for (auto iPart{0}; iPart < event.size(); ++iPart) { + for (auto nID : nucleonIDs) { + if (iPart == nID && swap) { + // replace the nucleon with the nucleus + LOG(debug) << "Replacing nucleon with index " << iPart << " and pdg code " << event[iPart].id() << " with nucleus with pdg code " << (charge * 2 - 1) * pdgCode; + event[iPart].id((charge * 2 - 1) * pdgCode); + event[iPart].status(94); + event[iPart].px(p.px()); + event[iPart].py(p.py()); + event[iPart].pz(p.pz()); + event[iPart].e(std::hypot(p.pAbs(), mass)); + event[iPart].m(mass); + swap = false; + } else if (iPart == nID - nRemoved && !swap) { + LOG(debug) << "Removing nucleon with index " << iPart << " and pdg code " << event[iPart].id(); + event.remove(iPart, iPart, true); + nRemoved++; + } + } + } + } + LOG(debug) << "Adding a " << (charge * 2 - 1) * pdgCode << " with p = " << p.px() << ", " << p.py() << ", " << p.pz() << ", E = " << p.e(); + return true; +} + +bool CoalescencePythia8(Pythia8::Event& event, std::vector inputPdgList = {}, bool trivialCoal = false, double coalMomentum = 0.4, int firstDauID = -1, int lastDauId = -1) +{ + const double coalescenceRadius{0.5 * 1.122462 * coalMomentum}; + // if coalescence from a heavy hadron, loop only between firstDauID and lastDauID + int loopStart = firstDauID > -1 ? firstDauID : 0; + int loopEnd = lastDauId > -1 ? lastDauId : event.size() - 1; + // fill the nuclear mask + uint8_t nuclearMask = 0; + for (auto nuclPdg : inputPdgList) { + if (nuclPdg == pdgList[NucleiBits::kDeuteron]) { + nuclearMask |= (1 << kDeuteron); + } else if (nuclPdg == pdgList[NucleiBits::kTriton]) { + nuclearMask |= (1 << kTriton); + } else if (nuclPdg == pdgList[NucleiBits::kHe3]) { + nuclearMask |= (1 << kHe3); + } else if (nuclPdg == pdgList[NucleiBits::kHyperTriton]) { + nuclearMask |= (1 << kHyperTriton); + } else if (nuclPdg == pdgList[NucleiBits::kHe4]) { + nuclearMask |= (1 << kHe4); + } else { + LOG(fatal) << "Unknown pdg code for coalescence generator: " << nuclPdg; + return false; + } + } + // fill nucleon pools + std::vector protons[2], neutrons[2], lambdas[2]; + for (auto iPart{loopStart}; iPart <= loopEnd; ++iPart) { + if (std::abs(event[iPart].y()) > 1.) // skip particles with y > 1 + { + continue; + } + if (std::abs(event[iPart].id()) == 2212) { + protons[event[iPart].id() > 0].push_back(iPart); + } else if (std::abs(event[iPart].id()) == 2112) { + neutrons[event[iPart].id() > 0].push_back(iPart); + } else if (std::abs(event[iPart].id()) == 3122 && (nuclearMask & (1 << kHyperTriton))) { + lambdas[event[iPart].id() > 0].push_back(iPart); + } + } + // run coalescence + bool nuclFromDecay = firstDauID > -1; + bool coalHappened = false; + + for (int iC{0}; iC < 2; ++iC) { + for (int iP{0}; iP < protons[iC].size(); ++iP) { + for (int iN{0}; iN < neutrons[iC].size(); ++iN) { + if (nuclearMask & (1 << kDeuteron)) { + coalHappened |= doCoal(event, iC, pdgList[kDeuteron], massList[kDeuteron], trivialCoal, coalescenceRadius, nuclFromDecay, protons[iC][iP], neutrons[iC][iN]); + } + if (nuclearMask & (1 << kTriton)) { + for (int iN2{iN + 1}; iN2 < neutrons[iC].size(); ++iN2) { + coalHappened |= doCoal(event, iC, pdgList[kTriton], massList[kTriton], trivialCoal, coalescenceRadius, nuclFromDecay, protons[iC][iP], neutrons[iC][iN], neutrons[iC][iN2]); + } + } + if (nuclearMask & (1 << kHe3)) { + for (int iP2{iP + 1}; iP2 < protons[iC].size(); ++iP2) { + coalHappened |= doCoal(event, iC, pdgList[kHe3], massList[kHe3], trivialCoal, coalescenceRadius, nuclFromDecay, protons[iC][iP], protons[iC][iP2], neutrons[iC][iN]); + } + } + if (nuclearMask & (1 << kHyperTriton)) { + for (int iL{0}; iL < lambdas[iC].size(); ++iL) { + coalHappened |= doCoal(event, iC, pdgList[kHyperTriton], massList[kHyperTriton], trivialCoal, coalescenceRadius, nuclFromDecay, protons[iC][iP], neutrons[iC][iN], lambdas[iC][iL]); + } + } + if (nuclearMask & (1 << kHe4)) { + for (int iP2{iP + 1}; iP2 < protons[iC].size(); ++iP2) { + for (int iN2{iN + 1}; iN2 < neutrons[iC].size(); ++iN2) { + coalHappened |= doCoal(event, iC, pdgList[kHe4], massList[kHe4], trivialCoal, coalescenceRadius, nuclFromDecay, protons[iC][iP], protons[iC][iP2], neutrons[iC][iN], neutrons[iC][iN2]); + } + } + } + } + } + } + return coalHappened; +} \ No newline at end of file From aab4c0e99ee381fb5bd488db9937df8f5de93fe6 Mon Sep 17 00:00:00 2001 From: Francesco Mazzaschi Date: Fri, 25 Apr 2025 11:04:52 +0200 Subject: [PATCH 2/4] Fix typo --- MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C index 4d1235d99..2b7517ecd 100644 --- a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C +++ b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C @@ -56,7 +56,7 @@ protected: { if (GeneratorPythia8::generateEvent()) { - genOk = o2::CoalAfterburner(mPythia.event, mPdgList, mCoalMomentum); + genOk = CoalescencePythia8(mPythia.event, mPdgList, mCoalMomentum); } localCounter++; } From 0490e6d593e057629adddd526d9d4e7307707dce Mon Sep 17 00:00:00 2001 From: Francesco Mazzaschi Date: Fri, 25 Apr 2025 11:21:16 +0200 Subject: [PATCH 3/4] Move LOG(info) --> LOG(debug) --- .../generator_pythia8_hfhadron_to_nuclei.C | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C b/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C index ad403e991..49b98168d 100644 --- a/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C +++ b/MC/config/PWGHF/external/generator/generator_pythia8_hfhadron_to_nuclei.C @@ -119,19 +119,19 @@ class GeneratorPythia8HFHadToNuclei : public o2::eventgen::GeneratorPythia8 int id = std::abs(event[iPart].id()); float rap = event[iPart].y(); if (id == mHadronPdg && rap > mHadRapidityMin && rap < mHadRapidityMax) { - LOG(info) << "-----------------------------------------------------"; - LOG(info) << "Found hadron " << event[iPart].id() << " with rapidity " << rap << " and daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); + LOG(debug) << "-----------------------------------------------------"; + LOG(debug) << "Found hadron " << event[iPart].id() << " with rapidity " << rap << " and daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); // print pdg code of daughters - LOG(info) << "Daughters: "; + LOG(debug) << "Daughters: "; for (int iDau = event[iPart].daughter1(); iDau <= event[iPart].daughter2(); ++iDau) { - LOG(info) << "Daughter " << iDau << ": " << event[iDau].id(); + LOG(debug) << "Daughter " << iDau << ": " << event[iDau].id(); } bool isCoalDone = CoalescencePythia8(event, mNucleiPdgList, mTrivialCoal, mCoalMomentum, event[iPart].daughter1(), event[iPart].daughter2()); if (isCoalDone) { - LOG(info) << "Coalescence process found for hadron " << event[iPart].id() << " with daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); - LOG(info) << "Check updated daughters: "; + LOG(debug) << "Coalescence process found for hadron " << event[iPart].id() << " with daughters " << event[iPart].daughter1() << " " << event[iPart].daughter2(); + LOG(debug) << "Check updated daughters: "; for (int iDau = event[iPart].daughter1(); iDau <= event[iPart].daughter2(); ++iDau) { - LOG(info) << "Daughter " << iDau << ": " << event[iDau].id(); + LOG(debug) << "Daughter " << iDau << ": " << event[iDau].id(); } return true; } From d17dbb2ea5b1b9d7efcbab310bce15543af586b5 Mon Sep 17 00:00:00 2001 From: Francesco Mazzaschi Date: Fri, 25 Apr 2025 13:43:10 +0200 Subject: [PATCH 4/4] Fix tests --- MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C index 2b7517ecd..790710476 100644 --- a/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C +++ b/MC/config/PWGLF/pythia8/generator_pythia8_coalescence.C @@ -14,10 +14,10 @@ #include #include using namespace Pythia8; -R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT) -#include "MC/config/common/external/generator/CoalescencePythia8.h" #endif +R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT) +#include "MC/config/common/external/generator/CoalescencePythia8.h" /// First version of the simple coalescence generator based PYTHIA8 class GeneratorPythia8Coalescence : public o2::eventgen::GeneratorPythia8