diff --git a/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx b/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx index a6e71890aed..c375e7ed193 100644 --- a/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx +++ b/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx @@ -96,13 +96,13 @@ using CollisionsFullWithPVMult = CollisionsFull; using CollisionsFullMC = soa::Join; using HadHyperCollisionsFull = soa::Join; using HadHyperCollisionsFullMC = soa::Join; -using TrackCandidates = soa::Join; -using TrackCandidatesMC = soa::Join; +using TrackCandidates = soa::Join; +using TrackCandidatesMC = soa::Join; // The DCA-template process explicitly subscribes to the propagated covariance // table. This makes the propagation service enter the branch where TrackTuner // corrections can be applied when enabled, without adding that dependency to // unrelated MC process switches. -using TrackCandidatesMCDca = soa::Join; +using TrackCandidatesMCDca = soa::Join; namespace { @@ -435,6 +435,8 @@ struct HadNucleiFemto { std::string prefix{"tritonPid"}; // Triton track-quality, purity and PID cuts Configurable settingITSNClsMinTr{"settingITSNClsMinTr", 5, "Minimum number of ITS clusters for triton candidates"}; + Configurable settingTPCChi2NClMaxTr{"settingTPCChi2NClMaxTr", 4.f, "Maximum TPC chi2 per cluster for triton candidates"}; + Configurable settingITSChi2NClMaxTr{"settingITSChi2NClMaxTr", 36.f, "Maximum ITS chi2 per cluster for triton candidates"}; Configurable settingPIDMomentumSplitTr{"settingPIDMomentumSplitTr", 2.f, "Momentum separating low- and high-momentum triton TPC PID"}; Configurable settingCutTPCNsigmaLowPTr{"settingCutTPCNsigmaLowPTr", 3.f, "Maximum absolute TPC n-sigma for tritons below the momentum split"}; Configurable settingCutITSNsigmaLowPTr{"settingCutITSNsigmaLowPTr", 3.f, "Maximum absolute ITS n-sigma for tritons below the momentum split"}; @@ -442,6 +444,7 @@ struct HadNucleiFemto { Configurable settingCutTPCNsigmaHighPMaxTr{"settingCutTPCNsigmaHighPMaxTr", 3.f, "Maximum TPC n-sigma for tritons above the momentum split"}; Configurable settingTOFMassMomentumMinTr{"settingTOFMassMomentumMinTr", 1.2f, "Minimum momentum to apply the triton TOF mass cut"}; Configurable settingTOFMassMinTr{"settingTOFMassMinTr", 2.5f, "Minimum triton TOF mass"}; + Configurable settingUseTOFMassTableTr{"settingUseTOFMassTableTr", false, "Use pidTOFmass mass for triton PID and purity instead of computeTOFMass"}; Configurable settingTOFMassMaxTr{"settingTOFMassMaxTr", 3.4f, "Maximum triton TOF mass"}; Configurable settingTPCRejectNsig{"settingTPCRejectNsig", 3.f, "Minimum absolute TPC n-sigma from deuteron, proton and pion hypotheses"}; } tritonPid; @@ -836,6 +839,8 @@ struct HadNucleiFemto { {"h2NsigmaHadKaTOF", "NsigmaHad TOF distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(K)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}}, // Purity + {"h2MassTOFTrComputedVsTable", "Triton TOF mass comparison before mass cut;computed mass (GeV/#it{c}^{2});table mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{280, 0.f, 7.f}, {280, 0.f, 7.f}}}}, + {"purity/h2MassTOFTrComputedVsTable", "Triton TOF mass comparison before mass cut;computed mass (GeV/#it{c}^{2});table mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{280, 0.f, 7.f}, {280, 0.f, 7.f}}}}, {"purity/h2MassTOFTr_preselection", "Triton TOF mass before mass cut; signed #it{p}_{T} (GeV/#it{c}); m_{TOF} (GeV/#it{c}^{2})", {HistType::kTH2F, {{280, -7.0f, 7.0f}, {280, 0.0f, 7.0f}}}}, {"purity/h2NsigmaNuTPC_preselection", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{280, -7.0f, 7.0f}, {400, -10.0f, 10.0f}}}}, {"purity/h2NsigmaNuTPC_preselecComp", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{280, -7.0f, 7.0f}, {400, -10.0f, 10.0f}}}}, @@ -1261,18 +1266,16 @@ struct HadNucleiFemto { constexpr float maxAbsDcaXY = 0.2f; constexpr float maxAbsDcaZ = 0.2f; constexpr int minTPCCrossedRows = 70; - constexpr float maxTPCChi2NCl = 5.f; constexpr float maxTPCFractionSharedCls = 0.3f; - constexpr float maxITSChi2NCl = 10.f; return !(std::abs(candidate.eta()) >= maxAbsEta || std::abs(candidate.dcaXY()) >= maxAbsDcaXY || std::abs(candidate.dcaZ()) >= maxAbsDcaZ || candidate.tpcNClsCrossedRows() < minTPCCrossedRows || - candidate.tpcChi2NCl() >= maxTPCChi2NCl || + candidate.tpcChi2NCl() >= tritonPid.settingTPCChi2NClMaxTr || candidate.tpcFractionSharedCls() >= maxTPCFractionSharedCls || candidate.itsNCls() < tritonPid.settingITSNClsMinTr || - candidate.itsChi2NCl() >= maxITSChi2NCl); + candidate.itsChi2NCl() >= tritonPid.settingITSChi2NClMaxTr); } bool useDeuteronNucleus() const @@ -1925,6 +1928,26 @@ struct HadNucleiFemto { return std::abs(candidate.tpcInnerParam()) * std::sqrt(1.f / (beta * beta) - 1.f); } + template + float tritonTOFMass(const Ttrack& candidate) const + { + return tritonPid.settingUseTOFMassTableTr.value ? candidate.mass() : computeTOFMass(candidate); + } + + template + void fillTritonTOFMassComparison(const Ttrack& candidate, bool isPurity) + { + const float computedMass = computeTOFMass(candidate); + const float tableMass = candidate.mass(); + if (std::isfinite(computedMass) && std::isfinite(tableMass)) { + if (isPurity) { + mQaRegistry.fill(HIST("purity/h2MassTOFTrComputedVsTable"), computedMass, tableMass); + } else { + mQaRegistry.fill(HIST("h2MassTOFTrComputedVsTable"), computedMass, tableMass); + } + } + } + template bool selectionPIDTr(const Ttrack& candidate) { @@ -1957,9 +1980,10 @@ struct HadNucleiFemto { if (!candidate.hasTOF()) { return false; } - const float massTOFTr = computeTOFMass(candidate); + fillTritonTOFMassComparison(candidate, false); + const float massTOFTr = tritonTOFMass(candidate); mQaRegistry.fill(HIST("h2MassTOFTr"), candidate.sign() * absP, massTOFTr); - if (massTOFTr <= tritonPid.settingTOFMassMinTr || massTOFTr >= tritonPid.settingTOFMassMaxTr) { + if (!std::isfinite(massTOFTr) || massTOFTr <= tritonPid.settingTOFMassMinTr || massTOFTr >= tritonPid.settingTOFMassMaxTr) { return false; } } @@ -4109,7 +4133,8 @@ struct HadNucleiFemto { mQaRegistry.fill(HIST("purity/h2NsigmaNuTPC_preselection"), signedPtTr, tpcNSigmaTr); // Apply the triton TPC PID cut but keep TOF mass uncut to retain its sidebands. if (passTPCTr && absPTr > tritonPid.settingTOFMassMomentumMinTr && track.hasTOF()) { - const float massTOFTr = computeTOFMass(track); + fillTritonTOFMassComparison(track, true); + const float massTOFTr = tritonTOFMass(track); if (std::isfinite(massTOFTr)) { mQaRegistry.fill(HIST("purity/h2MassTOFTr_preselection"), signedPtTr, massTOFTr); }