Skip to content

Commit 2607e02

Browse files
Maxim VirtaMaxim Virta
authored andcommitted
[PWGCF] Added safeguards for pt fractions
1 parent 839a4a9 commit 2607e02

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

PWGCF/GenericFramework/Tasks/flowGfwV02.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,9 @@ struct FlowGfwV02 {
886886
int bootstrap = fRndm->Integer(gfwMemberCache.nBootstrap);
887887
for (int pid = 0; pid < PidTotal; pid++) {
888888
int normIndex = (cfgNormalizeByCharged) ? PidCharged : pid;
889+
if (!pidStates.hPtForward[normIndex]->Integral() > 0 || !pidStates.hPtBackward[normIndex]->Integral() > 0) {
890+
continue; // Forward or backward pT distribution is not defined
891+
}
889892
for (int i = 1; i <= fSecondAxis->GetNbins(); i++) {
890893
ptFractionForward = pidStates.hPtForward[pid]->GetBinContent(i) / pidStates.hPtForward[normIndex]->Integral();
891894
ptFractionBackward = pidStates.hPtBackward[pid]->GetBinContent(i) / pidStates.hPtBackward[normIndex]->Integral();

0 commit comments

Comments
 (0)