Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion PWGHF/Tasks/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@ struct TaskD0MC {
{"hPtvsYRecSigNonPrompt_RecoHFFlag", "2-prong candidates (RecoHFFlag - matched, non-prompt);#it{p}_{T}^{rec.}; #it{y}", {HistType::kTH2F, {{100, 0., 10.}, {100, -2., 2.}}}},
{"hPtvsYGen", "2-prong candidates (matched);#it{p}_{T}^{gen.}; #it{y}", {HistType::kTH2F, {{100, 0., 10.}, {100, -2., 2.}}}},
{"hPtvsYGenPrompt", "2-prong candidates (matched, prompt);#it{p}_{T}^{gen.}; #it{y}", {HistType::kTH2F, {{100, 0., 10.}, {100, -2., 2.}}}},
{"hPtvsYGenNonPrompt", "2-prong candidates (matched, non-prompt);#it{p}_{T}^{gen.}; #it{y}", {HistType::kTH2F, {{100, 0., 10.}, {100, -2., 2.}}}}}};
{"hPtvsYGenNonPrompt", "2-prong candidates (matched, non-prompt);#it{p}_{T}^{gen.}; #it{y}", {HistType::kTH2F, {{100, 0., 10.}, {100, -2., 2.}}}},
{"hMass_SigD0", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_BkgD0", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_ReflBkgD0", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_SigBkgD0", "2-prong candidates (unmatched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_SigD0bar", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_BkgD0bar", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_ReflBkgD0bar", "2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}},
{"hMass_SigBkgD0bar", "2-prong candidates (unmatched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}", {HistType::kTH3F, {{120, 1.5848, 2.1848}, {500, 0., 50.}, {500, -5., 5.}}}}}};

Configurable<int> d_selectionFlagD0{"d_selectionFlagD0", 1, "Selection Flag for D0"};
Configurable<int> d_selectionFlagD0bar{"d_selectionFlagD0bar", 1, "Selection Flag for D0bar"};
Expand Down Expand Up @@ -220,6 +228,30 @@ struct TaskD0MC {
registry.fill(HIST("hCPARecBg"), candidate.cpa());
registry.fill(HIST("hEtaRecBg"), candidate.eta());
}
if (candidate.isSelD0() >= d_selectionFlagD0) {
registry.fill(HIST("hMass_SigBkgD0"), InvMassD0(candidate), candidate.pt(), YD0(candidate));
if (candidate.flagMCMatchRec() == (1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_SigD0"), InvMassD0(candidate), candidate.pt(), YD0(candidate));
}
if (candidate.flagMCMatchRec() != (1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_BkgD0"), InvMassD0(candidate), candidate.pt(), YD0(candidate));
}
if (candidate.flagMCMatchRec() == (-1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_ReflBkgD0"), InvMassD0(candidate), candidate.pt(), YD0(candidate));
}
}
if (candidate.isSelD0bar() >= d_selectionFlagD0) {
registry.fill(HIST("hMass_SigBkgD0bar"), InvMassD0bar(candidate), candidate.pt(), YD0(candidate));
if (candidate.flagMCMatchRec() == (-1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_SigD0bar"), InvMassD0bar(candidate), candidate.pt(), YD0(candidate));
}
if (candidate.flagMCMatchRec() != (-1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_BkgD0bar"), InvMassD0bar(candidate), candidate.pt(), YD0(candidate));
}
if (candidate.flagMCMatchRec() == (1 << DecayType::D0ToPiK)) {
registry.fill(HIST("hMass_ReflBkgD0bar"), InvMassD0bar(candidate), candidate.pt(), YD0(candidate));
}
}
}
// MC gen.
//Printf("MC Particles: %d", particlesMC.size());
Expand Down