From 7d2a8a747599aec3bc235eb98401018185b4864c Mon Sep 17 00:00:00 2001 From: ptak Date: Wed, 5 Aug 2026 14:28:29 +0200 Subject: [PATCH] [PWGCF] Femto: split D0/D0bar mass QA by candidate sign --- PWGCF/Femto/Core/charmHadronBuilder.h | 2 -- PWGCF/Femto/Core/charmHadronHistManager.h | 16 ++++++++++------ PWGCF/Femto/DataModel/FemtoTables.h | 4 ---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/PWGCF/Femto/Core/charmHadronBuilder.h b/PWGCF/Femto/Core/charmHadronBuilder.h index 83b2121fcbf..71e2e45ad29 100644 --- a/PWGCF/Femto/Core/charmHadronBuilder.h +++ b/PWGCF/Femto/Core/charmHadronBuilder.h @@ -369,8 +369,6 @@ class CharmHadronBuilder } if (mProduceD0Extras) { d0Products.producedD0Extras( - mHfHelper.invMassD0ToPiK(candidate), - mHfHelper.invMassD0barToKPi(candidate), candidate.cpa(), candidate.cpaXY(), candidate.decayLength(), diff --git a/PWGCF/Femto/Core/charmHadronHistManager.h b/PWGCF/Femto/Core/charmHadronHistManager.h index f17219d3bd7..37483887760 100644 --- a/PWGCF/Femto/Core/charmHadronHistManager.h +++ b/PWGCF/Femto/Core/charmHadronHistManager.h @@ -102,8 +102,8 @@ template struct ConfD0QaBinning : o2::framework::ConfigurableGroup { std::string prefix = Prefix; o2::framework::Configurable plotTopology{"plotTopology", true, "Generate topological QA plots (cpa, decayLength, impactParameterProduct, cosThetaStar)"}; - o2::framework::ConfigurableAxis massD0{"massD0", {{200, 1.7, 2.0}}, "Mass for D0 (Kpi) hypothesis"}; - o2::framework::ConfigurableAxis massD0bar{"massD0bar", {{200, 1.7, 2.0}}, "Mass for D0bar (piK) hypothesis"}; + o2::framework::ConfigurableAxis massD0{"massD0", {{200, 1.7, 2.0}}, "Mass of candidates selected as D0"}; + o2::framework::ConfigurableAxis massD0bar{"massD0bar", {{200, 1.7, 2.0}}, "Mass of candidates selected as D0bar"}; o2::framework::ConfigurableAxis mlScore{"mlScore", {{100, 0.f, 1.f}}, "BDT ML score (bkg/prompt/non-prompt)"}; o2::framework::ConfigurableAxis cpa{"cpa", {{100, 0.9f, 1.f}}, "Cosine of pointing angle"}; o2::framework::ConfigurableAxis decayLength{"decayLength", {{200, 0.f, 0.2f}}, "Decay length (cm)"}; @@ -126,8 +126,8 @@ constexpr std::array, kCharmHadronHistLas {kPtVsEta, o2::framework::HistType::kTH2F, "hPtVsEta", "p_{T} vs #eta; p_{T} (GeV/#it{c}); #eta"}, {kPtVsPhi, o2::framework::HistType::kTH2F, "hPtVsPhi", "p_{T} vs #varphi; p_{T} (GeV/#it{c}); #varphi"}, {kPhiVsEta, o2::framework::HistType::kTH2F, "hPhiVsEta", "#varphi vs #eta; #varphi; #eta"}, - {kMassD0, o2::framework::HistType::kTH1F, "hMassD0", "D0 (K#pi) mass; m_{K#pi} (GeV/#it{c}^{2}); Entries"}, - {kMassD0bar, o2::framework::HistType::kTH1F, "hMassD0bar", "#bar{D0} (#piK) mass; m_{#piK} (GeV/#it{c}^{2}); Entries"}, + {kMassD0, o2::framework::HistType::kTH1F, "hMassD0", "Invariant mass of D^{0} candidates; m_{Inv} (GeV/#it{c}^{2}); Entries"}, + {kMassD0bar, o2::framework::HistType::kTH1F, "hMassD0bar", "Invariant mass of #bar{D}^{0} candidates; m_{Inv} (GeV/#it{c}^{2}); Entries"}, {kMlBkg, o2::framework::HistType::kTH1F, "hMlBkg", "BDT background score; ML score (bkg); Entries"}, {kMlPrompt, o2::framework::HistType::kTH1F, "hMlPrompt", "BDT prompt score; ML score (prompt); Entries"}, {kMlNonPrompt, o2::framework::HistType::kTH1F, "hMlNonPrompt", "BDT non-prompt score; ML score (non-prompt); Entries"}, @@ -424,8 +424,12 @@ class CharmHadronHistManager template void fillQa(T const& charmHadronCandidate) { - mHistogramRegistry->fill(HIST(charmHadronPrefix) + HIST(QaDir) + HIST(getHistName(kMassD0, HistTable)), charmHadronCandidate.massD0()); - mHistogramRegistry->fill(HIST(charmHadronPrefix) + HIST(QaDir) + HIST(getHistName(kMassD0bar, HistTable)), charmHadronCandidate.massD0bar()); + // invariant mass split by hypothesis: D0 (sign > 0) or D0bar (sign < 0) + if (charmHadronCandidate.sign() > 0) { + mHistogramRegistry->fill(HIST(charmHadronPrefix) + HIST(QaDir) + HIST(getHistName(kMassD0, HistTable)), charmHadronCandidate.mass()); + } else { + mHistogramRegistry->fill(HIST(charmHadronPrefix) + HIST(QaDir) + HIST(getHistName(kMassD0bar, HistTable)), charmHadronCandidate.mass()); + } // BDT scores of the accepted hypothesis: D0 (sign > 0) or D0bar (sign < 0) float mlBkg = 0.f; diff --git a/PWGCF/Femto/DataModel/FemtoTables.h b/PWGCF/Femto/DataModel/FemtoTables.h index 483cf8c67a9..4a38e1c3776 100644 --- a/PWGCF/Femto/DataModel/FemtoTables.h +++ b/PWGCF/Femto/DataModel/FemtoTables.h @@ -1172,8 +1172,6 @@ DECLARE_SOA_INDEX_COLUMN_FULL(PosDau, posDau, int32_t, FTracks, "_PosDau"); //! DECLARE_SOA_INDEX_COLUMN_FULL(NegDau, negDau, int32_t, FTracks, "_NegDau"); //! - prong (kaon in D0) // QA/debug columns -DECLARE_SOA_COLUMN(MassD0, massD0, float); //! Kpi-hypothesis mass -DECLARE_SOA_COLUMN(MassD0bar, massD0bar, float); //! piK-hypothesis mass DECLARE_SOA_COLUMN(Cpa, cpa, float); DECLARE_SOA_COLUMN(CpaXY, cpaXY, float); DECLARE_SOA_COLUMN(DecayLength, decayLength, float); @@ -1216,8 +1214,6 @@ using FD0Masks = FD0Masks_001; using StoredFD0Masks = StoredFD0Masks_001; DECLARE_SOA_TABLE_STAGED_VERSIONED(FD0Extras_001, "FD0EXTRA", 1, //! femto D0 QA / debug - femtocharmhadrons::MassD0, // both hypotheses; the main - femtocharmhadrons::MassD0bar, // table only stores the accepted one femtocharmhadrons::Cpa, femtocharmhadrons::CpaXY, femtocharmhadrons::DecayLength,