Skip to content

Commit

Permalink
Fix alternate injection for more than two hadrons
Browse files Browse the repository at this point in the history
  • Loading branch information
atriolo authored and Benedikt Volkel committed Nov 28, 2023
1 parent a77c1c0 commit 61ce053
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected:
// Alternate hadrons if enabled (with the same ratio)
if (mHadronPdgList.size() >= 1)
{
int iHadron = (nInjectedEvents / std::max(mHadronPdgList.size(), 1ul)) % mHadronPdgList.size();
int iHadron = (nInjectedEvents / std::max(mQuarkPdgList.size(), 1ul)) % mHadronPdgList.size();
mHadronPdg = mHadronPdgList[iHadron];
LOG(debug)<<"SELECTED hadron: "<<mHadronPdgList[iHadron];
}
Expand Down

0 comments on commit 61ce053

Please sign in to comment.