Skip to content

Commit ec868bd

Browse files
authored
PWGHF: Make the HF generator backward compatible in case of replacement (#2018)
1 parent 995bee6 commit ec868bd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "FairGenerator.h"
22
#include "Generators/GeneratorPythia8.h"
3+
#include "Generators/GeneratorPythia8Param.h"
34
#include "Pythia8/Pythia.h"
45
#include "TRandom.h"
56
#include "TDatabasePDG.h"
@@ -304,7 +305,7 @@ protected:
304305
// we restore the daughter indices of the mothers after the removal
305306
int newPartIdx{0};
306307
std::array<int, 2> newMothers = {0, 0};
307-
if (mGenConfig.includePartonEvent) { // only necessary in case of parton event, otherwise we keep no mother
308+
if (o2::eventgen::GeneratorPythia8Param::Instance().includePartonEvent) { // only necessary in case of parton event, otherwise we keep no mother
308309
newMothers[0] = mothers.front();
309310
newMothers[1] = mothers.back();
310311
newPartIdx = mPythia.event.size();
@@ -334,7 +335,6 @@ protected:
334335
}
335336
}
336337
}
337-
auto dauOfMomUp = mPythia.event[mothers[iMom]].daughterList();
338338
}
339339

340340
mPythia.event.append(charge * pdgCodeNew, status, newMothers[0], newMothers[1], 0, 0, 0, 0, px, py, pz, energy, mass);

MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_gap5_DResoTrigger.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ funcName=GeneratorPythia8GapTriggeredCharmAndBeauty(5, -1.5, 1.5, -1.5, 1.5, {10
55

66
[GeneratorPythia8]
77
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_DResoTrigger.cfg
8-
includePartonEvent=false # not needed for jet studies, hence no need to keep parton event
8+
includePartonEvent=false
9+
### not needed for jet studies, hence no need to keep parton event

0 commit comments

Comments
 (0)