Skip to content

Commit 1ca81d5

Browse files
committed
codecheck
1 parent 510c7a5 commit 1ca81d5

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,25 +2254,23 @@ struct FlowGenericFramework {
22542254
// Only accept daughters consistent with the expected identities of K0 or Lambda decay.
22552255
if (cfgPIDCuts.cfgDaughterPIDRejection) {
22562256
if (cfgPIDCuts.cfgUseOnlyTPC) {
2257-
if (pid == Pions && std::abs(track.tpcNSigmaPi()) > cfgPIDCuts.cfgTPCNsigmaCut) {
2258-
return false;
2259-
} else if (pid == Protons && std::abs(track.tpcNSigmaPr()) > cfgPIDCuts.cfgTPCNsigmaCut) {
2260-
return false;
2261-
} else if (pid != Pions && pid != Protons) {
2262-
return false;
2257+
if (pid == Pions) {
2258+
return std::abs(track.tpcNSigmaPi()) <= cfgPIDCuts.cfgTPCNsigmaCut;
22632259
}
2264-
} else {
2265-
int partIndex = cfgPIDCuts.cfgUseAsymmetricPID ? getNsigmaPIDAssymmetric(track) : getNsigmaPID(track);
2266-
int pidIndex = partIndex - 1; // 0 = pion, 1 = kaon, 2 = proton
2267-
if (pid != Pions && pid != Protons) {
2268-
return false;
2269-
}
2270-
if (pidIndex != pid) {
2271-
return false;
2260+
if (pid == Protons) {
2261+
return std::abs(track.tpcNSigmaPr()) <= cfgPIDCuts.cfgTPCNsigmaCut;
22722262
}
2263+
return false;
2264+
}
2265+
int partIndex = cfgPIDCuts.cfgUseAsymmetricPID ? getNsigmaPIDAssymmetric(track) : getNsigmaPID(track);
2266+
int pidIndex = partIndex - 1; // 0 = pion, 1 = kaon, 2 = proton
2267+
if (pid != Pions && pid != Protons) {
2268+
return false;
2269+
}
2270+
if (pidIndex != pid) {
2271+
return false;
22732272
}
22742273
}
2275-
22762274
return true;
22772275
}
22782276

0 commit comments

Comments
 (0)