Skip to content

Commit 2d30a02

Browse files
Maxim VirtaMaxim Virta
authored andcommitted
[PWGCF] NaN fill averted
1 parent 3894426 commit 2d30a02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ struct FlowGfwV02 {
859859
double ptFractionMid = 0.;
860860
double dnxAB = fGFW->Calculate(corrconfigs.at(0), 0, kTRUE).real(); // V22 weight for AB
861861
auto valAB = fGFW->Calculate(corrconfigs.at(0), 0, kFALSE).real() / dnxAB;
862-
if (std::abs(valAB) > threshold) {
862+
if (std::abs(valAB) > threshold || std::isnan(valAB) || std::isinf(valAB) || dnxAB < 1e-8) {
863863
return;
864864
}
865865
double v22pt = valAB * ptMeanMid;

0 commit comments

Comments
 (0)