From 90381a360a814d454e92d05f3b88b33faf5ab882 Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Thu, 25 Jun 2026 13:50:42 +0200 Subject: [PATCH 1/7] Fixes for MC --- PWGJE/Tasks/jetCorrelationD0.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index bd6f919d333..4d281a9e759 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -201,7 +201,7 @@ struct JetCorrelationD0 { // Configurables Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable skipMBGapEvents{"skipMBGapEvents", false, "decide to run over MB gap events or not"}; - Configurable applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"}; + Configurable applyRCTSelections{"applyRCTSelections", false, "decide to apply RCT selections"}; Configurable jetPtCutMin{"jetPtCutMin", 5.0, "minimum value of jet pt"}; Configurable d0PtCutMin{"d0PtCutMin", 1.0, "minimum value of d0 pt"}; Configurable jetMcPtCutMin{"jetMcPtCutMin", 3.0, "minimum value of jet pt particle level"}; From c96809c9aa9cbc26d87395f556fd328e2e1803b0 Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Mon, 29 Jun 2026 09:13:10 +0200 Subject: [PATCH 2/7] Adding MC D0 decay channel --- PWGJE/Tasks/jetCorrelationD0.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index 4d281a9e759..bd6f919d333 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -201,7 +201,7 @@ struct JetCorrelationD0 { // Configurables Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable skipMBGapEvents{"skipMBGapEvents", false, "decide to run over MB gap events or not"}; - Configurable applyRCTSelections{"applyRCTSelections", false, "decide to apply RCT selections"}; + Configurable applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"}; Configurable jetPtCutMin{"jetPtCutMin", 5.0, "minimum value of jet pt"}; Configurable d0PtCutMin{"d0PtCutMin", 1.0, "minimum value of d0 pt"}; Configurable jetMcPtCutMin{"jetMcPtCutMin", 3.0, "minimum value of jet pt particle level"}; From 628475d9cedbb4daa131062f5d520a4ce1e9b6ca Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Wed, 5 Aug 2026 16:33:06 +0200 Subject: [PATCH 3/7] fixing build errors --- PWGJE/Tasks/jetCorrelationD0.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index bd6f919d333..73efdd36997 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -40,6 +40,8 @@ #include #include +#include + using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; From 92710675126956ce23b2023fbe96e51872d8aa7d Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Wed, 5 Aug 2026 16:38:22 +0200 Subject: [PATCH 4/7] clang formatting --- PWGJE/Tasks/jetCorrelationD0.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index 73efdd36997..bd6f919d333 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -40,8 +40,6 @@ #include #include -#include - using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; From aff8bc538c2393c2d88c46bff731a2fffefde63b Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Thu, 6 Aug 2026 10:19:10 +0200 Subject: [PATCH 5/7] adding enum D0McCategory --- PWGJE/Tasks/jetCorrelationD0.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index bd6f919d333..244494ab787 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -19,6 +19,8 @@ #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" +#include "PWGHF/Core/DecayChannels.h" + #include "Common/Core/RecoDecay.h" #include @@ -292,13 +294,13 @@ struct JetCorrelationD0 { registry.add("hEtaResolution", "#eta resolution;#p_{T,part};Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -1.0, 1.0}}}); } enum D0McCategory : int { - Undefined = -1, // no truth match / unclassified - Signal = 0, // correctly identified D0(bar), π+ K− - Reflection = 1, // true D0(bar) reconstructed with swapped mass hypothesis - CorrBkgPiKPi0 = 2, // correlated background: π+ K− π0 - CorrBkgPiPi = 3, // correlated background: π+ π− - CorrBkgPiPiPi0 = 4, // correlated background: π+ π− π0 - CorrBkgKK = 5 // correlated background: K+ K− + Undefined = -1, // no truth match / unclassified + Signal = 0, // correctly identified D0(bar), π+ K− + Reflection = 1, // true D0(bar) reconstructed with swapped mass hypothesis + CorrBkgPiKPi0 = 2, // correlated background: π+ K− π0 + CorrBkgPiPi = 3, // correlated background: π+ π− + CorrBkgPiPiPi0 = 4, // correlated background: π+ π− π0 + CorrBkgKK = 5 // correlated background: K+ K− }; void processData(soa::Filtered::iterator const& collision, aod::CandidatesD0Data const& d0Candidates, From cf27bcea03c5bbf28656e3727152b401c4bb9de7 Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Thu, 6 Aug 2026 10:22:35 +0200 Subject: [PATCH 6/7] clang formatting --- PWGJE/Tasks/jetCorrelationD0.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index 244494ab787..bd6f919d333 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -19,8 +19,6 @@ #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" -#include "PWGHF/Core/DecayChannels.h" - #include "Common/Core/RecoDecay.h" #include @@ -294,13 +292,13 @@ struct JetCorrelationD0 { registry.add("hEtaResolution", "#eta resolution;#p_{T,part};Resolution", {HistType::kTH2F, {{400, 0, 400}, {1000, -1.0, 1.0}}}); } enum D0McCategory : int { - Undefined = -1, // no truth match / unclassified - Signal = 0, // correctly identified D0(bar), π+ K− - Reflection = 1, // true D0(bar) reconstructed with swapped mass hypothesis - CorrBkgPiKPi0 = 2, // correlated background: π+ K− π0 - CorrBkgPiPi = 3, // correlated background: π+ π− - CorrBkgPiPiPi0 = 4, // correlated background: π+ π− π0 - CorrBkgKK = 5 // correlated background: K+ K− + Undefined = -1, // no truth match / unclassified + Signal = 0, // correctly identified D0(bar), π+ K− + Reflection = 1, // true D0(bar) reconstructed with swapped mass hypothesis + CorrBkgPiKPi0 = 2, // correlated background: π+ K− π0 + CorrBkgPiPi = 3, // correlated background: π+ π− + CorrBkgPiPiPi0 = 4, // correlated background: π+ π− π0 + CorrBkgKK = 5 // correlated background: K+ K− }; void processData(soa::Filtered::iterator const& collision, aod::CandidatesD0Data const& d0Candidates, From f12b92833bd0f1ca8e4e20f1c0487af8961e31bd Mon Sep 17 00:00:00 2001 From: MattOckleton Date: Mon, 10 Aug 2026 14:31:05 +0200 Subject: [PATCH 7/7] Adding charge conjugate to correlated decays --- PWGJE/Tasks/jetCorrelationD0.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGJE/Tasks/jetCorrelationD0.cxx b/PWGJE/Tasks/jetCorrelationD0.cxx index bd6f919d333..eee51eb4ab4 100644 --- a/PWGJE/Tasks/jetCorrelationD0.cxx +++ b/PWGJE/Tasks/jetCorrelationD0.cxx @@ -293,7 +293,7 @@ struct JetCorrelationD0 { } enum D0McCategory : int { Undefined = -1, // no truth match / unclassified - Signal = 0, // correctly identified D0(bar), π+ K− + Signal = 0, // correctly identified D0 and (bar), π+ K− + cc Reflection = 1, // true D0(bar) reconstructed with swapped mass hypothesis CorrBkgPiKPi0 = 2, // correlated background: π+ K− π0 CorrBkgPiPi = 3, // correlated background: π+ π− @@ -378,15 +378,15 @@ struct JetCorrelationD0 { } if ((std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToPiK) && (matchedFrom != 0) && (selectedAs == matchedFrom)) { category = D0McCategory::Signal; // D0 or D0bar, π+ K− - } else if ((d0DecayChannel == hf2Prong::DecayChannelMain::D0ToPiK) && (selectedAs == -1 * matchedFrom)) { + } else if ((std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToPiK) && (matchedFrom != 0) && (selectedAs == -1 * matchedFrom)) { category = D0McCategory::Reflection; - } else if (d0DecayChannel == hf2Prong::DecayChannelMain::D0ToPiKPi0) { + } else if (std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToPiKPi0) { category = D0McCategory::CorrBkgPiKPi0; - } else if (d0DecayChannel == hf2Prong::DecayChannelMain::D0ToPiPi) { + } else if (std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToPiPi) { category = D0McCategory::CorrBkgPiPi; - } else if (d0DecayChannel == hf2Prong::DecayChannelMain::D0ToPiPiPi0) { + } else if (std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToPiPiPi0) { category = D0McCategory::CorrBkgPiPiPi0; - } else if (d0DecayChannel == hf2Prong::DecayChannelMain::D0ToKK) { + } else if (std::abs(d0DecayChannel) == hf2Prong::DecayChannelMain::D0ToKK) { category = D0McCategory::CorrBkgKK; }