@@ -215,6 +215,7 @@ 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 > requireAtLeastOneHasTOF{" requireAtLeastOneHasTOF" , false , " require that at least one of daughter tracks has an associated TOF signal" };
218219 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." };
219220 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." };
220221 Configurable<bool > rejectTPCsectorBoundary{" rejectTPCsectorBoundary" , false , " reject tracks close to the TPC sector boundaries" };
@@ -529,15 +530,15 @@ struct derivedlambdakzeroanalysis {
529530 BITSET (maskAntiLambdaSpecific, selTPCPIDPositivePion);
530531 }
531532 // TOF PID
532- if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
533+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
533534 BITSET (maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
534535 BITSET (maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
535536 }
536- if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6 ) { // safeguard for no cut
537+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6 ) { // safeguard for no cut
537538 BITSET (maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
538539 BITSET (maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
539540 }
540- if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
541+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
541542 BITSET (maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
542543 BITSET (maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
543544 }
@@ -555,15 +556,15 @@ struct derivedlambdakzeroanalysis {
555556 BITSET (maskAntiLambdaSpecific, selTPCPIDNegativeProton);
556557 }
557558 // TOF PID
558- if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
559+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
559560 BITSET (maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short);
560561 BITSET (maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short);
561562 }
562- if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
563+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6 ) { // safeguard for no cut
563564 BITSET (maskLambdaSpecific, selTOFNSigmaNegativePionLambda);
564565 BITSET (maskLambdaSpecific, selTOFDeltaTNegativePionLambda);
565566 }
566- if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6 ) { // safeguard for no cut
567+ if (v0Selections.requireAtLeastOneHasTOF || v0Selections. requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6 ) { // safeguard for no cut
567568 BITSET (maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda);
568569 BITSET (maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda);
569570 }
@@ -1314,13 +1315,25 @@ struct derivedlambdakzeroanalysis {
13141315
13151316 // TOF PID in DeltaT
13161317 // Positive track
1317- if (v0Selections.requirePosHasTOF ) {
1318- if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton )
1318+ if (v0Selections.requirePosHasTOF || v0Selections. requireAtLeastOneHasTOF ) {
1319+ if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton ) {
13191320 BITSET (bitMap, selTOFDeltaTPositiveProtonLambda);
1320- if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTLaPi ()) < v0Selections.maxDeltaTimePion )
1321+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1322+ BITSET (bitMap, selTOFDeltaTNegativePionLambda);
1323+ }
1324+ }
1325+ if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTLaPi ()) < v0Selections.maxDeltaTimePion ) {
13211326 BITSET (bitMap, selTOFDeltaTPositivePionLambda);
1322- if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTK0Pi ()) < v0Selections.maxDeltaTimePion )
1327+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1328+ BITSET (bitMap, selTOFDeltaTNegativeProtonLambda);
1329+ }
1330+ }
1331+ if (v0.positiveHasTOF () && std::fabs (v0.posTOFDeltaTK0Pi ()) < v0Selections.maxDeltaTimePion ) {
13231332 BITSET (bitMap, selTOFDeltaTPositivePionK0Short);
1333+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1334+ BITSET (bitMap, selTOFDeltaTNegativePionK0Short);
1335+ }
1336+ }
13241337 } else { // only apply TOF requirement if available
13251338 if (!v0.positiveHasTOF () || std::fabs (v0.posTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton )
13261339 BITSET (bitMap, selTOFDeltaTPositiveProtonLambda);
@@ -1330,13 +1343,25 @@ struct derivedlambdakzeroanalysis {
13301343 BITSET (bitMap, selTOFDeltaTPositivePionK0Short);
13311344 }
13321345 // Negative track
1333- if (v0Selections.requireNegHasTOF ) {
1334- if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton )
1346+ if (v0Selections.requireNegHasTOF || v0Selections. requireAtLeastOneHasTOF ) {
1347+ if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton ) {
13351348 BITSET (bitMap, selTOFDeltaTNegativeProtonLambda);
1336- if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTLaPi ()) < v0Selections.maxDeltaTimePion )
1349+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1350+ BITSET (bitMap, selTOFDeltaTPositivePionLambda);
1351+ }
1352+ }
1353+ if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTLaPi ()) < v0Selections.maxDeltaTimePion ) {
13371354 BITSET (bitMap, selTOFDeltaTNegativePionLambda);
1338- if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTK0Pi ()) < v0Selections.maxDeltaTimePion )
1355+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1356+ BITSET (bitMap, selTOFDeltaTPositiveProtonLambda);
1357+ }
1358+ }
1359+ if (v0.negativeHasTOF () && std::fabs (v0.negTOFDeltaTK0Pi ()) < v0Selections.maxDeltaTimePion ) {
13391360 BITSET (bitMap, selTOFDeltaTNegativePionK0Short);
1361+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1362+ BITSET (bitMap, selTOFDeltaTPositivePionK0Short);
1363+ }
1364+ }
13401365 } else { // only apply TOF requirement if available
13411366 if (!v0.negativeHasTOF () || std::fabs (v0.negTOFDeltaTLaPr ()) < v0Selections.maxDeltaTimeProton )
13421367 BITSET (bitMap, selTOFDeltaTNegativeProtonLambda);
@@ -1348,13 +1373,25 @@ struct derivedlambdakzeroanalysis {
13481373
13491374 // TOF PID in NSigma
13501375 // Positive track
1351- if (v0Selections.requirePosHasTOF ) {
1352- if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaLaPr ()) < v0Selections.tofPidNsigmaCutLaPr )
1376+ if (v0Selections.requirePosHasTOF || v0Selections. requireAtLeastOneHasTOF ) {
1377+ if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaLaPr ()) < v0Selections.tofPidNsigmaCutLaPr ) {
13531378 BITSET (bitMap, selTOFNSigmaPositiveProtonLambda);
1354- if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaALaPi ()) < v0Selections.tofPidNsigmaCutLaPi )
1379+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1380+ BITSET (bitMap, selTOFNSigmaNegativePionLambda);
1381+ }
1382+ }
1383+ if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaALaPi ()) < v0Selections.tofPidNsigmaCutLaPi ) {
13551384 BITSET (bitMap, selTOFNSigmaPositivePionLambda);
1356- if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaK0PiPlus ()) < v0Selections.tofPidNsigmaCutK0Pi )
1385+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1386+ BITSET (bitMap, selTOFNSigmaNegativeProtonLambda);
1387+ }
1388+ }
1389+ if (v0.positiveHasTOF () && std::fabs (v0.tofNSigmaK0PiPlus ()) < v0Selections.tofPidNsigmaCutK0Pi ) {
13571390 BITSET (bitMap, selTOFNSigmaPositivePionK0Short);
1391+ if (v0Selections.requireAtLeastOneHasTOF ) { // positive has a TOF hit --> no need to check for negative
1392+ BITSET (bitMap, selTOFNSigmaNegativePionK0Short);
1393+ }
1394+ }
13581395 } else { // only apply TOF requirement if available
13591396 if (!v0.positiveHasTOF () || std::fabs (v0.tofNSigmaLaPr ()) < v0Selections.tofPidNsigmaCutLaPr )
13601397 BITSET (bitMap, selTOFNSigmaPositiveProtonLambda);
@@ -1364,13 +1401,25 @@ struct derivedlambdakzeroanalysis {
13641401 BITSET (bitMap, selTOFNSigmaPositivePionK0Short);
13651402 }
13661403 // Negative track
1367- if (v0Selections.requireNegHasTOF ) {
1368- if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaALaPr ()) < v0Selections.tofPidNsigmaCutLaPr )
1404+ if (v0Selections.requireNegHasTOF || v0Selections. requireAtLeastOneHasTOF ) {
1405+ if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaALaPr ()) < v0Selections.tofPidNsigmaCutLaPr ) {
13691406 BITSET (bitMap, selTOFNSigmaNegativeProtonLambda);
1370- if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaLaPi ()) < v0Selections.tofPidNsigmaCutLaPi )
1407+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1408+ BITSET (bitMap, selTOFNSigmaPositivePionLambda);
1409+ }
1410+ }
1411+ if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaLaPi ()) < v0Selections.tofPidNsigmaCutLaPi ) {
13711412 BITSET (bitMap, selTOFNSigmaNegativePionLambda);
1372- if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaK0PiMinus ()) < v0Selections.tofPidNsigmaCutK0Pi )
1413+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1414+ BITSET (bitMap, selTOFNSigmaPositiveProtonLambda);
1415+ }
1416+ }
1417+ if (v0.negativeHasTOF () && std::fabs (v0.tofNSigmaK0PiMinus ()) < v0Selections.tofPidNsigmaCutK0Pi ) {
13731418 BITSET (bitMap, selTOFNSigmaNegativePionK0Short);
1419+ if (v0Selections.requireAtLeastOneHasTOF ) { // negative has a TOF hit --> no need to check for positive
1420+ BITSET (bitMap, selTOFNSigmaPositivePionK0Short);
1421+ }
1422+ }
13741423 } else { // only apply TOF requirement if available
13751424 if (!v0.negativeHasTOF () || std::fabs (v0.tofNSigmaALaPr ()) < v0Selections.tofPidNsigmaCutLaPr )
13761425 BITSET (bitMap, selTOFNSigmaNegativeProtonLambda);
0 commit comments