Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGHF] Add D0 D0bar reflection infos tagged from data in D0 task #8891

Merged
merged 12 commits into from
Dec 13, 2024
32 changes: 27 additions & 5 deletions PWGHF/D2H/Tasks/taskD0.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGHF/D2H/Tasks/taskD0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

Declare struct members in the conventional order. See the PWGHF coding guidelines.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -35,10 +35,12 @@
namespace
{
enum CandTypeSel {
SigD0 = 0, // Signal D0
SigD0bar, // Signal D0bar
ReflectedD0, // Reflected D0
ReflectedD0bar // Reflected D0bar
SigD0 = 0, // Signal D0
SigD0bar, // Signal D0bar
ReflectedD0, // Reflected D0
ReflectedD0bar, // Reflected D0bar
PureSigD0, // Signal D0 exclude Reflected D0bar
PureSigD0bar // Signal D0bar exclude Reflected D0
};
} // namespace
struct HfTaskD0 {
Expand All @@ -55,7 +57,7 @@
Configurable<bool> applyMl{"applyMl", false, "Flag to apply ML selections"};

// ThnSparse for ML outputScores and Vars
ConfigurableAxis thnConfigAxisBkgScore{"thnConfigAxisBkgScore", {50, 0, 1}, "Bkg score bins"};

Check warning on line 60 in PWGHF/D2H/Tasks/taskD0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfTaskD0: ConfigurableAxis appears too early (before end of Partition<).
ConfigurableAxis thnConfigAxisNonPromptScore{"thnConfigAxisNonPromptScore", {50, 0, 1}, "Non-prompt score bins"};
ConfigurableAxis thnConfigAxisPromptScore{"thnConfigAxisPromptScore", {50, 0, 1}, "Prompt score bins"};
ConfigurableAxis thnConfigAxisMass{"thnConfigAxisMass", {120, 1.5848, 2.1848}, "Cand. inv-mass bins"};
Expand All @@ -63,14 +65,14 @@
ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {500, 0, 50}, "Cand. pT bins"};
ConfigurableAxis thnConfigAxisY{"thnConfigAxisY", {20, -1, 1}, "Cand. rapidity bins"};
ConfigurableAxis thnConfigAxisOrigin{"thnConfigAxisOrigin", {3, -0.5, 2.5}, "Cand. origin type"};
ConfigurableAxis thnConfigAxisCandType{"thnConfigAxisCandType", {4, -0.5, 3.5}, "D0 type"};
ConfigurableAxis thnConfigAxisCandType{"thnConfigAxisCandType", {6, -0.5, 5.5}, "D0 type"};
ConfigurableAxis thnConfigAxisGenPtD{"thnConfigAxisGenPtD", {500, 0, 50}, "Gen Pt D"};
ConfigurableAxis thnConfigAxisGenPtB{"thnConfigAxisGenPtB", {1000, 0, 100}, "Gen Pt B"};
ConfigurableAxis thnConfigAxisNumPvContr{"thnConfigAxisNumPvContr", {200, -0.5, 199.5}, "Number of PV contributors"};

HfHelper hfHelper;

using D0Candidates = soa::Join<aod::HfCand2Prong, aod::HfSelD0>;

Check warning on line 75 in PWGHF/D2H/Tasks/taskD0.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfTaskD0: using appears too early (before end of SliceCache).
using D0CandidatesMc = soa::Join<D0Candidates, aod::HfCand2ProngMcRec>;
using D0CandidatesKF = soa::Join<D0Candidates, aod::HfCand2ProngKF>;
using D0CandidatesMcKF = soa::Join<D0CandidatesKF, aod::HfCand2ProngMcRec>;
Expand Down Expand Up @@ -318,16 +320,36 @@
if constexpr (applyMl) {
if (candidate.isSelD0() >= selectionFlagD0) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0()[0], candidate.mlProbD0()[1], candidate.mlProbD0()[2], massD0, ptCandidate, hfHelper.yD0(candidate), SigD0);
if (candidate.isSelD0bar()) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0()[0], candidate.mlProbD0()[1], candidate.mlProbD0()[2], massD0, ptCandidate, hfHelper.yD0(candidate), ReflectedD0);
} else if (!candidate.isSelD0bar()) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0()[0], candidate.mlProbD0()[1], candidate.mlProbD0()[2], massD0, ptCandidate, hfHelper.yD0(candidate), PureSigD0);
}
}
if (candidate.isSelD0bar() >= selectionFlagD0bar) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, hfHelper.yD0(candidate), SigD0bar);
if (candidate.isSelD0()) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0()[0], candidate.mlProbD0()[1], candidate.mlProbD0()[2], massD0bar, ptCandidate, hfHelper.yD0(candidate), ReflectedD0bar);
} else if (!candidate.isSelD0()) {
registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, hfHelper.yD0(candidate), PureSigD0bar);
}
}
} else {
if (candidate.isSelD0() >= selectionFlagD0) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0, ptCandidate, hfHelper.yD0(candidate), SigD0);
if (candidate.isSelD0bar()) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0, ptCandidate, hfHelper.yD0(candidate), ReflectedD0);
} else if (!candidate.isSelD0bar()) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0, ptCandidate, hfHelper.yD0(candidate), PureSigD0);
}
}
if (candidate.isSelD0bar() >= selectionFlagD0bar) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0bar, ptCandidate, hfHelper.yD0(candidate), SigD0bar);
if (candidate.isSelD0()) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0bar, ptCandidate, hfHelper.yD0(candidate), ReflectedD0bar);
} else if (!candidate.isSelD0()) {
registry.fill(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"), massD0bar, ptCandidate, hfHelper.yD0(candidate), PureSigD0bar);
}
}
}
}
Expand Down
Loading