From 45ee47ba67ecf6da88d483d182dc073158a555fa Mon Sep 17 00:00:00 2001 From: Emil Gorm Nielsen Date: Fri, 10 Jul 2026 09:20:26 +0200 Subject: [PATCH] fix potential division by zero in registry filling in flowGfwNonflow.cxx --- PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx b/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx index 60f248df1fa..c294c2e1dc7 100644 --- a/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx +++ b/PWGCF/GenericFramework/Tasks/flowGfwNonflow.cxx @@ -756,7 +756,10 @@ struct FlowGfwNonflow { std::string histName = "inverseN"; histName += head; const int m = corrOrder - '0'; - recipNHistograms.at(histName)->Fill(centmult, 1. / std::pow(multiplicity, m - 1), dnx); + double multPower = std::pow(multiplicity, m - 1); + if (multPower != 0) { + recipNHistograms.at(histName)->Fill(centmult, 1. / multPower, dnx); + } auto val = fGFW->Calculate(corrconfigs.at(l_ind), 0, false).real() / dnx; if (std::abs(val) < 1) { fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, cfgUseMultiplicityFlowWeights ? dnx : 1.0, rndm);