From 426c1979a04e6491d64d6ff17678004de1ad5b13 Mon Sep 17 00:00:00 2001 From: Ran Tu Date: Wed, 27 May 2026 11:38:48 +0200 Subject: [PATCH 1/2] Simplify UPC Lc TTree output --- PWGHF/D2H/Tasks/taskUpcLc.cxx | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskUpcLc.cxx b/PWGHF/D2H/Tasks/taskUpcLc.cxx index fcf2200a1e3..5c07e785c1c 100644 --- a/PWGHF/D2H/Tasks/taskUpcLc.cxx +++ b/PWGHF/D2H/Tasks/taskUpcLc.cxx @@ -71,18 +71,15 @@ namespace full DECLARE_SOA_COLUMN(M, m, float); DECLARE_SOA_COLUMN(Pt, pt, float); DECLARE_SOA_COLUMN(BkgScore, bkgScore, float); -DECLARE_SOA_COLUMN(PromptScore, promptScore, float); -DECLARE_SOA_COLUMN(FdScore, fdScore, float); DECLARE_SOA_COLUMN(PtProng0, ptProng0, float); DECLARE_SOA_COLUMN(PtProng1, ptProng1, float); DECLARE_SOA_COLUMN(PtProng2, ptProng2, float); DECLARE_SOA_COLUMN(Chi2PCA, chi2PCA, float); DECLARE_SOA_COLUMN(DecayLength, decayLength, float); DECLARE_SOA_COLUMN(Cpa, cpa, float); -DECLARE_SOA_COLUMN(PvContributors, pvContributors, float); -DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); +DECLARE_SOA_COLUMN(PvContributors, pvContributors, int); +DECLARE_SOA_COLUMN(Multiplicity, multiplicity, int); DECLARE_SOA_COLUMN(Vtz, vtz, float); -DECLARE_SOA_COLUMN(AmpFV0A, ampFV0A, float); DECLARE_SOA_COLUMN(AmpFT0A, ampFT0A, float); DECLARE_SOA_COLUMN(AmpFT0C, ampFT0C, float); DECLARE_SOA_COLUMN(ZdcTimeZNA, zdcTimeZNA, float); @@ -92,7 +89,6 @@ DECLARE_SOA_TABLE(HfUpcQa, "AOD", "HFUPCQA", full::PvContributors, full::Multiplicity, full::Vtz, - full::AmpFV0A, full::AmpFT0A, full::AmpFT0C, full::ZdcTimeZNA, @@ -102,9 +98,6 @@ DECLARE_SOA_TABLE(HfUpcLcBdtInfos, "AOD", "HFUPCLCBDTINFOS", full::M, full::Pt, full::BkgScore, - full::PromptScore, - full::FdScore, - full::AmpFV0A, full::AmpFT0A, full::AmpFT0C, full::ZdcTimeZNA, @@ -119,7 +112,6 @@ DECLARE_SOA_TABLE(HfUpcLcInfos, "AOD", "HFUPCLCINFOS", full::Chi2PCA, full::DecayLength, full::Cpa, - full::AmpFV0A, full::AmpFT0A, full::AmpFT0C, full::ZdcTimeZNA, @@ -256,9 +248,9 @@ struct HfTaskUpcLc { if (gap == o2::aod::sgselector::TrueGap::SingleGapA || gap == o2::aod::sgselector::TrueGap::SingleGapC) { registry.fill(HIST("Data/hUpcMulti"), collision.multNTracksPV()); registry.fill(HIST("Data/hUpcVtz"), collision.posZ()); - } - if (fillTreeUpcQa) { - rowUpcQa(numPvContributors, collision.multNTracksPV(), collision.posZ(), fitInfo.ampFV0A, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + if (fillTreeUpcQa) { + rowUpcQa(numPvContributors, collision.multNTracksPV(), collision.posZ(), fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + } } for (const auto& candidate : groupedLcCandidates) { @@ -291,19 +283,19 @@ struct HfTaskUpcLc { /// Fill the ML outputScores and variables of candidate if (fillTreeOnlySingleGap) { if (gap == o2::aod::sgselector::TrueGap::SingleGapA || gap == o2::aod::sgselector::TrueGap::SingleGapC) { - rowCandUpcBdt(massLc, pt, outputBkg, outputPrompt, outputFD, fitInfo.ampFV0A, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + rowCandUpcBdt(massLc, pt, outputBkg, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); } } else { - rowCandUpcBdt(massLc, pt, outputBkg, outputPrompt, outputFD, fitInfo.ampFV0A, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + rowCandUpcBdt(massLc, pt, outputBkg, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); } } else { if (fillTreeOnlySingleGap) { if (gap == o2::aod::sgselector::TrueGap::SingleGapA || gap == o2::aod::sgselector::TrueGap::SingleGapC) { - rowCandUpc(massLc, pt, ptProng0, ptProng1, ptProng2, chi2PCA, decayLength, cpa, fitInfo.ampFV0A, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + rowCandUpc(massLc, pt, ptProng0, ptProng1, ptProng2, chi2PCA, decayLength, cpa, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); } } else { - rowCandUpc(massLc, pt, ptProng0, ptProng1, ptProng2, chi2PCA, decayLength, cpa, fitInfo.ampFV0A, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); + rowCandUpc(massLc, pt, ptProng0, ptProng1, ptProng2, chi2PCA, decayLength, cpa, fitInfo.ampFT0A, fitInfo.ampFT0C, zdcTimeZNA, zdcTimeZNC); } } }; From 87fe0e86e76938fd5893ae0fdffc2ff6886ab7e2 Mon Sep 17 00:00:00 2001 From: Ran Tu Date: Wed, 27 May 2026 12:11:59 +0200 Subject: [PATCH 2/2] Remove unused variables --- PWGHF/D2H/Tasks/taskUpcLc.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskUpcLc.cxx b/PWGHF/D2H/Tasks/taskUpcLc.cxx index 5c07e785c1c..0f74a5785c6 100644 --- a/PWGHF/D2H/Tasks/taskUpcLc.cxx +++ b/PWGHF/D2H/Tasks/taskUpcLc.cxx @@ -268,7 +268,7 @@ struct HfTaskUpcLc { const auto chi2PCA = candidate.chi2PCA(); const auto cpa = candidate.cpa(); - double outputBkg(-1), outputPrompt(-1), outputFD(-1); + double outputBkg(-1); auto fillTHnData = [&](bool isPKPi) { const auto massLc = isPKPi ? HfHelper::invMassLcToPKPi(candidate) : HfHelper::invMassLcToPiKP(candidate); @@ -277,8 +277,6 @@ struct HfTaskUpcLc { const auto& mlProb = isPKPi ? candidate.mlProbLcToPKPi() : candidate.mlProbLcToPiKP(); if (mlProb.size() == NumberOfMlClasses) { outputBkg = mlProb[MlClassBackground]; /// bkg score - outputPrompt = mlProb[MlClassPrompt]; /// prompt score - outputFD = mlProb[MlClassNonPrompt]; /// non-prompt score } /// Fill the ML outputScores and variables of candidate if (fillTreeOnlySingleGap) {