Skip to content

Commit 3a712a8

Browse files
atriologconesab
authored andcommitted
Fix alternate injection for more than two hadrons
1 parent 5debeae commit 3a712a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected:
9696
// Alternate hadrons if enabled (with the same ratio)
9797
if (mHadronPdgList.size() >= 1)
9898
{
99-
int iHadron = (nInjectedEvents / std::max(mHadronPdgList.size(), 1ul)) % mHadronPdgList.size();
99+
int iHadron = (nInjectedEvents / std::max(mQuarkPdgList.size(), 1ul)) % mHadronPdgList.size();
100100
mHadronPdg = mHadronPdgList[iHadron];
101101
LOG(debug)<<"SELECTED hadron: "<<mHadronPdgList[iHadron];
102102
}

0 commit comments

Comments
 (0)