diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 8700b91bfd0..75d73541798 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -215,6 +215,7 @@ struct derivedlambdakzeroanalysis { Configurable rejectNegITSafterburner{"rejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"}; Configurable requirePosITSafterburnerOnly{"requirePosITSafterburnerOnly", false, "require positive track formed out of afterburner ITS tracks"}; Configurable requireNegITSafterburnerOnly{"requireNegITSafterburnerOnly", false, "require negative track formed out of afterburner ITS tracks"}; + Configurable requireAtLeastOneHasTOF{"requireAtLeastOneHasTOF", false, "require that at least one of daughter tracks has an associated TOF signal"}; Configurable 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."}; Configurable 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."}; Configurable rejectTPCsectorBoundary{"rejectTPCsectorBoundary", false, "reject tracks close to the TPC sector boundaries"}; @@ -529,15 +530,15 @@ struct derivedlambdakzeroanalysis { BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion); } // TOF PID - if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short); BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short); } - if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda); BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda); } - if (v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda); BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda); } @@ -555,15 +556,15 @@ struct derivedlambdakzeroanalysis { BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton); } // TOF PID - if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut BITSET(maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short); BITSET(maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short); } - if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut BITSET(maskLambdaSpecific, selTOFNSigmaNegativePionLambda); BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda); } - if (v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut BITSET(maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda); BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda); } @@ -1314,13 +1315,25 @@ struct derivedlambdakzeroanalysis { // TOF PID in DeltaT // Positive track - if (v0Selections.requirePosHasTOF) { - if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) + if (v0Selections.requirePosHasTOF || v0Selections.requireAtLeastOneHasTOF) { + if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) { BITSET(bitMap, selTOFDeltaTPositiveProtonLambda); - if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion) + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFDeltaTNegativePionLambda); + } + } + if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion) { BITSET(bitMap, selTOFDeltaTPositivePionLambda); - if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion) + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFDeltaTNegativeProtonLambda); + } + } + if (v0.positiveHasTOF() && std::fabs(v0.posTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion) { BITSET(bitMap, selTOFDeltaTPositivePionK0Short); + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFDeltaTNegativePionK0Short); + } + } } else { // only apply TOF requirement if available if (!v0.positiveHasTOF() || std::fabs(v0.posTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) BITSET(bitMap, selTOFDeltaTPositiveProtonLambda); @@ -1330,13 +1343,25 @@ struct derivedlambdakzeroanalysis { BITSET(bitMap, selTOFDeltaTPositivePionK0Short); } // Negative track - if (v0Selections.requireNegHasTOF) { - if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) + if (v0Selections.requireNegHasTOF || v0Selections.requireAtLeastOneHasTOF) { + if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) { BITSET(bitMap, selTOFDeltaTNegativeProtonLambda); - if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion) + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFDeltaTPositivePionLambda); + } + } + if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTLaPi()) < v0Selections.maxDeltaTimePion) { BITSET(bitMap, selTOFDeltaTNegativePionLambda); - if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion) + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFDeltaTPositiveProtonLambda); + } + } + if (v0.negativeHasTOF() && std::fabs(v0.negTOFDeltaTK0Pi()) < v0Selections.maxDeltaTimePion) { BITSET(bitMap, selTOFDeltaTNegativePionK0Short); + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFDeltaTPositivePionK0Short); + } + } } else { // only apply TOF requirement if available if (!v0.negativeHasTOF() || std::fabs(v0.negTOFDeltaTLaPr()) < v0Selections.maxDeltaTimeProton) BITSET(bitMap, selTOFDeltaTNegativeProtonLambda); @@ -1348,13 +1373,25 @@ struct derivedlambdakzeroanalysis { // TOF PID in NSigma // Positive track - if (v0Selections.requirePosHasTOF) { - if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr) + if (v0Selections.requirePosHasTOF || v0Selections.requireAtLeastOneHasTOF) { + if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr) { BITSET(bitMap, selTOFNSigmaPositiveProtonLambda); - if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaALaPi()) < v0Selections.tofPidNsigmaCutLaPi) + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFNSigmaNegativePionLambda); + } + } + if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaALaPi()) < v0Selections.tofPidNsigmaCutLaPi) { BITSET(bitMap, selTOFNSigmaPositivePionLambda); - if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaK0PiPlus()) < v0Selections.tofPidNsigmaCutK0Pi) + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFNSigmaNegativeProtonLambda); + } + } + if (v0.positiveHasTOF() && std::fabs(v0.tofNSigmaK0PiPlus()) < v0Selections.tofPidNsigmaCutK0Pi) { BITSET(bitMap, selTOFNSigmaPositivePionK0Short); + if (v0Selections.requireAtLeastOneHasTOF) { // positive has a TOF hit --> no need to check for negative + BITSET(bitMap, selTOFNSigmaNegativePionK0Short); + } + } } else { // only apply TOF requirement if available if (!v0.positiveHasTOF() || std::fabs(v0.tofNSigmaLaPr()) < v0Selections.tofPidNsigmaCutLaPr) BITSET(bitMap, selTOFNSigmaPositiveProtonLambda); @@ -1364,13 +1401,25 @@ struct derivedlambdakzeroanalysis { BITSET(bitMap, selTOFNSigmaPositivePionK0Short); } // Negative track - if (v0Selections.requireNegHasTOF) { - if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr) + if (v0Selections.requireNegHasTOF || v0Selections.requireAtLeastOneHasTOF) { + if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr) { BITSET(bitMap, selTOFNSigmaNegativeProtonLambda); - if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPi()) < v0Selections.tofPidNsigmaCutLaPi) + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFNSigmaPositivePionLambda); + } + } + if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaLaPi()) < v0Selections.tofPidNsigmaCutLaPi) { BITSET(bitMap, selTOFNSigmaNegativePionLambda); - if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaK0PiMinus()) < v0Selections.tofPidNsigmaCutK0Pi) + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFNSigmaPositiveProtonLambda); + } + } + if (v0.negativeHasTOF() && std::fabs(v0.tofNSigmaK0PiMinus()) < v0Selections.tofPidNsigmaCutK0Pi) { BITSET(bitMap, selTOFNSigmaNegativePionK0Short); + if (v0Selections.requireAtLeastOneHasTOF) { // negative has a TOF hit --> no need to check for positive + BITSET(bitMap, selTOFNSigmaPositivePionK0Short); + } + } } else { // only apply TOF requirement if available if (!v0.negativeHasTOF() || std::fabs(v0.tofNSigmaALaPr()) < v0Selections.tofPidNsigmaCutLaPr) BITSET(bitMap, selTOFNSigmaNegativeProtonLambda);