From a018ec862b6395a5b692adc0ad442c2d47e4a228 Mon Sep 17 00:00:00 2001 From: romainschotter Date: Wed, 22 Apr 2026 23:48:59 +0200 Subject: [PATCH 1/3] Add option to study V0s from TPC-only and deep secondary tracks --- .../derivedlambdakzeroanalysis.cxx | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 654a36e9c54..4a98b19b230 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -218,6 +218,10 @@ struct derivedlambdakzeroanalysis { Configurable skipTPConly{"skipTPConly", false, "skip V0s comprised of at least one TPC only prong"}; Configurable requirePosITSonly{"requirePosITSonly", false, "require that positive track is ITSonly (overrides TPC quality)"}; Configurable requireNegITSonly{"requireNegITSonly", false, "require that negative track is ITSonly (overrides TPC quality)"}; + Configurable requirePosTPConly{"requirePosTPConly", false, "require that positive track is TPConly (overrides ITS-TOF quality)"}; + Configurable requireNegTPConly{"requireNegTPConly", false, "require that negative track is TPConly (overrides ITS-TOF quality)"}; + Configurable requirePosDeepSec{"requirePosDeepSec", false, "require that positive track is a deep secondary (overrides ITS quality)"}; + Configurable requireNegDeepSec{"requireNegDeepSec", false, "require that negative track is a deep secondary (overrides ITS quality)"}; Configurable rejectPosITSafterburner{"rejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"}; 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"}; @@ -418,6 +422,10 @@ struct derivedlambdakzeroanalysis { selNegGoodITSTrack, // at least min # ITS clusters selPosItsOnly, selNegItsOnly, + selPosTPCOnly, + selNegTPCOnly, + selPosDeepSec, + selNegDeepSec, selPosNotTPCOnly, selNegNotTPCOnly, selConsiderK0Short, // for mc tagging @@ -530,6 +538,31 @@ struct derivedlambdakzeroanalysis { if (v0Selections.requirePosITSonly) { BITSET(maskTrackProperties, selPosItsOnly); BITSET(maskTrackProperties, selPosGoodITSTrack); + } else if (v0Selections.requirePosTPConly) { + BITSET(maskTrackProperties, selPosTPCOnly); + BITSET(maskTrackProperties, selPosGoodTPCTrack); + } else if (v0Selections.requirePosDeepSec) { + BITSET(maskTrackProperties, selPosDeepSec); + BITSET(maskTrackProperties, selPosGoodTPCTrack); + // TPC signal is available: ask for positive track PID + if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut + BITSET(maskK0ShortSpecific, selTPCPIDPositivePion); + BITSET(maskLambdaSpecific, selTPCPIDPositiveProton); + BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion); + } + // TOF PID + 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.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut + BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda); + BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda); + } + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda); + BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda); + } } else { BITSET(maskTrackProperties, selPosGoodTPCTrack); BITSET(maskTrackProperties, selPosGoodITSTrack); @@ -556,6 +589,31 @@ struct derivedlambdakzeroanalysis { if (v0Selections.requireNegITSonly) { BITSET(maskTrackProperties, selNegItsOnly); BITSET(maskTrackProperties, selNegGoodITSTrack); + } else if (v0Selections.requireNegTPConly) { + BITSET(maskTrackProperties, selNegTPCOnly); + BITSET(maskTrackProperties, selNegGoodTPCTrack); + } else if (v0Selections.requireNegDeepSec) { + BITSET(maskTrackProperties, selNegDeepSec); + BITSET(maskTrackProperties, selNegGoodTPCTrack); + // TPC signal is available: ask for negative track PID + if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut + BITSET(maskK0ShortSpecific, selTPCPIDNegativePion); + BITSET(maskLambdaSpecific, selTPCPIDNegativePion); + BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton); + } + // TOF PID + 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.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut + BITSET(maskLambdaSpecific, selTOFNSigmaNegativePionLambda); + BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda); + } + if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut + BITSET(maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda); + BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda); + } } else { BITSET(maskTrackProperties, selNegGoodTPCTrack); BITSET(maskTrackProperties, selNegGoodITSTrack); @@ -775,8 +833,12 @@ struct derivedlambdakzeroanalysis { hSelectionV0s->GetXaxis()->SetBinLabel(selNegGoodITSTrack + 2, "Neg. good ITS track"); hSelectionV0s->GetXaxis()->SetBinLabel(selPosItsOnly + 2, "Pos. ITS-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegItsOnly + 2, "Neg. ITS-only"); + hSelectionV0s->GetXaxis()->SetBinLabel(selPosTPCOnly + 2, "Pos. TPC-only"); + hSelectionV0s->GetXaxis()->SetBinLabel(selNegTPCOnly + 2, "Neg. TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selPosNotTPCOnly + 2, "Pos. not TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegNotTPCOnly + 2, "Neg. not TPC-only"); + hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec."); + hSelectionV0s->GetXaxis()->SetBinLabel(selNegDeepSec + 2, "Neg. deep sec."); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderK0Short + 2, "True K^{0}_{S}"); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderLambda + 2, "True #Lambda"); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderAntiLambda + 2, "True #bar{#Lambda}"); @@ -1488,6 +1550,41 @@ struct derivedlambdakzeroanalysis { BITSET(bitMap, selPosNotTPCOnly); if (negTrackExtra.detectorMap() != o2::aod::track::TPC) BITSET(bitMap, selNegNotTPCOnly); + if (!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) && + verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) + BITSET(bitMap, selPosTPCOnly); + if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) && + verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) + BITSET(bitMap, selNegTPCOnly); + // deep secondary : TPC-TRD, TPC-TOF, TPC-TRD-TOF + if (!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) + BITSET(bitMap, selPosDeepSec); + if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) + BITSET(bitMap, selNegDeepSec); // proper lifetime if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 < v0Selections.lifetimecut->get("lifetimecutLambda")) @@ -1758,6 +1855,8 @@ struct derivedlambdakzeroanalysis { double invMassLambda = v0Selections.useUncheckedMass ? v0.mLambda_unchecked() : v0.mLambda(); double invMassAntiLambda = v0Selections.useUncheckedMass ? v0.mAntiLambda_unchecked() : v0.mAntiLambda(); + LOG(info) << int(v0.v0Type()) << " " << int(posTrackExtra.detectorMap()) << " " << int(negTrackExtra.detectorMap()) << " " << invMassK0Short << " " << invMassLambda << " " << invMassAntiLambda; + // __________________________________________ // fill with no selection if plain QA requested if (doPlainTopoQA) { From 9703ac1f12170cb4ef05f8038b1255015ec64819 Mon Sep 17 00:00:00 2001 From: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com> Date: Wed, 22 Apr 2026 23:51:52 +0200 Subject: [PATCH 2/3] Fix --- .../Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 4a98b19b230..f2919353bd4 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -422,9 +422,9 @@ struct derivedlambdakzeroanalysis { selNegGoodITSTrack, // at least min # ITS clusters selPosItsOnly, selNegItsOnly, - selPosTPCOnly, - selNegTPCOnly, - selPosDeepSec, + selPosTPCOnly, + selNegTPCOnly, + selPosDeepSec, selNegDeepSec, selPosNotTPCOnly, selNegNotTPCOnly, @@ -835,10 +835,10 @@ struct derivedlambdakzeroanalysis { hSelectionV0s->GetXaxis()->SetBinLabel(selNegItsOnly + 2, "Neg. ITS-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selPosTPCOnly + 2, "Pos. TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegTPCOnly + 2, "Neg. TPC-only"); + hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec."); + hSelectionV0s->GetXaxis()->SetBinLabel(selNegDeepSec + 2, "Neg. deep sec."); hSelectionV0s->GetXaxis()->SetBinLabel(selPosNotTPCOnly + 2, "Pos. not TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegNotTPCOnly + 2, "Neg. not TPC-only"); - hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec."); - hSelectionV0s->GetXaxis()->SetBinLabel(selNegDeepSec + 2, "Neg. deep sec."); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderK0Short + 2, "True K^{0}_{S}"); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderLambda + 2, "True #Lambda"); hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderAntiLambda + 2, "True #bar{#Lambda}"); @@ -1855,8 +1855,6 @@ struct derivedlambdakzeroanalysis { double invMassLambda = v0Selections.useUncheckedMass ? v0.mLambda_unchecked() : v0.mLambda(); double invMassAntiLambda = v0Selections.useUncheckedMass ? v0.mAntiLambda_unchecked() : v0.mAntiLambda(); - LOG(info) << int(v0.v0Type()) << " " << int(posTrackExtra.detectorMap()) << " " << int(negTrackExtra.detectorMap()) << " " << invMassK0Short << " " << invMassLambda << " " << invMassAntiLambda; - // __________________________________________ // fill with no selection if plain QA requested if (doPlainTopoQA) { From 0d0a67ad633c42cb512be51ff7d31916d4a49066 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 22 Apr 2026 21:52:31 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- .../derivedlambdakzeroanalysis.cxx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index f2919353bd4..bb4241a513e 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -422,9 +422,9 @@ struct derivedlambdakzeroanalysis { selNegGoodITSTrack, // at least min # ITS clusters selPosItsOnly, selNegItsOnly, - selPosTPCOnly, - selNegTPCOnly, - selPosDeepSec, + selPosTPCOnly, + selNegTPCOnly, + selPosDeepSec, selNegDeepSec, selPosNotTPCOnly, selNegNotTPCOnly, @@ -835,7 +835,7 @@ struct derivedlambdakzeroanalysis { hSelectionV0s->GetXaxis()->SetBinLabel(selNegItsOnly + 2, "Neg. ITS-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selPosTPCOnly + 2, "Pos. TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegTPCOnly + 2, "Neg. TPC-only"); - hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec."); + hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec."); hSelectionV0s->GetXaxis()->SetBinLabel(selNegDeepSec + 2, "Neg. deep sec."); hSelectionV0s->GetXaxis()->SetBinLabel(selPosNotTPCOnly + 2, "Pos. not TPC-only"); hSelectionV0s->GetXaxis()->SetBinLabel(selNegNotTPCOnly + 2, "Neg. not TPC-only"); @@ -1558,32 +1558,32 @@ struct derivedlambdakzeroanalysis { !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) && - verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) + verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) BITSET(bitMap, selPosTPCOnly); if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) && - !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) && - verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) + verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) BITSET(bitMap, selNegTPCOnly); // deep secondary : TPC-TRD, TPC-TOF, TPC-TRD-TOF if (!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && - !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && - !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && - !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && - !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) && - verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && + !verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC))) BITSET(bitMap, selPosDeepSec); if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) && !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) && - !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) && - verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) + !verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) && + verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC))) BITSET(bitMap, selNegDeepSec); // proper lifetime