Skip to content

Commit efe7bb7

Browse files
author
Zuzanna Chochulska
committed
Corrections for the PR part 16
1 parent 7bdbbf7 commit efe7bb7

1 file changed

Lines changed: 24 additions & 31 deletions

File tree

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -231,49 +231,45 @@ struct FemtoUniversePairTaskTrackPhi {
231231
{
232232
if (mom < confTrackPtPIDLimit) {
233233
return std::abs(nsigmaTPCPr) < confPIDProtonNsigmaTPC;
234-
} else {
235-
return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaCombined;
236234
}
235+
return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaCombined;
237236
}
238237

239238
bool isProtonRejected(float mom, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK)
240239
{
241240
if (mom < kMomCutLow) {
242241
return true;
243-
} else {
244-
return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject;
245242
}
243+
return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject;
246244
}
247245

248246
bool isKaonNSigma(float mom, bool hasTOF, float nsigmaTPCK, float nsigmaTOFK)
249247
{
250248
if (confTrackUseRun3PIDforKaons) {
251249
if (mom < kMomCutLow) {
252250
return std::abs(nsigmaTPCK) < kNSigmaStandard;
253-
} else {
254-
if (hasTOF) { // if TOF is available, use combine nsigma
255-
return std::hypot(nsigmaTOFK, nsigmaTPCK) < kNSigmaStandard;
256-
} else { // if TOF is not available, use TPC nsigma
257-
return std::abs(nsigmaTPCK) < kNSigmaStandard;
258-
}
259-
}
260-
} else {
261-
if (mom < kMomCutKaonLow) { // 0.0-0.3
262-
return std::abs(nsigmaTPCK) < kNSigmaStandard;
263251
}
264-
if (mom < kMomCutKaonMid) { // 0.30 - 0.45
265-
return std::abs(nsigmaTPCK) < kNSigmaMedium;
266-
}
267-
if (mom < kMomCutKaonHigh) { // 0.45-0.55
268-
return std::abs(nsigmaTPCK) < kNSigmaStrict;
269-
}
270-
if (mom < kMomCutKaonMax) { // 0.55-1.5 (now we use TPC and TOF)
252+
if (hasTOF) { // if TOF is available, use combine nsigma
271253
return std::hypot(nsigmaTOFK, nsigmaTPCK) < kNSigmaStandard;
272254
}
273-
if (mom > kMomCutKaonMax) { // 1.5 -
274-
return (std::abs(nsigmaTOFK) < kNSigmaMedium) && (std::abs(nsigmaTPCK) < kNSigmaStandard);
275-
}
276-
return false;
255+
// if TOF is not available, use TPC nsigma
256+
return std::abs(nsigmaTPCK) < kNSigmaStandard;
257+
}
258+
259+
if (mom < kMomCutKaonLow) { // 0.0-0.3
260+
return std::abs(nsigmaTPCK) < kNSigmaStandard;
261+
}
262+
if (mom < kMomCutKaonMid) { // 0.30 - 0.45
263+
return std::abs(nsigmaTPCK) < kNSigmaMedium;
264+
}
265+
if (mom < kMomCutKaonHigh) { // 0.45-0.55
266+
return std::abs(nsigmaTPCK) < kNSigmaStrict;
267+
}
268+
if (mom < kMomCutKaonMax) { // 0.55-1.5 (now we use TPC and TOF)
269+
return std::hypot(nsigmaTOFK, nsigmaTPCK) < kNSigmaStandard;
270+
}
271+
if (mom > kMomCutKaonMax) { // 1.5 -
272+
return (std::abs(nsigmaTOFK) < kNSigmaMedium) && (std::abs(nsigmaTPCK) < kNSigmaStandard);
277273
}
278274
return false;
279275
}
@@ -282,27 +278,24 @@ struct FemtoUniversePairTaskTrackPhi {
282278
{
283279
if (mom < kMomCutLow) {
284280
return (std::abs(nsigmaTPCPi) < confPIDPionNsigmaReject) || (std::abs(nsigmaTPCPr) < confPIDProtonNsigmaReject);
285-
} else {
286-
return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject);
287281
}
282+
return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject);
288283
}
289284

290285
bool isPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi)
291286
{
292287
if (mom < kMomCutLow) {
293288
return (std::abs(nsigmaTPCPi) < confPIDPionNsigmaTPC);
294-
} else {
295-
return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaCombined);
296289
}
290+
return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaCombined);
297291
}
298292

299293
bool isPionRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCK, float nsigmaTOFK)
300294
{
301295
if (mom < kMomCutLow) {
302296
return (std::abs(nsigmaTPCK) < confPIDKaonNsigmaReject) || (std::abs(nsigmaTPCPr) < confPIDProtonNsigmaReject);
303-
} else {
304-
return (std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject);
305297
}
298+
return (std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject);
306299
}
307300

308301
bool isParticleNSigmaAccepted(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK)

0 commit comments

Comments
 (0)