From e27a654f5999ac6f751b3cc7b993273829f4b2e6 Mon Sep 17 00:00:00 2001 From: BiaoZhang Date: Sat, 4 Apr 2026 22:09:50 +0200 Subject: [PATCH 1/3] add more Pid and Lc mass in the derived table --- PWGHF/D2H/Tasks/taskCd.cxx | 29 +++++++++---------- .../DataModel/CandidateReconstructionTables.h | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskCd.cxx b/PWGHF/D2H/Tasks/taskCd.cxx index d9dfa56a455..db059872925 100644 --- a/PWGHF/D2H/Tasks/taskCd.cxx +++ b/PWGHF/D2H/Tasks/taskCd.cxx @@ -63,7 +63,8 @@ namespace o2::aod namespace full { // Candidate kinematics -DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate (GeV/c^2) +DECLARE_SOA_COLUMN(MCd, mcd, float); //! Invariant mass of cd candidate (GeV/c^2) +DECLARE_SOA_COLUMN(MLc, mlc, float); //! Invariant mass of lc candidate (GeV/c^2) DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c) DECLARE_SOA_COLUMN(Eta, eta, float); //! eta of candidate (GeV/c) DECLARE_SOA_COLUMN(Phi, phi, float); //! phi of candidate (GeV/c) @@ -100,7 +101,8 @@ DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp fo // Full table: include ALL columns declared above DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD", - full::M, + full::MCd, + full::MLc, full::Pt, full::Eta, full::Phi, @@ -116,13 +118,10 @@ DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD", full::NSigmaTpcDe, full::NSigmaItsDe, full::NSigmaTofDe, - full::NItsClusters, full::NItsNClusterSize, - full::NTpcClusters, full::NTpcSignalsDe, full::NTpcSignalsPi, full::NTpcSignalsKa, - full::NItsSignalsDe, full::CandidateSelFlag, full::Cent); } // namespace o2::aod @@ -219,6 +218,7 @@ struct HfTaskCd { registry.add("Data/hImpParErrProng1", "3-prong candidates;prong 1 impact parameter error (cm);entries", {HistType::kTH2F, {{100, -1., 1.}, {binsPt, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("Data/hImpParErrProng2", "3-prong candidates;prong 2 impact parameter error (cm);entries", {HistType::kTH2F, {{100, -1., 1.}, {binsPt, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("Data/hNsigmaTPCDeVsP", "deuteron;#it{p} (GeV/#it{c}); n#sigma^{TPC}_{d}", {HistType::kTH2F, {{200, -10.f, 10.f}, {200, -6.f, 6.f}}}); + registry.add("Data/hNsigmaTPCPrVsP", "proton;#it{p} (GeV/#it{c}); n#sigma^{TPC}_{p}", {HistType::kTH2F, {{200, -10.f, 10.f}, {200, -6.f, 6.f}}}); registry.add("Data/hNsigmaTOFDeVsP", "deuteron;#it{p} (GeV/#it{c}); n#sigma^{TOF}_{d}", {HistType::kTH2F, {{200, -10.f, 10.f}, {200, -6.f, 6.f}}}); registry.add("Data/hNsigmaITSDeVsP", "deuteron;#it{p} (GeV/#it{c}); n#sigma^{ITS}_{d}", {HistType::kTH2F, {{200, -10.f, 10.f}, {200, -6.f, 6.f}}}); registry.add("Data/hTPCSignalDeVsP", "deuteron;#it{p} (GeV/#it{c}); TPC signals", {HistType::kTH2F, {{200, -10.f, 10.f}, {2000, 0, 2000}}}); @@ -290,11 +290,14 @@ struct HfTaskCd { const auto cpa = candidate.cpa(); const auto cpaXY = candidate.cpaXY(); float invMassCd = 0.f; + float invMassLc = 0.f; if (candidate.isSelCdToDeKPi() >= selectionFlagCd) { invMassCd = HfHelper::invMassCdToDeKPi(candidate); + invMassLc = HfHelper::invMassLcToPKPi(candidate); } if (candidate.isSelCdToPiKDe() >= selectionFlagCd) { invMassCd = HfHelper::invMassCdToPiKDe(candidate); + invMassLc = HfHelper::invMassLcToPiKP(candidate); } if (candidate.isSelCdToDeKPi() >= selectionFlagCd) { @@ -356,13 +359,11 @@ struct HfTaskCd { if (fillTree) { int candFlag = -999; - float nSigmaTpcDe = 0.f, nSigmaTpcKa = 0.f, nSigmaTpcPi = 0.f; + float nSigmaTpcDe = 0.f, nSigmaTpcKa = 0.f, nSigmaTpcPi = 0.f, nSigmaTpcPr = 0.f; float nSigmaItsDe = 0.f; float nSigmaTofDe = 0.f, nSigmaTofKa = 0.f, nSigmaTofPi = 0.f; - int itsNClusterDe = 0; int itsNClusterSizeDe = 0; - int tpcNClusterDe = 0; float tpcSignalsDe = 0.f; float tpcSignalsPi = 0.f; @@ -393,13 +394,12 @@ struct HfTaskCd { pSignedDe = prong0.tpcInnerParam() * prong0.sign(); pSignedPi = prong2.tpcInnerParam() * prong2.sign(); nSigmaTpcDe = candidate.nSigTpcDe0(); + nSigmaTpcPr = candidate.nSigTpcPr0(); nSigmaTofDe = candidate.nSigTofDe0(); nSigmaTpcPi = candidate.nSigTpcPi2(); nSigmaTofPi = candidate.nSigTofPi2(); nSigmaItsDe = prong0Its.itsNSigmaDe(); - itsNClusterDe = prong0.itsNCls(); itsNClusterSizeDe = prong0.itsClusterSizes(); - tpcNClusterDe = prong0.tpcNClsCrossedRows(); tpcSignalsDe = prong0.tpcSignal(); tpcSignalsPi = prong2.tpcSignal(); itsSignalsDe = itsSignal(prong0); @@ -408,13 +408,12 @@ struct HfTaskCd { pSignedDe = prong2.tpcInnerParam() * prong2.sign(); pSignedPi = prong0.tpcInnerParam() * prong0.sign(); nSigmaTpcDe = candidate.nSigTpcDe2(); + nSigmaTpcPr = candidate.nSigTpcPr2(); nSigmaTofDe = candidate.nSigTofDe2(); nSigmaTpcPi = candidate.nSigTpcPi0(); nSigmaTofPi = candidate.nSigTofPi0(); nSigmaItsDe = prong2Its.itsNSigmaDe(); - itsNClusterDe = prong2.itsNCls(); itsNClusterSizeDe = prong2.itsClusterSizes(); - tpcNClusterDe = prong2.tpcNClsCrossedRows(); tpcSignalsDe = prong2.tpcSignal(); tpcSignalsPi = prong0.tpcSignal(); itsSignalsDe = itsSignal(prong2); @@ -422,6 +421,7 @@ struct HfTaskCd { // PID QA registry.fill(HIST("Data/hNsigmaTPCDeVsP"), pSignedDe, nSigmaTpcDe); + registry.fill(HIST("Data/hNsigmaTPCPrVsP"), pSignedDe, nSigmaTpcPr); registry.fill(HIST("Data/hNsigmaTOFDeVsP"), pSignedDe, nSigmaTofDe); registry.fill(HIST("Data/hNsigmaITSDeVsP"), pSignedDe, nSigmaItsDe); registry.fill(HIST("Data/hTPCSignalDeVsP"), pSignedDe, tpcSignalsDe); @@ -435,6 +435,7 @@ struct HfTaskCd { rowCandCd( invMassCd, + invMassLc, pt, eta, phi, @@ -448,15 +449,13 @@ struct HfTaskCd { cpa, chi2PCA, nSigmaTpcDe, + nSigmaTpcPr, nSigmaItsDe, nSigmaTofDe, - itsNClusterDe, itsNClusterSizeDe, - tpcNClusterDe, tpcSignalsDe, tpcSignalsPi, tpcSignalsKa, - itsSignalsDe, candFlag, cent); } diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index bd34cc4817a..02c0e0b297b 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -837,7 +837,7 @@ DECLARE_SOA_TABLE(HfCand3Prong2PidAl, "AOD", "HFCAND3P2PIDAL", //! using HfCand3Prong = HfCand3ProngExt; using HfCand3ProngWPidPiKaPr = soa::Join; using HfCand3ProngWPidPiKa = soa::Join; -using HfCand3ProngWPidPiKaDe = soa::Join; +using HfCand3ProngWPidPiKaDe = soa::Join; using HfCand3ProngWPidPiKaTr = soa::Join; using HfCand3ProngWPidPiKaHe = soa::Join; using HfCand3ProngWPidPiKaAl = soa::Join; From 5d444325ca955b95a71cc40c33a4b2c12a9b7dc2 Mon Sep 17 00:00:00 2001 From: BiaoZhang Date: Sat, 4 Apr 2026 22:14:13 +0200 Subject: [PATCH 2/3] fix linter error --- PWGHF/D2H/Tasks/taskCd.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskCd.cxx b/PWGHF/D2H/Tasks/taskCd.cxx index db059872925..e903977295f 100644 --- a/PWGHF/D2H/Tasks/taskCd.cxx +++ b/PWGHF/D2H/Tasks/taskCd.cxx @@ -63,8 +63,8 @@ namespace o2::aod namespace full { // Candidate kinematics -DECLARE_SOA_COLUMN(MCd, mcd, float); //! Invariant mass of cd candidate (GeV/c^2) -DECLARE_SOA_COLUMN(MLc, mlc, float); //! Invariant mass of lc candidate (GeV/c^2) +DECLARE_SOA_COLUMN(MassCd, massCd, float); //! Invariant mass of cd candidate (GeV/c^2) +DECLARE_SOA_COLUMN(MassLc, massLc, float); //! Invariant mass of lc candidate (GeV/c^2) DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c) DECLARE_SOA_COLUMN(Eta, eta, float); //! eta of candidate (GeV/c) DECLARE_SOA_COLUMN(Phi, phi, float); //! phi of candidate (GeV/c) @@ -101,8 +101,8 @@ DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp fo // Full table: include ALL columns declared above DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD", - full::MCd, - full::MLc, + full::MassCd, + full::MassLc, full::Pt, full::Eta, full::Phi, From 3ce86827d93b01970712a6839a5a1470bb11c9d1 Mon Sep 17 00:00:00 2001 From: BiaoZhang Date: Sat, 4 Apr 2026 22:48:54 +0200 Subject: [PATCH 3/3] fix a mistake --- PWGHF/D2H/Tasks/taskCd.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PWGHF/D2H/Tasks/taskCd.cxx b/PWGHF/D2H/Tasks/taskCd.cxx index e903977295f..33327575366 100644 --- a/PWGHF/D2H/Tasks/taskCd.cxx +++ b/PWGHF/D2H/Tasks/taskCd.cxx @@ -80,6 +80,7 @@ DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of po DECLARE_SOA_COLUMN(CpaXY, cpaXY, float); //! Cosine of pointing angle in XY plane DECLARE_SOA_COLUMN(Chi2PCA, chi2PCA, float); //! chi2PCA DECLARE_SOA_COLUMN(NSigmaTpcDe, nSigmaTpcDe, float); //! TPC nσ for deuteron hypothesis +DECLARE_SOA_COLUMN(NSigmaTpcPr, nSigmaTpcPr, float); //! TPC nσ for proton hypothesis DECLARE_SOA_COLUMN(NSigmaTpcKa, nSigmaTpcKa, float); //! TPC nσ for kaon hypothesis DECLARE_SOA_COLUMN(NSigmaTpcPi, nSigmaTpcPi, float); //! TPC nσ for pion hypothesis DECLARE_SOA_COLUMN(NSigmaItsDe, nSigmaItsDe, float); //! ITS nσ for deuteron hypothesis @@ -116,6 +117,7 @@ DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD", full::Cpa, full::Chi2PCA, full::NSigmaTpcDe, + full::NSigmaTpcPr, full::NSigmaItsDe, full::NSigmaTofDe, full::NItsNClusterSize,