From 7a8ba82046b9d80ff0c75ebba8e92358aa37a65d Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Sun, 19 Oct 2025 08:29:36 +0200 Subject: [PATCH 1/4] Add switch to turn on/off collision reassociation --- .../Strangeness/strangenesstofpid.cxx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 5d6c360bf09..799b2ad9559 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -101,6 +101,7 @@ struct strangenesstofpid { Configurable calculationMethod{"calculationMethod", 0, "algorithm for TOF calculation. 0: fast analytical withouot eloss, 1: O2 Propagator + trackLTIntegral (slow), 2: both methods and do comparison studies (slow)"}; Configurable calculateV0s{"calculateV0s", -1, "calculate V0-related TOF PID (0: no, 1: yes, -1: auto)"}; Configurable calculateCascades{"calculateCascades", -1, "calculate cascade-related TOF PID (0: no, 1: yes, -1: auto)"}; + Configurable reassociateTracks{"reassociateTracks", true, "if true, reassociate tracks to the collision the V0 or cascade belongs to. Relevant especially at high IR"}; // auxiliary / debug tables as desired Configurable calculateV0TOFPIDs{"calculateV0TOFPIDs", -1, "calculate V0TOFPIDs table (0: no, 1: yes, -1: auto)"}; @@ -1257,7 +1258,7 @@ struct strangenesstofpid { pTof.hasTPC = pTra.hasTPC(); pTof.hasTOF = pTra.hasTOF(); pTof.tofExpMom = pTra.tofExpMom(); - pTof.tofEvTime = collisionEventTime[V0.collisionId()]; + pTof.tofEvTime = reassociateTracks?collisionEventTime[V0.collisionId()]:pTra.tofEvTime(); pTof.tofSignal = pTra.tofSignal(); pTof.length = pTra.length(); pTof.tpcNSigmaPi = pTra.tpcNSigmaPi(); @@ -1268,7 +1269,7 @@ struct strangenesstofpid { nTof.hasTPC = nTra.hasTPC(); nTof.hasTOF = nTra.hasTOF(); nTof.tofExpMom = nTra.tofExpMom(); - nTof.tofEvTime = collisionEventTime[V0.collisionId()]; + nTof.tofEvTime = reassociateTracks?collisionEventTime[V0.collisionId()]:nTra.tofEvTime(); nTof.tofSignal = nTra.tofSignal(); nTof.length = nTra.length(); nTof.tpcNSigmaPi = nTra.tpcNSigmaPi(); @@ -1312,7 +1313,7 @@ struct strangenesstofpid { pTof.hasTPC = pTra.hasTPC(); pTof.hasTOF = pTra.hasTOF(); pTof.tofExpMom = pTra.tofExpMom(); - pTof.tofEvTime = collisionEventTime[cascade.collisionId()]; + pTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:pTra.tofEvTime(); pTof.tofSignal = pTra.tofSignal(); pTof.length = pTra.length(); pTof.tpcNSigmaPi = pTra.tpcNSigmaPi(); @@ -1323,7 +1324,7 @@ struct strangenesstofpid { nTof.hasTPC = nTra.hasTPC(); nTof.hasTOF = nTra.hasTOF(); nTof.tofExpMom = nTra.tofExpMom(); - nTof.tofEvTime = collisionEventTime[cascade.collisionId()]; + nTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:nTra.tofEvTime(); nTof.tofSignal = nTra.tofSignal(); nTof.length = nTra.length(); nTof.tpcNSigmaPi = nTra.tpcNSigmaPi(); @@ -1334,7 +1335,7 @@ struct strangenesstofpid { bTof.hasTPC = bTra.hasTPC(); bTof.hasTOF = bTra.hasTOF(); bTof.tofExpMom = bTra.tofExpMom(); - bTof.tofEvTime = collisionEventTime[cascade.collisionId()]; + bTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:bTra.tofEvTime(); bTof.tofSignal = bTra.tofSignal(); bTof.length = bTra.length(); bTof.tpcNSigmaPi = bTra.tpcNSigmaPi(); @@ -1410,7 +1411,7 @@ struct strangenesstofpid { auto pTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[V0.posTrackExtraId()]); pTof.collisionId = pTofExt.straCollisionId(); pTof.tofExpMom = pTofExt.tofExpMom(); - pTof.tofEvTime = collision.eventTime(); + pTof.tofEvTime = reassociateTracks.value?collision.eventTime():pTofExt.tofEvTime(); pTof.tofSignal = pTofExt.tofSignal(); pTof.length = pTofExt.length(); } @@ -1424,7 +1425,7 @@ struct strangenesstofpid { auto nTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[V0.negTrackExtraId()]); nTof.collisionId = nTofExt.straCollisionId(); nTof.tofExpMom = nTofExt.tofExpMom(); - nTof.tofEvTime = collision.eventTime(); + nTof.tofEvTime = reassociateTracks.value?collision.eventTime():nTofExt.tofEvTime(); nTof.tofSignal = nTofExt.tofSignal(); nTof.length = nTofExt.length(); } @@ -1472,7 +1473,7 @@ struct strangenesstofpid { auto pTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.posTrackExtraId()]); pTof.collisionId = pTofExt.straCollisionId(); pTof.tofExpMom = pTofExt.tofExpMom(); - pTof.tofEvTime = collision.eventTime(); + pTof.tofEvTime = reassociateTracks.value?collision.eventTime():pTofExt.tofEvTime(); pTof.tofSignal = pTofExt.tofSignal(); pTof.length = pTofExt.length(); } @@ -1486,7 +1487,7 @@ struct strangenesstofpid { auto nTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.negTrackExtraId()]); nTof.collisionId = nTofExt.straCollisionId(); nTof.tofExpMom = nTofExt.tofExpMom(); - nTof.tofEvTime = collision.eventTime(); + nTof.tofEvTime = reassociateTracks.value?collision.eventTime():nTofExt.tofEvTime(); nTof.tofSignal = nTofExt.tofSignal(); nTof.length = nTofExt.length(); } @@ -1500,7 +1501,7 @@ struct strangenesstofpid { auto bTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.bachTrackExtraId()]); bTof.collisionId = bTofExt.straCollisionId(); bTof.tofExpMom = bTofExt.tofExpMom(); - bTof.tofEvTime = collision.eventTime(); + bTof.tofEvTime = reassociateTracks.value?collision.eventTime():bTofExt.tofEvTime(); bTof.tofSignal = bTofExt.tofSignal(); bTof.length = bTofExt.length(); } From 69a94be284993c8f5925998bd4c4a94b15ad6507 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Sun, 19 Oct 2025 10:56:39 +0200 Subject: [PATCH 2/4] Add extras for QA --- .../Strangeness/strangenesstofpid.cxx | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 799b2ad9559..3d83d880b9d 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -200,6 +200,14 @@ struct strangenesstofpid { kHasTOF, kNEnums }; + // bookkeep propagation failures and successes + enum typesOfPropagation { kPropagPosV0 = 0, + kPropagNegV0, + kPropagPosCasc, + kPropagNegCasc, + kPropagBachCasc, + kPropagTypes }; + /// function to calculate track length of this track up to a certain segment of a detector /// to be used internally in another function that calculates length until it finds the proper one /// warning: this could be optimised further for speed @@ -406,6 +414,11 @@ struct strangenesstofpid { // measured vs expected total time QA if (doQA) { + // if in mode 1, bookkeep the failures of propagation + if(calculationMethod.value == 1){ + histos.add("hPropagationBookkeeping", "hPropagationBookkeeping", kTProfile, {{5, -0.5f, 4.5f}}); + } + // standard deltaTime values if (calculateV0s.value > 0) { histos.add("h2dDeltaTimePositiveLambdaPi", "h2dDeltaTimePositiveLambdaPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); @@ -777,6 +790,7 @@ struct strangenesstofpid { const o2::math_utils::Point3D trackVertex{trackCollision.posX(), trackCollision.posY(), trackCollision.posZ()}; o2::track::TrackLTIntegral ltIntegral; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, posTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); + histos.fill(HIST("hPropagationBookkeeping"), kPropagPosV0, static_cast(successPropag)); if (successPropag) { lengthPositive = pTof.length - ltIntegral.getL(); v0tof.timePositivePr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, lengthPositive, o2::constants::physics::MassProton * o2::constants::physics::MassProton); @@ -807,16 +821,25 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimePositiveLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPr); histos.fill(HIST("h2dCorrectAssocPositiveLambdaPr"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPr"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePr); + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaPositiveLambdaPr"), v0.pt(), v0tof.nSigmaPositiveLambdaPr); + } } if (antiLambdaCandidate) { histos.fill(HIST("h2dDeltaTimePositiveLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPi); histos.fill(HIST("h2dCorrectAssocPositiveLambdaPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaPositiveLambdaPi"), v0.pt(), v0tof.nSigmaPositiveLambdaPi); + } } if (k0ShortCandidate) { histos.fill(HIST("h2dDeltaTimePositiveK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveK0ShortPi); histos.fill(HIST("h2dCorrectAssocPositiveK0ShortPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveK0ShortPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveK0ShortPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaPositiveK0ShortPi"), v0.pt(), v0tof.nSigmaPositiveK0ShortPi); + } } } } @@ -843,6 +866,7 @@ struct strangenesstofpid { const o2::math_utils::Point3D trackVertex{trackCollision.posX(), trackCollision.posY(), trackCollision.posZ()}; o2::track::TrackLTIntegral ltIntegral; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, negTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); + histos.fill(HIST("hPropagationBookkeeping"), kPropagNegV0, static_cast(successPropag)); if (successPropag) { lengthNegative = nTof.length - ltIntegral.getL(); v0tof.timeNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, lengthNegative, o2::constants::physics::MassProton * o2::constants::physics::MassProton); @@ -873,16 +897,25 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPi); histos.fill(HIST("h2dCorrectAssocNegativeLambdaPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaNegativeLambdaPi"), v0.pt(), v0tof.nSigmaNegativeLambdaPi); + } } if (antiLambdaCandidate) { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPr); histos.fill(HIST("h2dCorrectAssocNegativeLambdaPr"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPr"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePr); + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaNegativeLambdaPr"), v0.pt(), v0tof.nSigmaNegativeLambdaPr); + } } if (k0ShortCandidate) { histos.fill(HIST("h2dDeltaTimeNegativeK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeK0ShortPi); histos.fill(HIST("h2dCorrectAssocNegativeK0ShortPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeK0ShortPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeK0ShortPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + histos.fill(HIST("h2dNSigmaNegativeK0ShortPi"), v0.pt(), v0tof.nSigmaNegativeK0ShortPi); + } } } } @@ -1005,6 +1038,7 @@ struct strangenesstofpid { const o2::math_utils::Point3D trackVertex{trackCollision.posX(), trackCollision.posY(), trackCollision.posZ()}; o2::track::TrackLTIntegral ltIntegral; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, posTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); + histos.fill(HIST("hPropagationBookkeeping"), kPropagPosCasc, static_cast(successPropag)); if (successPropag) { lengthPositive = pTof.length - ltIntegral.getL(); casctof.posFlightPr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length - ltIntegral.getL(), o2::constants::physics::MassProton * o2::constants::physics::MassProton); @@ -1040,21 +1074,33 @@ struct strangenesstofpid { histos.fill(HIST("h2dposDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPr); histos.fill(HIST("h2dposCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiLaPr"), cascade.pt(), casctof.nSigmaXiLaPr); + } } if (xiPlusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPi); histos.fill(HIST("h2dposCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiLaPi"), cascade.pt(), casctof.nSigmaXiLaPi); + } } if (omegaMinusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPr); histos.fill(HIST("h2dposCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmLaPr"), cascade.pt(), casctof.nSigmaOmLaPr); + } } if (omegaPlusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPi); histos.fill(HIST("h2dposCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmLaPi"), cascade.pt(), casctof.nSigmaOmLaPi); + } } } } @@ -1082,6 +1128,7 @@ struct strangenesstofpid { const o2::math_utils::Point3D trackVertex{trackCollision.posX(), trackCollision.posY(), trackCollision.posZ()}; o2::track::TrackLTIntegral ltIntegral; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, negTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); + histos.fill(HIST("hPropagationBookkeeping"), kPropagNegCasc, static_cast(successPropag)); if (successPropag) { lengthNegative = nTof.length - ltIntegral.getL(); casctof.negFlightPr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length - ltIntegral.getL(), o2::constants::physics::MassProton * o2::constants::physics::MassProton); @@ -1117,21 +1164,33 @@ struct strangenesstofpid { histos.fill(HIST("h2dnegDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPi); histos.fill(HIST("h2dnegCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiLaPi"), cascade.pt(), casctof.nSigmaXiLaPi); + } } if (xiPlusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPr); histos.fill(HIST("h2dnegCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiLaPr"), cascade.pt(), casctof.nSigmaXiLaPr); + } } if (omegaMinusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPi); histos.fill(HIST("h2dnegCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmLaPi"), cascade.pt(), casctof.nSigmaOmLaPi); + } } if (omegaPlusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPr); histos.fill(HIST("h2dnegCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmLaPr"), cascade.pt(), casctof.nSigmaOmLaPr); + } } } } @@ -1159,6 +1218,7 @@ struct strangenesstofpid { const o2::math_utils::Point3D trackVertex{trackCollision.posX(), trackCollision.posY(), trackCollision.posZ()}; o2::track::TrackLTIntegral ltIntegral; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, bachTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); + histos.fill(HIST("hPropagationBookkeeping"), kPropagBachCasc, static_cast(successPropag)); if (successPropag) { lengthBachelor = bTof.length - ltIntegral.getL(); casctof.bachFlightPi = o2::framework::pid::tof::MassToExpTime(bTof.tofExpMom, bTof.length - ltIntegral.getL(), o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); @@ -1192,21 +1252,33 @@ struct strangenesstofpid { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaXiPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiPi"), cascade.pt(), casctof.nSigmaXiPi); + } } if (xiPlusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); + if (doQANSigma && std::fabs(casctof.nSigmaXiPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaXiPi"), cascade.pt(), casctof.nSigmaXiPi); + } } if (omegaMinusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); + if (doQANSigma && std::fabs(casctof.nSigmaOmKa-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmKa"), cascade.pt(), casctof.nSigmaOmKa); + } } if (omegaPlusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); + if (doQANSigma && std::fabs(casctof.nSigmaOmKa-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + histos.fill(HIST("h2dNSigmaOmKa"), cascade.pt(), casctof.nSigmaOmKa); + } } } } From 90863eb9b42fbf7716320d42e4c760e05d99880e Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Sun, 19 Oct 2025 10:59:53 +0200 Subject: [PATCH 3/4] Please consider the following formatting changes (#489) --- .../Strangeness/strangenesstofpid.cxx | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 3d83d880b9d..7f256d2418f 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -201,12 +201,12 @@ struct strangenesstofpid { kNEnums }; // bookkeep propagation failures and successes - enum typesOfPropagation { kPropagPosV0 = 0, - kPropagNegV0, - kPropagPosCasc, - kPropagNegCasc, - kPropagBachCasc, - kPropagTypes }; + enum typesOfPropagation { kPropagPosV0 = 0, + kPropagNegV0, + kPropagPosCasc, + kPropagNegCasc, + kPropagBachCasc, + kPropagTypes }; /// function to calculate track length of this track up to a certain segment of a detector /// to be used internally in another function that calculates length until it finds the proper one @@ -414,8 +414,8 @@ struct strangenesstofpid { // measured vs expected total time QA if (doQA) { - // if in mode 1, bookkeep the failures of propagation - if(calculationMethod.value == 1){ + // if in mode 1, bookkeep the failures of propagation + if (calculationMethod.value == 1) { histos.add("hPropagationBookkeeping", "hPropagationBookkeeping", kTProfile, {{5, -0.5f, 4.5f}}); } @@ -821,7 +821,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimePositiveLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPr); histos.fill(HIST("h2dCorrectAssocPositiveLambdaPr"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPr"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePr); - if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaPositiveLambdaPr"), v0.pt(), v0tof.nSigmaPositiveLambdaPr); } } @@ -829,7 +829,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimePositiveLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPi); histos.fill(HIST("h2dCorrectAssocPositiveLambdaPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); - if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveLambdaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaPositiveLambdaPi"), v0.pt(), v0tof.nSigmaPositiveLambdaPi); } } @@ -837,7 +837,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimePositiveK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveK0ShortPi); histos.fill(HIST("h2dCorrectAssocPositiveK0ShortPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcPositiveK0ShortPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); - if (doQANSigma && std::fabs(v0tof.nSigmaPositiveK0ShortPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaPositiveK0ShortPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaPositiveK0ShortPi"), v0.pt(), v0tof.nSigmaPositiveK0ShortPi); } } @@ -897,7 +897,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPi); histos.fill(HIST("h2dCorrectAssocNegativeLambdaPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); - if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaNegativeLambdaPi"), v0.pt(), v0tof.nSigmaNegativeLambdaPi); } } @@ -905,7 +905,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPr); histos.fill(HIST("h2dCorrectAssocNegativeLambdaPr"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPr"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePr); - if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeLambdaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaNegativeLambdaPr"), v0.pt(), v0tof.nSigmaNegativeLambdaPr); } } @@ -913,7 +913,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dDeltaTimeNegativeK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeK0ShortPi); histos.fill(HIST("h2dCorrectAssocNegativeK0ShortPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dDiffFromPrimCalcNegativeK0ShortPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); - if (doQANSigma && std::fabs(v0tof.nSigmaNegativeK0ShortPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon){ + if (doQANSigma && std::fabs(v0tof.nSigmaNegativeK0ShortPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaNegativeK0ShortPi"), v0.pt(), v0tof.nSigmaNegativeK0ShortPi); } } @@ -1074,7 +1074,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dposDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPr); histos.fill(HIST("h2dposCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); - if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiLaPr"), cascade.pt(), casctof.nSigmaXiLaPr); } } @@ -1082,7 +1082,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dposDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPi); histos.fill(HIST("h2dposCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiLaPi"), cascade.pt(), casctof.nSigmaXiLaPi); } } @@ -1090,7 +1090,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dposDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPr); histos.fill(HIST("h2dposCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); - if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmLaPr"), cascade.pt(), casctof.nSigmaOmLaPr); } } @@ -1098,7 +1098,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dposDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPi); histos.fill(HIST("h2dposCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmLaPi"), cascade.pt(), casctof.nSigmaOmLaPi); } } @@ -1164,7 +1164,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dnegDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPi); histos.fill(HIST("h2dnegCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiLaPi"), cascade.pt(), casctof.nSigmaXiLaPi); } } @@ -1172,7 +1172,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dnegDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPr); histos.fill(HIST("h2dnegCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); - if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiLaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiLaPr"), cascade.pt(), casctof.nSigmaXiLaPr); } } @@ -1180,7 +1180,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dnegDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPi); histos.fill(HIST("h2dnegCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmLaPi"), cascade.pt(), casctof.nSigmaOmLaPi); } } @@ -1188,7 +1188,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dnegDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPr); histos.fill(HIST("h2dnegCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); - if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmLaPr - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmLaPr"), cascade.pt(), casctof.nSigmaOmLaPr); } } @@ -1252,7 +1252,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaXiPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiPi"), cascade.pt(), casctof.nSigmaXiPi); } } @@ -1260,7 +1260,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); - if (doQANSigma && std::fabs(casctof.nSigmaXiPi-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaXiPi - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaXiPi"), cascade.pt(), casctof.nSigmaXiPi); } } @@ -1268,7 +1268,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); - if (doQANSigma && std::fabs(casctof.nSigmaOmKa-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmKa - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmKa"), cascade.pt(), casctof.nSigmaOmKa); } } @@ -1276,7 +1276,7 @@ struct strangenesstofpid { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); - if (doQANSigma && std::fabs(casctof.nSigmaOmKa-o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { + if (doQANSigma && std::fabs(casctof.nSigmaOmKa - o2::aod::v0data::kNoTOFValue) > o2::aod::v0data::kEpsilon) { histos.fill(HIST("h2dNSigmaOmKa"), cascade.pt(), casctof.nSigmaOmKa); } } @@ -1330,7 +1330,7 @@ struct strangenesstofpid { pTof.hasTPC = pTra.hasTPC(); pTof.hasTOF = pTra.hasTOF(); pTof.tofExpMom = pTra.tofExpMom(); - pTof.tofEvTime = reassociateTracks?collisionEventTime[V0.collisionId()]:pTra.tofEvTime(); + pTof.tofEvTime = reassociateTracks ? collisionEventTime[V0.collisionId()] : pTra.tofEvTime(); pTof.tofSignal = pTra.tofSignal(); pTof.length = pTra.length(); pTof.tpcNSigmaPi = pTra.tpcNSigmaPi(); @@ -1341,7 +1341,7 @@ struct strangenesstofpid { nTof.hasTPC = nTra.hasTPC(); nTof.hasTOF = nTra.hasTOF(); nTof.tofExpMom = nTra.tofExpMom(); - nTof.tofEvTime = reassociateTracks?collisionEventTime[V0.collisionId()]:nTra.tofEvTime(); + nTof.tofEvTime = reassociateTracks ? collisionEventTime[V0.collisionId()] : nTra.tofEvTime(); nTof.tofSignal = nTra.tofSignal(); nTof.length = nTra.length(); nTof.tpcNSigmaPi = nTra.tpcNSigmaPi(); @@ -1385,7 +1385,7 @@ struct strangenesstofpid { pTof.hasTPC = pTra.hasTPC(); pTof.hasTOF = pTra.hasTOF(); pTof.tofExpMom = pTra.tofExpMom(); - pTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:pTra.tofEvTime(); + pTof.tofEvTime = reassociateTracks ? collisionEventTime[cascade.collisionId()] : pTra.tofEvTime(); pTof.tofSignal = pTra.tofSignal(); pTof.length = pTra.length(); pTof.tpcNSigmaPi = pTra.tpcNSigmaPi(); @@ -1396,7 +1396,7 @@ struct strangenesstofpid { nTof.hasTPC = nTra.hasTPC(); nTof.hasTOF = nTra.hasTOF(); nTof.tofExpMom = nTra.tofExpMom(); - nTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:nTra.tofEvTime(); + nTof.tofEvTime = reassociateTracks ? collisionEventTime[cascade.collisionId()] : nTra.tofEvTime(); nTof.tofSignal = nTra.tofSignal(); nTof.length = nTra.length(); nTof.tpcNSigmaPi = nTra.tpcNSigmaPi(); @@ -1407,7 +1407,7 @@ struct strangenesstofpid { bTof.hasTPC = bTra.hasTPC(); bTof.hasTOF = bTra.hasTOF(); bTof.tofExpMom = bTra.tofExpMom(); - bTof.tofEvTime = reassociateTracks?collisionEventTime[cascade.collisionId()]:bTra.tofEvTime(); + bTof.tofEvTime = reassociateTracks ? collisionEventTime[cascade.collisionId()] : bTra.tofEvTime(); bTof.tofSignal = bTra.tofSignal(); bTof.length = bTra.length(); bTof.tpcNSigmaPi = bTra.tpcNSigmaPi(); @@ -1483,7 +1483,7 @@ struct strangenesstofpid { auto pTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[V0.posTrackExtraId()]); pTof.collisionId = pTofExt.straCollisionId(); pTof.tofExpMom = pTofExt.tofExpMom(); - pTof.tofEvTime = reassociateTracks.value?collision.eventTime():pTofExt.tofEvTime(); + pTof.tofEvTime = reassociateTracks.value ? collision.eventTime() : pTofExt.tofEvTime(); pTof.tofSignal = pTofExt.tofSignal(); pTof.length = pTofExt.length(); } @@ -1497,7 +1497,7 @@ struct strangenesstofpid { auto nTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[V0.negTrackExtraId()]); nTof.collisionId = nTofExt.straCollisionId(); nTof.tofExpMom = nTofExt.tofExpMom(); - nTof.tofEvTime = reassociateTracks.value?collision.eventTime():nTofExt.tofEvTime(); + nTof.tofEvTime = reassociateTracks.value ? collision.eventTime() : nTofExt.tofEvTime(); nTof.tofSignal = nTofExt.tofSignal(); nTof.length = nTofExt.length(); } @@ -1545,7 +1545,7 @@ struct strangenesstofpid { auto pTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.posTrackExtraId()]); pTof.collisionId = pTofExt.straCollisionId(); pTof.tofExpMom = pTofExt.tofExpMom(); - pTof.tofEvTime = reassociateTracks.value?collision.eventTime():pTofExt.tofEvTime(); + pTof.tofEvTime = reassociateTracks.value ? collision.eventTime() : pTofExt.tofEvTime(); pTof.tofSignal = pTofExt.tofSignal(); pTof.length = pTofExt.length(); } @@ -1559,7 +1559,7 @@ struct strangenesstofpid { auto nTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.negTrackExtraId()]); nTof.collisionId = nTofExt.straCollisionId(); nTof.tofExpMom = nTofExt.tofExpMom(); - nTof.tofEvTime = reassociateTracks.value?collision.eventTime():nTofExt.tofEvTime(); + nTof.tofEvTime = reassociateTracks.value ? collision.eventTime() : nTofExt.tofEvTime(); nTof.tofSignal = nTofExt.tofSignal(); nTof.length = nTofExt.length(); } @@ -1573,7 +1573,7 @@ struct strangenesstofpid { auto bTofExt = dauTrackTOFPIDs.rawIteratorAt(tofIndices[cascade.bachTrackExtraId()]); bTof.collisionId = bTofExt.straCollisionId(); bTof.tofExpMom = bTofExt.tofExpMom(); - bTof.tofEvTime = reassociateTracks.value?collision.eventTime():bTofExt.tofEvTime(); + bTof.tofEvTime = reassociateTracks.value ? collision.eventTime() : bTofExt.tofEvTime(); bTof.tofSignal = bTofExt.tofSignal(); bTof.length = bTofExt.length(); } From a4d10abf5bcda72c9496192701348bde75c8b567 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Sun, 19 Oct 2025 16:22:32 +0200 Subject: [PATCH 4/4] Fix very important bug --- PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 7f256d2418f..15e2b439344 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -1149,11 +1149,11 @@ struct strangenesstofpid { // de facto nsigma if (nSigmaCalibLoaded) { if (cascade.sign() < 0) { - casctof.nSigmaXiLaPr = (casctof.negDeltaTimeAsXiPr - hMeanPosXiPr->Interpolate(cascade.p())) / hSigmaPosXiPr->Interpolate(cascade.p()); - casctof.nSigmaOmLaPr = (casctof.negDeltaTimeAsOmPr - hMeanPosOmPr->Interpolate(cascade.p())) / hSigmaPosOmPr->Interpolate(cascade.p()); + casctof.nSigmaXiLaPi = (casctof.negDeltaTimeAsXiPi - hMeanNegXiPi->Interpolate(cascade.p())) / hSigmaNegXiPi->Interpolate(cascade.p()); + casctof.nSigmaOmLaPi = (casctof.negDeltaTimeAsOmPi - hMeanNegOmPi->Interpolate(cascade.p())) / hSigmaNegOmPi->Interpolate(cascade.p()); } else { - casctof.nSigmaXiLaPi = (casctof.negDeltaTimeAsXiPi - hMeanPosXiPi->Interpolate(cascade.p())) / hSigmaPosXiPi->Interpolate(cascade.p()); - casctof.nSigmaOmLaPi = (casctof.negDeltaTimeAsOmPi - hMeanPosOmPi->Interpolate(cascade.p())) / hSigmaPosOmPi->Interpolate(cascade.p()); + casctof.nSigmaXiLaPr = (casctof.negDeltaTimeAsXiPr - hMeanNegXiPr->Interpolate(cascade.p())) / hSigmaNegXiPr->Interpolate(cascade.p()); + casctof.nSigmaOmLaPr = (casctof.negDeltaTimeAsOmPr - hMeanNegOmPr->Interpolate(cascade.p())) / hSigmaNegOmPr->Interpolate(cascade.p()); } }