Skip to content

Commit a8eaa2a

Browse files
committed
Fix linter
1 parent be7e6f5 commit a8eaa2a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,11 @@ double getWeight(const double pT, const std::vector<double>& pT_bins, const std:
266266
break;
267267
}
268268
}
269-
return 1.0 / (efficiency[eff_bin] * (getRapidity(pT, eta_max) - getRapidity(pT, eta_min)));
269+
270+
if (eff_bin == -1) {
271+
LOGF(warn, "pT value %f is outside the defined pT bins", pT);
272+
return 0.0;
273+
} else {
274+
return 1.0 / (efficiency[eff_bin] * (getRapidity(pT, eta_max) - getRapidity(pT, eta_min)));
275+
}
270276
}

0 commit comments

Comments
 (0)