diff --git a/MC/config/PWGLF/pythia8/generator/exotic_nuclei_pp.gun b/MC/config/PWGLF/pythia8/generator/exotic_nuclei_pp.gun new file mode 100644 index 000000000..6174a13c4 --- /dev/null +++ b/MC/config/PWGLF/pythia8/generator/exotic_nuclei_pp.gun @@ -0,0 +1,5 @@ +# PDG N ptMin ptMax yMin yMax +225 10 0.2 10 -1 1 +115 10 0.2 10 -1 1 +335 10 0.2 10 -1 1 +10331 10 0.2 10 -1 1 diff --git a/MC/config/PWGLF/pythia8/generator_pythia8_LF_rapidity.C b/MC/config/PWGLF/pythia8/generator_pythia8_LF_rapidity.C index f3c56f420..12191584a 100644 --- a/MC/config/PWGLF/pythia8/generator_pythia8_LF_rapidity.C +++ b/MC/config/PWGLF/pythia8/generator_pythia8_LF_rapidity.C @@ -12,7 +12,7 @@ /// `o2-sim -g external --configKeyValues 'GeneratorExternal.fileName=generator_pythia8_LF_rapidity.C;GeneratorExternal.funcName=generateLFRapidity({{1000010020, 10, 0.5, 10, -1.0, 1.0}, {1000010030, 10, 0.5, 10, -1.0, 1.0}})'` /// Here PDG, Number injected, pT limits, rapidity limits are divided per particle /// or: -/// `o2-sim -g external --configKeyValues 'GeneratorExternal.fileName=generator_pythia8_LF_rapidity.C;GeneratorExternal.funcName=generateLFRapidity("${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/nuclei_rapidity.gun")'` +/// `o2-sim -g external --configKeyValues 'GeneratorExternal.fileName=generator_pythia8_LF_rapidity.C;GeneratorExternal.funcName=generateLFRapidity("${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/exotic_nuclei_pp.gun")'` /// Here PDG, Number injected, pT limits, rapidity limits are provided via an intermediate configuration file /// @@ -51,29 +51,30 @@ #endif #pragma cling load("libO2Generators") #endif -#include "Generators/GeneratorPythia8.h" +// #include "Generators/GeneratorPythia8.h" +#include "generator_pythia8_longlived.C" #include using namespace Pythia8; using namespace o2::mcgenstatus; -// Helper function to get mass from PDG code (copied from generator_pythia8_longlived.C to avoid include issues) -namespace { -double getMassFromPDG(int input_pdg) -{ - double mass = 0; - if (TDatabasePDG::Instance()) - { - TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(input_pdg); - if (particle) { - mass = particle->Mass(); - } else { - LOG(warning) << "Unknown particle requested with PDG " << input_pdg << ", mass set to 0"; - } - } - return mass; -} -} +// // Helper function to get mass from PDG code (copied from generator_pythia8_longlived.C to avoid include issues) +// namespace { +// double getMassFromPDG(int input_pdg) +// { +// double mass = 0; +// if (TDatabasePDG::Instance()) +// { +// TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(input_pdg); +// if (particle) { +// mass = particle->Mass(); +// } else { +// LOG(warning) << "Unknown particle requested with PDG " << input_pdg << ", mass set to 0"; +// } +// } +// return mass; +// } +// } class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8 { @@ -362,7 +363,8 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8 mRapidityMin{rapidityMin}, mRapidityMax{rapidityMax} { - mMass = getMassFromPDG(mPdg); + // mMass = getMassFromPDG(mPdg); + mMass = GeneratorPythia8LongLivedGun::getMass(mPdg); if (mMass <= 0) { LOG(fatal) << "Could not find mass for mPdg " << mPdg; } @@ -533,7 +535,7 @@ FairGenerator* generateLFRapidity(std::vector