Skip to content

Commit bd9d89f

Browse files
Require TOF on at least one of the decay daughters
1 parent f17c61c commit bd9d89f

File tree

1 file changed

+67
-29
lines changed

1 file changed

+67
-29
lines changed

PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ struct derivedlambdakzeroanalysis {
215215
Configurable<bool> rejectNegITSafterburner{"rejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"};
216216
Configurable<bool> requirePosITSafterburnerOnly{"requirePosITSafterburnerOnly", false, "require positive track formed out of afterburner ITS tracks"};
217217
Configurable<bool> requireNegITSafterburnerOnly{"requireNegITSafterburnerOnly", false, "require negative track formed out of afterburner ITS tracks"};
218+
Configurable<bool> requirePosHasTOF{"requirePosHasTOF", false, "require that positive track has an associated TOF signal. On false, TOF requirement (if any) is only applied IF the track has an associated TOF signal."};
219+
Configurable<bool> requireNegHasTOF{"requireNegHasTOF", false, "require that negative track has an associated TOF signal. On false, TOF requirement (if any) is only applied IF the track has an associated TOF signal."};
218220
Configurable<bool> rejectTPCsectorBoundary{"rejectTPCsectorBoundary", false, "reject tracks close to the TPC sector boundaries"};
219221
Configurable<std::string> phiLowCut{"phiLowCut", "0.06/x+pi/18.0-0.06", "Low azimuth cut parametrisation"};
220222
Configurable<std::string> phiHighCut{"phiHighCut", "0.1/x+pi/18.0+0.06", "High azimuth cut parametrisation"};
@@ -527,15 +529,15 @@ struct derivedlambdakzeroanalysis {
527529
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
528530
}
529531
// TOF PID
530-
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5) { // safeguard for no cut
532+
if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut
531533
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
532534
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
533535
}
534-
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5) { // safeguard for no cut
536+
if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut
535537
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
536538
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
537539
}
538-
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5) { // safeguard for no cut
540+
if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut
539541
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
540542
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
541543
}
@@ -553,15 +555,15 @@ struct derivedlambdakzeroanalysis {
553555
BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton);
554556
}
555557
// TOF PID
556-
if (v0Selections.tofPidNsigmaCutK0Pi < 1e+5) { // safeguard for no cut
558+
if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut
557559
BITSET(maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short);
558560
BITSET(maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short);
559561
}
560-
if (v0Selections.tofPidNsigmaCutLaPi < 1e+5) { // safeguard for no cut
562+
if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut
561563
BITSET(maskLambdaSpecific, selTOFNSigmaNegativePionLambda);
562564
BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda);
563565
}
564-
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5) { // safeguard for no cut
566+
if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut
565567
BITSET(maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda);
566568
BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda);
567569
}
@@ -1312,35 +1314,71 @@ struct derivedlambdakzeroanalysis {
13121314

13131315
// TOF PID in DeltaT
13141316
// Positive track
1315-
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1316-
BITSET(bitMap, selTOFDeltaTPositiveProtonLambda);
1317-
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1318-
BITSET(bitMap, selTOFDeltaTPositivePionLambda);
1319-
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1320-
BITSET(bitMap, selTOFDeltaTPositivePionK0Short);
1317+
if (v0Selections.requirePosHasTOF) {
1318+
if (posTrackExtra.hasTOF() && std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1319+
BITSET(bitMap, selTOFDeltaTPositiveProtonLambda);
1320+
if (posTrackExtra.hasTOF() && std::fabs(v0.posTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1321+
BITSET(bitMap, selTOFDeltaTPositivePionLambda);
1322+
if (posTrackExtra.hasTOF() && std::fabs(v0.posTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1323+
BITSET(bitMap, selTOFDeltaTPositivePionK0Short);
1324+
} else { // only apply TOF requirement if available
1325+
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1326+
BITSET(bitMap, selTOFDeltaTPositiveProtonLambda);
1327+
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1328+
BITSET(bitMap, selTOFDeltaTPositivePionLambda);
1329+
if (!posTrackExtra.hasTOF() || std::fabs(v0.posTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1330+
BITSET(bitMap, selTOFDeltaTPositivePionK0Short);
1331+
}
13211332
// Negative track
1322-
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1323-
BITSET(bitMap, selTOFDeltaTNegativeProtonLambda);
1324-
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1325-
BITSET(bitMap, selTOFDeltaTNegativePionLambda);
1326-
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1327-
BITSET(bitMap, selTOFDeltaTNegativePionK0Short);
1333+
if (v0Selections.requireNegHasTOF) {
1334+
if (negTrackExtra.hasTOF() && std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1335+
BITSET(bitMap, selTOFDeltaTNegativeProtonLambda);
1336+
if (negTrackExtra.hasTOF() && std::fabs(v0.negTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1337+
BITSET(bitMap, selTOFDeltaTNegativePionLambda);
1338+
if (negTrackExtra.hasTOF() && std::fabs(v0.negTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1339+
BITSET(bitMap, selTOFDeltaTNegativePionK0Short);
1340+
} else { // only apply TOF requirement if available
1341+
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton)
1342+
BITSET(bitMap, selTOFDeltaTNegativeProtonLambda);
1343+
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion)
1344+
BITSET(bitMap, selTOFDeltaTNegativePionLambda);
1345+
if (!negTrackExtra.hasTOF() || std::fabs(v0.negTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion)
1346+
BITSET(bitMap, selTOFDeltaTNegativePionK0Short);
1347+
}
13281348

13291349
// TOF PID in NSigma
13301350
// Positive track
1331-
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr)
1332-
BITSET(bitMap, selTOFNSigmaPositiveProtonLambda);
1333-
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaALaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1334-
BITSET(bitMap, selTOFNSigmaPositivePionLambda);
1335-
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaK0PiPlus()) < v0Selections.tofPidNsigmaCutK0Pi)
1336-
BITSET(bitMap, selTOFNSigmaPositivePionK0Short);
1351+
if (v0Selections.requirePosHasTOF) {
1352+
if (posTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr)
1353+
BITSET(bitMap, selTOFNSigmaPositiveProtonLambda);
1354+
if (posTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaALaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1355+
BITSET(bitMap, selTOFNSigmaPositivePionLambda);
1356+
if (posTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaK0PiPlus()) < v0Selections.tofPidNsigmaCutK0Pi)
1357+
BITSET(bitMap, selTOFNSigmaPositivePionK0Short);
1358+
} else { // only apply TOF requirement if available
1359+
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr)
1360+
BITSET(bitMap, selTOFNSigmaPositiveProtonLambda);
1361+
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaALaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1362+
BITSET(bitMap, selTOFNSigmaPositivePionLambda);
1363+
if (!posTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaK0PiPlus()) < v0Selections.tofPidNsigmaCutK0Pi)
1364+
BITSET(bitMap, selTOFNSigmaPositivePionK0Short);
1365+
}
13371366
// Negative track
1338-
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr)
1367+
if (v0Selections.requireNegHasTOF) {
1368+
if (negTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr)
13391369
BITSET(bitMap, selTOFNSigmaNegativeProtonLambda);
1340-
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaLaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1341-
BITSET(bitMap, selTOFNSigmaNegativePionLambda);
1342-
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaK0PiMinus()) < v0Selections.tofPidNsigmaCutK0Pi)
1343-
BITSET(bitMap, selTOFNSigmaNegativePionK0Short);
1370+
if (negTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaLaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1371+
BITSET(bitMap, selTOFNSigmaNegativePionLambda);
1372+
if (negTrackExtra.hasTOF() && std::fabs(v0.tofNSigmaK0PiMinus()) < v0Selections.tofPidNsigmaCutK0Pi)
1373+
BITSET(bitMap, selTOFNSigmaNegativePionK0Short);
1374+
} else { // only apply TOF requirement if available
1375+
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr)
1376+
BITSET(bitMap, selTOFNSigmaNegativeProtonLambda);
1377+
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaLaPi()) < v0Selections.tofPidNsigmaCutLaPi)
1378+
BITSET(bitMap, selTOFNSigmaNegativePionLambda);
1379+
if (!negTrackExtra.hasTOF() || std::fabs(v0.tofNSigmaK0PiMinus()) < v0Selections.tofPidNsigmaCutK0Pi)
1380+
BITSET(bitMap, selTOFNSigmaNegativePionK0Short);
1381+
}
13441382

13451383
// ITS only tag
13461384
if (posTrackExtra.tpcCrossedRows() < 1)

0 commit comments

Comments
 (0)