From 72155322e31ee4d984cd0ddf013b5cb982ef0521 Mon Sep 17 00:00:00 2001 From: apalasciano Date: Tue, 14 Apr 2026 15:33:14 +0200 Subject: [PATCH] [PWGHF] enabling MC checks on Lc-h correl --- PWGHF/HFC/DataModel/CorrelationTables.h | 3 ++- PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx | 16 ++++++++-------- .../HFC/TableProducer/correlatorLcScHadrons.cxx | 4 ++-- PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx | 9 +++++---- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/PWGHF/HFC/DataModel/CorrelationTables.h b/PWGHF/HFC/DataModel/CorrelationTables.h index c39a16ea784..c7595b8fc68 100644 --- a/PWGHF/HFC/DataModel/CorrelationTables.h +++ b/PWGHF/HFC/DataModel/CorrelationTables.h @@ -218,7 +218,8 @@ DECLARE_SOA_TABLE(LcRecoInfo, "AOD", "LCRECOINFO", //! Lc candidates Reconstruct aod::hf_correlation_lc_hadron::MLc, aod::hf_correlation_lc_hadron::PtLc, aod::hf_correlation_lc_hadron::MlScoreBkg, - aod::hf_correlation_lc_hadron::MlScorePrompt); + aod::hf_correlation_lc_hadron::MlScorePrompt, + aod::hf_correlation_lc_hadron::PoolBin); DECLARE_SOA_TABLE(LcGenInfo, "AOD", "LCGENOINFO", //! Lc candidates Generated Information aod::hf_correlation_lc_hadron::IsPrompt); diff --git a/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx index 960c00485b3..15bc9ed7c79 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx @@ -356,8 +356,8 @@ struct HfCorrelatorLcHadrons { registry.add("hcountLctriggersMcGen", "Lc trigger particles - MC gen;;N of trigger Lc", {HistType::kTH2F, {{1, -0.5, 0.5}, {axisPtLc}}}); registry.add("hPtCandMcGen", "Lc,Hadron particles - MC gen;particle #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1D, {axisPtLc}}); registry.add("hYMcGen", "Lc,Hadron candidates - MC gen;candidate #it{#y};entries", {HistType::kTH1D, {axisRapidity}}); - registry.add("hPtCandMcGenPrompt", "Lc,Hadron particles - MC Gen Prompt", {HistType::kTH1D, {axisPtLc}}); - registry.add("hPtCandMcGenNonPrompt", "Lc,Hadron particles - MC Gen Non Prompt", {HistType::kTH1D, {axisPtLc}}); + registry.add("hPtCandMcGenPrompt", "Lc,Hadron particles - MC Gen Prompt", {HistType::kTH2D, {{axisPtLc}, {axisPoolBin}}}); + registry.add("hPtCandMcGenNonPrompt", "Lc,Hadron particles - MC Gen Non Prompt", {HistType::kTH2D, {{axisPtLc}, {axisPoolBin}}}); registry.add("hPtParticleAssocMcGen", "Associated Particle - MC Gen", {HistType::kTH1D, {axisPtHadron}}); registry.add("hEtaMcGen", "Lc,Hadron particles - MC Gen", {HistType::kTH1D, {axisEta}}); registry.add("hPhiMcGen", "Lc,Hadron particles - MC Gen", {HistType::kTH1D, {axisPhi}}); @@ -439,7 +439,7 @@ struct HfCorrelatorLcHadrons { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) { outputMl[iclass] = candidate.mlProbLcToPKPi()[classMl->at(iclass)]; } - entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore + entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore if (!skipMixedEventTableFilling) { entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, HfHelper::invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp); } @@ -451,7 +451,7 @@ struct HfCorrelatorLcHadrons { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) { outputMl[iclass] = candidate.mlProbLcToPiKP()[classMl->at(iclass)]; } - entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore + entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore if (!skipMixedEventTableFilling) { entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, HfHelper::invMassLcToPiKP(candidate), poolBin, gCollisionId, timeStamp); } @@ -611,7 +611,7 @@ struct HfCorrelatorLcHadrons { registry.fill(HIST("hMassLcMcRecSig"), HfHelper::invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc); registry.fill(HIST("hMassLcVsPtMcRec"), HfHelper::invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc); registry.fill(HIST("hSelectionStatusLcToPKPiMcRec"), candidate.isSelLcToPKPi()); - entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore + entryLcCandRecoInfo(HfHelper::invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore entryLcCandGenInfo(isLcPrompt); } if (candidate.isSelLcToPiKP() >= selectionFlagLc) { @@ -629,7 +629,7 @@ struct HfCorrelatorLcHadrons { registry.fill(HIST("hMassLcMcRecSig"), HfHelper::invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc); registry.fill(HIST("hMassLcVsPtMcRec"), HfHelper::invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc); registry.fill(HIST("hSelectionStatusLcToPiKPMcRec"), candidate.isSelLcToPiKP()); - entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore + entryLcCandRecoInfo(HfHelper::invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1], poolBin); // 0: BkgBDTScore, 1:PromptBDTScore entryLcCandGenInfo(isLcPrompt); } } else { @@ -855,9 +855,9 @@ struct HfCorrelatorLcHadrons { isLcPrompt = particle.originMcGen() == RecoDecay::OriginType::Prompt; isLcNonPrompt = particle.originMcGen() == RecoDecay::OriginType::NonPrompt; if (isLcPrompt) { - registry.fill(HIST("hPtCandMcGenPrompt"), particle.pt()); + registry.fill(HIST("hPtCandMcGenPrompt"), particle.pt(), poolBin); } else if (isLcNonPrompt) { - registry.fill(HIST("hPtCandMcGenNonPrompt"), particle.pt()); + registry.fill(HIST("hPtCandMcGenNonPrompt"), particle.pt(), poolBin); } // prompt and non-prompt division diff --git a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx index 0952c89de39..144c344abbc 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx @@ -931,7 +931,7 @@ struct HfCorrelatorLcScHadrons { registry.fill(HIST("hPtVsMultiplicityMcRecNonPrompt"), ptCand, multiplicityFT0M); } - entryCandCandRecoInfo(massCandPKPi, ptCand, outputMlPKPi[0], outputMlPKPi[1]); + entryCandCandRecoInfo(massCandPKPi, ptCand, outputMlPKPi[0], outputMlPKPi[1], poolBin); entryCandCandGenInfo(isPrompt); if (!skipMixedEventTableFilling) { entryCand(candidate.phi(), etaCand, ptCand, massCandPKPi, poolBin, gCollisionId, timeStamp); @@ -952,7 +952,7 @@ struct HfCorrelatorLcScHadrons { registry.fill(HIST("hPtCandSigNonPrompt"), ptCand); registry.fill(HIST("hPtVsMultiplicityMcRecNonPrompt"), ptCand, multiplicityFT0M); } - entryCandCandRecoInfo(massCandPiKP, ptCand, outputMlPiKP[0], outputMlPiKP[1]); + entryCandCandRecoInfo(massCandPiKP, ptCand, outputMlPiKP[0], outputMlPiKP[1], poolBin); entryCandCandGenInfo(isPrompt); if (!skipMixedEventTableFilling) { entryCand(candidate.phi(), etaCand, ptCand, massCandPiKP, poolBin, gCollisionId, timeStamp); diff --git a/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx index 9ca930af538..ad6156782d2 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx @@ -259,8 +259,8 @@ struct HfTaskCorrelationLcHadrons { } // Histograms for MC Reco analysis if (fillHistoMcRec) { - registry.add("hMassPromptLcVsPt", "Lc prompt candidates mass Vs Pt", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}}); - registry.add("hMassNonPromptLcVsPt", "Lc non prompt candidates mass Vs Pt", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}}); + registry.add("hMassPromptLcVsPt", "Lc prompt candidates mass Vs Pt", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisPoolBin}}}); + registry.add("hMassNonPromptLcVsPt", "Lc non prompt candidates mass Vs Pt", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisPoolBin}}}); registry.add("hDeltaEtaPtIntSignalRegionMcRec", stringLcHadron + stringSignal + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}}); registry.add("hDeltaPhiPtIntSignalRegionMcRec", stringLcHadron + stringSignal + stringDeltaPhi + "entries", {HistType::kTH1D, {axisDeltaPhi}}); registry.add("hDeltaEtaPtIntSidebandsMcRec", stringLcHadron + stringSideband + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}}); @@ -577,6 +577,7 @@ struct HfTaskCorrelationLcHadrons { float const ptLc = std::abs(candidate.ptLc()); float const bdtScorePrompt = candidate.mlScorePrompt(); float const bdtScoreBkg = candidate.mlScoreBkg(); + int const poolBin = candidate.poolBin(); int const effBinLc = o2::analysis::findBin(binsPtEfficiencyLc, ptLc); bool const isLcPrompt = candidate.isPrompt(); @@ -597,7 +598,7 @@ struct HfTaskCorrelationLcHadrons { } registry.fill(HIST("hMassLcVsPt"), massLc, ptLc, efficiencyWeightLc); registry.fill(HIST("hMassLcVsPtWoEff"), massLc, ptLc); - registry.fill(HIST("hMassPromptLcVsPt"), massLc, ptLc, efficiencyWeightLc); + registry.fill(HIST("hMassPromptLcVsPt"), massLc, ptLc, poolBin, efficiencyWeightLc); registry.fill(HIST("hBdtScorePrompt"), bdtScorePrompt); registry.fill(HIST("hBdtScoreBkg"), bdtScoreBkg); } else { @@ -607,7 +608,7 @@ struct HfTaskCorrelationLcHadrons { } registry.fill(HIST("hMassLcVsPt"), massLc, ptLc, efficiencyWeightLc); registry.fill(HIST("hMassLcVsPtWoEff"), massLc, ptLc); - registry.fill(HIST("hMassNonPromptLcVsPt"), massLc, ptLc, efficiencyWeightLc); + registry.fill(HIST("hMassNonPromptLcVsPt"), massLc, ptLc, poolBin, efficiencyWeightLc); registry.fill(HIST("hBdtScorePrompt"), bdtScorePrompt); registry.fill(HIST("hBdtScoreBkg"), bdtScoreBkg); }