diff --git a/PWGHF/Macros/computeFonllPlusPythiaPredictions.C b/PWGHF/Macros/computeFonllPlusPythiaPredictions.C index 605e0a8f446..9d3dab4d407 100644 --- a/PWGHF/Macros/computeFonllPlusPythiaPredictions.C +++ b/PWGHF/Macros/computeFonllPlusPythiaPredictions.C @@ -316,12 +316,12 @@ void computeFonllPlusPythiaPredictions(int nDecays, int seed, std::string inFile std::array normCrossSec{}; for (auto iFonll{0}; iFonll < 3; ++iFonll) { - normCrossSec[iFonll] = hFonllBhad[iFonll]->Integral(); + normCrossSec[iFonll] = hFonllBhad[iFonll]->Integral(1, hFonllBhad[iFonll]->GetNbinsX() + 1, "width"); for (auto iChad{0}; iChad < NCharmHadrons; ++iChad) { hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][NBeautyHadrons][iFonll] = reinterpret_cast(hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][0][iFonll]->Clone(Form("hFonllNonPrompt%s%s", charmHadNames[iChad].data(), namesFonll[iFonll].data()))); hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][NBeautyHadrons][iFonll]->Reset(); for (auto iBHad{0}; iBHad < NBeautyHadrons; ++iBHad) { - hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][iBHad][iFonll]->Scale(normCrossSec[iFonll] / nDecays); + hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][iBHad][iFonll]->Scale(normCrossSec[iFonll] / nDecays, "width"); hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][NBeautyHadrons][iFonll]->Add(hFonllPythiaNonPromptChad[charmHadPdgs[iChad]][iBHad][iFonll]); } }