From f5f7fbb877e3167247661dfb8cf60d466f8ca19e Mon Sep 17 00:00:00 2001 From: hero-seo Date: Fri, 9 Oct 2026 17:34:43 +0900 Subject: [PATCH 1/4] first histogram filling test --- PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx | 4 ++++ PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx | 3 +++ 2 files changed, 7 insertions(+) diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 3780b21c1f9..245b9cbe85b 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -1093,6 +1093,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}}); registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}}); registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}}); + registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{40,2.3,2.7,200,0,20}}}); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}"); @@ -1345,6 +1346,9 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { // Check whether the charm baryon is non-prompt (from a b quark). if (flag != 0) { + //fill inclusive generated Xic+ + registry.fill("ht_pt_gen",particle.y(),particle.pt()); + origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers); // Calculate the decay length of the generated particle auto dau0 = particle.template daughters_as().begin(); diff --git a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx index 070e92a43e2..9e0fb0d3cc7 100644 --- a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx @@ -245,6 +245,8 @@ struct HfCandidateSelectorXicToXiPiPi { registry.add("hNCrossedRowsTpcBachelorPionRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (#pi #leftarrow #Xi);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0PosDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 pos. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0NegDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 neg. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); + ///reconstructed MC + registry.add("hmass_pt_reco_truth","Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]",{HistType::kTH2F,{{40,2.3,2.7,200,0,20}}}); } } @@ -651,6 +653,7 @@ struct HfCandidateSelectorXicToXiPiPi { if constexpr (IsMc) { if (isMatchedSignal) { registry.fill(HIST("hSelCandidatesRecSig"), PidSelected); + registry.fill(HIST("hmass_pt_reco_truth"),hfCandXic.invMassXicPlus(),hfCandXic.pt()); } else { registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected); } From 644e97e643ce3abebf5a94a5838d5bda645b950f Mon Sep 17 00:00:00 2001 From: hero-seo Date: Fri, 9 Oct 2026 18:07:36 +0900 Subject: [PATCH 2/4] fixing histo axis grammar --- PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx | 2 +- PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 245b9cbe85b..ee48c1900a3 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -1093,7 +1093,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}}); registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}}); registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}}); - registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{40,2.3,2.7,200,0,20}}}); + registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{40,2.3,2.7},{200,0,20}}}); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}"); diff --git a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx index 9e0fb0d3cc7..ffc1ffdb9a8 100644 --- a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx @@ -246,7 +246,7 @@ struct HfCandidateSelectorXicToXiPiPi { registry.add("hNCrossedRowsTpcV0PosDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 pos. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0NegDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 neg. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); ///reconstructed MC - registry.add("hmass_pt_reco_truth","Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]",{HistType::kTH2F,{{40,2.3,2.7,200,0,20}}}); + registry.add("hmass_pt_reco_truth","Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]",{HistType::kTH2F,{{40,2.3,2.7},{200,0,20}}}); } } @@ -643,6 +643,7 @@ struct HfCandidateSelectorXicToXiPiPi { if constexpr (IsMc) { if (isMatchedSignal) { registry.fill(HIST("hSelCandidatesRecSig"), PidSelected); + registry.fill(HIST("hmass_pt_reco_truth"),hfCandXic.invMassXicPlus(),hfCandXic.pt()); } else { registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected); } @@ -653,7 +654,6 @@ struct HfCandidateSelectorXicToXiPiPi { if constexpr (IsMc) { if (isMatchedSignal) { registry.fill(HIST("hSelCandidatesRecSig"), PidSelected); - registry.fill(HIST("hmass_pt_reco_truth"),hfCandXic.invMassXicPlus(),hfCandXic.pt()); } else { registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected); } From 21df68f3da98a6436d551eeeae1db5b9d80d3695 Mon Sep 17 00:00:00 2001 From: hero-seo Date: Mon, 12 Oct 2026 13:50:13 +0900 Subject: [PATCH 3/4] update --- PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index ee48c1900a3..bae0e53ce05 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -1093,7 +1093,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}}); registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}}); registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}}); - registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{40,2.3,2.7},{200,0,20}}}); + registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{20,-1.0,1.0},{200,0,20}}}); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}"); @@ -1347,7 +1347,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { // Check whether the charm baryon is non-prompt (from a b quark). if (flag != 0) { //fill inclusive generated Xic+ - registry.fill("ht_pt_gen",particle.y(),particle.pt()); + registry.fill(HIST("hy_pt_gen"),particle.y(),particle.pt()); origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers); // Calculate the decay length of the generated particle From b97a6c22f1bb4e83030c71409e9b59cba981085e Mon Sep 17 00:00:00 2001 From: hero-seo Date: Mon, 12 Oct 2026 14:36:19 +0900 Subject: [PATCH 4/4] apply clang-format --- PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx | 6 +++--- PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index bae0e53ce05..479b7c6d807 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -1093,7 +1093,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}}); registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}}); registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}}); - registry.add("hy_pt_gen","Generated MC",{HistType::kTH2F,{{20,-1.0,1.0},{200,0,20}}}); + registry.add("hy_pt_gen", "Generated MC", {HistType::kTH2F, {{20, -1.0, 1.0}, {200, 0, 20}}}); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}"); registry.get(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}"); @@ -1346,8 +1346,8 @@ struct HfCandidateCreatorXicToXiPiPiExpressions { // Check whether the charm baryon is non-prompt (from a b quark). if (flag != 0) { - //fill inclusive generated Xic+ - registry.fill(HIST("hy_pt_gen"),particle.y(),particle.pt()); + // fill inclusive generated Xic+ + registry.fill(HIST("hy_pt_gen"), particle.y(), particle.pt()); origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers); // Calculate the decay length of the generated particle diff --git a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx index ffc1ffdb9a8..418314dc4c9 100644 --- a/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx @@ -245,8 +245,8 @@ struct HfCandidateSelectorXicToXiPiPi { registry.add("hNCrossedRowsTpcBachelorPionRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (#pi #leftarrow #Xi);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0PosDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 pos. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); registry.add("hNCrossedRowsTpcV0NegDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 neg. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}}); - ///reconstructed MC - registry.add("hmass_pt_reco_truth","Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]",{HistType::kTH2F,{{40,2.3,2.7},{200,0,20}}}); + /// reconstructed MC + registry.add("hmass_pt_reco_truth", "Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]", {HistType::kTH2F, {{40, 2.3, 2.7}, {200, 0, 20}}}); } } @@ -643,7 +643,7 @@ struct HfCandidateSelectorXicToXiPiPi { if constexpr (IsMc) { if (isMatchedSignal) { registry.fill(HIST("hSelCandidatesRecSig"), PidSelected); - registry.fill(HIST("hmass_pt_reco_truth"),hfCandXic.invMassXicPlus(),hfCandXic.pt()); + registry.fill(HIST("hmass_pt_reco_truth"), hfCandXic.invMassXicPlus(), hfCandXic.pt()); } else { registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected); }