From 65ee02be93e72bf501ccbfd3883d24577078c167 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Thu, 16 Oct 2025 16:54:08 +0900 Subject: [PATCH 1/8] [PWGLF] Return the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 6cab67014aa..37b9963d88b 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -44,7 +44,7 @@ #include #include #include -#include +// #include #include #include #include @@ -179,10 +179,10 @@ struct kstarInOO { } if (cfgMcHistos) { - // histos.add("hPion_PID_Purity", "hPion_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); - // histos.add("hKaon_PID_Purity", "hKaon_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); - // histos.add("hSimplePion_PID_Purity", "hSimplePion_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); - // histos.add("hSimpleKaon_PID_Purity", "hSimpleKaon_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); + histos.add("hPion_PID_Purity", "hPion_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); + histos.add("hKaon_PID_Purity", "hKaon_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); + histos.add("hSimplePion_PID_Purity", "hSimplePion_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); + histos.add("hSimpleKaon_PID_Purity", "hSimpleKaon_PID_Purity", kTH1F, {{3, -1.5, 1.5}}); histos.add("nEvents_MC", "nEvents_MC", kTH1F, {{4, 0.0, 4.0}}); histos.add("nEvents_MC_True", "nEvents_MC_True", kTH1F, {{4, 0.0, 4.0}}); @@ -546,6 +546,7 @@ struct kstarInOO { if (trk1.index() >= trk2.index()) return {-1.0, -1.0}; + std::cout << "track1 Index: " << trk1.index() << "track2 Index: " << trk2.index() << std::endl; // if (trk1.globalIndex() == trk2.globalIndex()) // return {-1.0, -1.0}; From 93bb5fdbaa77d8e0e1ebeb5a8e5e5bb16eb7bfc5 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Thu, 16 Oct 2025 16:59:01 +0900 Subject: [PATCH 2/8] [PWGLF] Return the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 37b9963d88b..9e0692be254 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -546,7 +546,7 @@ struct kstarInOO { if (trk1.index() >= trk2.index()) return {-1.0, -1.0}; - std::cout << "track1 Index: " << trk1.index() << "track2 Index: " << trk2.index() << std::endl; + // std::cout << "track1 Index: " << trk1.index() << "track2 Index: " << trk2.index() << std::endl; // if (trk1.globalIndex() == trk2.globalIndex()) // return {-1.0, -1.0}; From 323316d965eaf1e24e38dea9d075a3164dd405f8 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Thu, 16 Oct 2025 17:01:35 +0900 Subject: [PATCH 3/8] [PWGLF] Return the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 9e0692be254..85f5249652a 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -44,7 +44,7 @@ #include #include #include -// #include +#include #include #include #include From 60d47b5a2ca73943db85c515de3ac202b35075e2 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Thu, 16 Oct 2025 19:57:05 +0900 Subject: [PATCH 4/8] [PWGLF] Return the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 85f5249652a..453dda77fd2 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -279,13 +279,11 @@ struct kstarInOO { return false; if (cfgTrackGlobalWoDCATrack && !track.isGlobalTrackWoDCA()) return false; - // if (cfgTracknFindableTPCClusters > 0 && track.tpcNClsFindable() < cfgTracknFindableTPCClusters) - if (track.tpcNClsFindable() < cfgTracknFindableTPCClusters) + if (cfgTracknFindableTPCClusters > 0 && track.tpcNClsFindable() < cfgTracknFindableTPCClusters) return false; if (track.tpcNClsCrossedRows() < cfgTracknTPCCrossedRows) return false; - // if (cfgTracknRowsOverFindable > 0 && track.tpcCrossedRowsOverFindableCls() > cfgTracknRowsOverFindable) - if (track.tpcCrossedRowsOverFindableCls() > cfgTracknRowsOverFindable) + if (cfgTracknRowsOverFindable > 0 && track.tpcCrossedRowsOverFindableCls() > cfgTracknRowsOverFindable) return false; if (track.tpcChi2NCl() > cfgTracknTPCChi2) return false; From 9a29fdf1d4e42fcf04fb3f912ca3dad3dad4f4f8 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Fri, 17 Oct 2025 13:57:56 +0900 Subject: [PATCH 5/8] [PWGLF] Changed the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 453dda77fd2..850920d35c4 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -423,7 +423,10 @@ struct kstarInOO { // auto [KstarPt_Kpi, Minv_Kpi] = minvReconstruction(trk1, trk2, QA, false); // auto [KstarPt_piK, Minv_piK] = minvReconstruction(trk1, trk2, QA, true); + // 1. (k, pi) passed condition std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, false); + + // 2. (pi, k) passed condition if trk1=pion, trk2=kaon after passing 1. candidates std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, true); if (Minv_Kpi < 0) @@ -533,21 +536,14 @@ struct kstarInOO { if (!trackSelection(trk1, false) || !trackSelection(trk2, false)) return {-1.0, -1.0}; - if (!flip) { - if (!trackPIDKaon(trk1, QA) || !trackPIDPion(trk2, QA)) { - return {-1.0, -1.0}; - } - } else { - if (!trackPIDPion(trk1, false) || !trackPIDKaon(trk2, false)) - return {-1.0, -1.0}; - } - - if (trk1.index() >= trk2.index()) + if (!trackPIDKaon(trk1, QA) || !trackPIDPion(trk2, QA)) return {-1.0, -1.0}; - // std::cout << "track1 Index: " << trk1.index() << "track2 Index: " << trk2.index() << std::endl; - // if (trk1.globalIndex() == trk2.globalIndex()) + // if (trk1.index() >= trk2.index()) // return {-1.0, -1.0}; + // I checked that index and globalIndex was same function + if (trk1.globalIndex() >= trk2.globalIndex()) + return {-1.0, -1.0}; TLorentzVector lDecayDaughter1, lDecayDaughter2, lResonance; if (!flip) { From 9940e6d7aaa92b86ad3884eafd5db5189f0f62fa Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Fri, 17 Oct 2025 16:46:39 +0900 Subject: [PATCH 6/8] [PWGLF] Changed the current code of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index 850920d35c4..c924acc15f4 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -191,8 +191,13 @@ struct kstarInOO { histos.add("hMC_USS_True", "hMC_USS_True", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); histos.add("hMC_USS_KPi", "hMC_USS_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hMC_USS_PiK", "hMC_USS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); histos.add("hMC_LSS_KPi", "hMC_LSS_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hMC_LSS_PiK", "hMC_LSS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hMC_USS_KPi_Mix", "hMC_USS_KPi_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hMC_USS_PiK_Mix", "hMC_USS_PiK_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hMC_USS_KPi_True", "hMC_USS_KPi_True", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); histos.add("hMC_USS_PiK_True", "hMC_USS_PiK_True", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); } @@ -414,20 +419,17 @@ struct kstarInOO { std::vector PIDPurityKey_Kaon; std::vector PIDPurityKey_Pion; - double KstarPt_Kpi, Minv_Kpi; + // double KstarPt_Kpi, Minv_Kpi; for (const auto& [trk1, trk2] : combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (!trk1.has_mcParticle() || !trk2.has_mcParticle()) continue; - // auto [KstarPt_Kpi, Minv_Kpi] = minvReconstruction(trk1, trk2, QA, false); - // auto [KstarPt_piK, Minv_piK] = minvReconstruction(trk1, trk2, QA, true); - - // 1. (k, pi) passed condition - std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, false); + auto [KstarPt_Kpi, Minv_Kpi] = minvReconstruction(trk1, trk2, QA, false); + auto [KstarPt_piK, Minv_piK] = minvReconstruction(trk1, trk2, QA, true); - // 2. (pi, k) passed condition if trk1=pion, trk2=kaon after passing 1. candidates - std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, true); + // std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, false); + // std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, true); if (Minv_Kpi < 0) continue; @@ -437,12 +439,15 @@ struct kstarInOO { if (!IsMix) { if (conjugate < 0) { histos.fill(HIST("hMC_USS_KPi"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hMC_USS_PiK"), centrality, KstarPt_piK, Minv_piK); } else if (conjugate > 0) { histos.fill(HIST("hMC_LSS_KPi"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hMC_LSS_PiK"), centrality, KstarPt_piK, Minv_piK); } } else { if (conjugate < 0) { histos.fill(HIST("hMC_USS_KPi_Mix"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hMC_USS_PiK_Mix"), centrality, KstarPt_piK, Minv_piK); } } } From 9d97d93621d2c3b25317830f39549bd0c9424bcc Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Tue, 21 Oct 2025 19:27:09 +0900 Subject: [PATCH 7/8] [PWGLF] Fixed the data part of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 54 +++++++++++++++------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index c924acc15f4..d8c512c11ae 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -172,10 +172,12 @@ struct kstarInOO { if (cfgDataHistos) { histos.add("nEvents", "nEvents", kTH1F, {{4, 0.0, 4.0}}); - histos.add("hUSS", "hUSS", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); - histos.add("hLSS", "hLSS", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); - histos.add("hUSS_Mix", "hUSS_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); - histos.add("hLSS_Mix", "hLSS_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_KPi", "hUSS_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_PiK", "hUSS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hLSS_KPi", "hLSS_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hLSS_PiK", "hLSS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_Mix_KPi", "hUSS_Mix_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_Mix_PiK", "hUSS_Mix_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); } if (cfgMcHistos) { @@ -385,26 +387,29 @@ struct kstarInOO { for (const auto& [trk1, trk2] : combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { - auto [KstarPt, Minv] = minvReconstruction(trk1, trk2, QA, false); + auto [KstarPt_Kpi, Minv_Kpi] = minvReconstruction(trk1, trk2, QA, false); + auto [KstarPt_piK, Minv_piK] = minvReconstruction(trk1, trk2, QA, true); + + if (Minv_Kpi < 0) + continue; double conjugate = trk1.sign() * trk2.sign(); if (cfgDataHistos) { - if (Minv > 0) { - if (!IsMix) { - if (conjugate < 0) { - histos.fill(HIST("hUSS"), centrality, KstarPt, Minv); - } else if (conjugate > 0) { - histos.fill(HIST("hLSS"), centrality, KstarPt, Minv); - } - } else { - if (conjugate < 0) { - histos.fill(HIST("hUSS_Mix"), centrality, KstarPt, Minv); - } else if (conjugate > 0) { - histos.fill(HIST("hLSS_Mix"), centrality, KstarPt, Minv); - } + if (!IsMix) { + if (conjugate < 0) { + histos.fill(HIST("hUSS_KPi"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hUSS_PiK"), centrality, KstarPt_piK, Minv_piK); + } else if (conjugate > 0) { + histos.fill(HIST("hLSS_KPi"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hLSS_PiK"), centrality, KstarPt_piK, Minv_piK); + } + } else { + if (conjugate < 0) { + histos.fill(HIST("hUSS_KPi_Mix"), centrality, KstarPt_Kpi, Minv_Kpi); + histos.fill(HIST("hUSS_PiK_Mix"), centrality, KstarPt_piK, Minv_piK); } } - } // cfgDataHistos + } } // for } // TrackSlicing @@ -419,8 +424,6 @@ struct kstarInOO { std::vector PIDPurityKey_Kaon; std::vector PIDPurityKey_Pion; - // double KstarPt_Kpi, Minv_Kpi; - for (const auto& [trk1, trk2] : combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (!trk1.has_mcParticle() || !trk2.has_mcParticle()) continue; @@ -428,9 +431,6 @@ struct kstarInOO { auto [KstarPt_Kpi, Minv_Kpi] = minvReconstruction(trk1, trk2, QA, false); auto [KstarPt_piK, Minv_piK] = minvReconstruction(trk1, trk2, QA, true); - // std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, false); - // std::tie(KstarPt_Kpi, Minv_Kpi) = minvReconstruction(trk1, trk2, QA, true); - if (Minv_Kpi < 0) continue; @@ -704,7 +704,7 @@ struct kstarInOO { } TrackSlicingMC(collision, tracks, collision, tracks, false, true); } // processSameEvents_MC - PROCESS_SWITCH(kstarInOO, processSameEventMC, "process Same Event MC", true); + PROCESS_SWITCH(kstarInOO, processSameEventMC, "process Same Event MC", false); //======================================================= //| @@ -776,6 +776,10 @@ struct kstarInOO { if (cfgMcHistos) { histos.fill(HIST("hMC_kstar_True"), centrality, particle.pt()); } + if (cfgMcHistos) { + histos.fill(HIST("nEvents_MC_True"), 1.5); + } + } // loop over particles } // processMCTrue PROCESS_SWITCH(kstarInOO, processMCTrue, "process MC True", false); From 7580020b55b2a0f4f2c5b25116b2c4a259086168 Mon Sep 17 00:00:00 2001 From: jimun_lee Date: Fri, 24 Oct 2025 14:45:24 +0900 Subject: [PATCH 8/8] [PWGLF] Fixed the name of histogram of KstarInOO.cxx --- PWGLF/Tasks/Resonances/kstarInOO.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstarInOO.cxx b/PWGLF/Tasks/Resonances/kstarInOO.cxx index d8c512c11ae..17ba713c086 100644 --- a/PWGLF/Tasks/Resonances/kstarInOO.cxx +++ b/PWGLF/Tasks/Resonances/kstarInOO.cxx @@ -176,8 +176,8 @@ struct kstarInOO { histos.add("hUSS_PiK", "hUSS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); histos.add("hLSS_KPi", "hLSS_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); histos.add("hLSS_PiK", "hLSS_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); - histos.add("hUSS_Mix_KPi", "hUSS_Mix_KPi", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); - histos.add("hUSS_Mix_PiK", "hUSS_Mix_PiK", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_KPi_Mix", "hUSS_KPi_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); + histos.add("hUSS_PiK_Mix", "hUSS_PiK_Mix", kTHnSparseF, {cfgCentAxis, ptAxis, minvAxis}); } if (cfgMcHistos) {