From ebd23a572d5145d66820a3c801ae032f0e36b262 Mon Sep 17 00:00:00 2001 From: jikim1290 Date: Mon, 25 May 2026 13:53:47 +0900 Subject: [PATCH 1/3] fixing for BC --- PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx index 28f32417010..70a64eeed4a 100644 --- a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx +++ b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx @@ -51,7 +51,6 @@ #include #include -#include #include #include #include @@ -59,6 +58,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; @@ -146,7 +146,6 @@ struct flowDirectedFlowTask { using EventCandidates = soa::Filtered>; using AllTrackCandidates = soa::Filtered>; using ResoV0s = aod::V0Datas; - using BCsRun3 = soa::Join; void init(InitContext&) { @@ -235,7 +234,7 @@ struct flowDirectedFlowTask { template bool eventSelected(TCollision collision) - { + { if (!collision.sel8()) { return 0; } @@ -244,7 +243,7 @@ struct flowDirectedFlowTask { } if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; - } + } if (cfgPVSel && std::abs(collision.posZ()) > cfgCutVertex) { return 0; } @@ -418,8 +417,8 @@ struct flowDirectedFlowTask { ROOT::Math::PxPyPzMVector daughter; ROOT::Math::PxPyPzMVector pion; float mass = 0.0; - - if (isLambda) { + + if (isLambda) { daughter = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); pion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); mass = v0.mLambda(); @@ -428,7 +427,7 @@ struct flowDirectedFlowTask { pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); mass = v0.mAntiLambda(); } - + const auto hyperon = daughter + pion; ROOT::Math::Boost boostToRest(hyperon.BoostToCM()); const auto daughterStar = boostToRest(daughter); @@ -502,7 +501,7 @@ struct flowDirectedFlowTask { } } - void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, BCsRun3 const&) + void processData(EventCandidates::iterator const& collision, AllTrackCandidates const& tracks, ResoV0s const& v0s, aod::BCsWithTimestamps const&) { if (!eventSelected(collision)) { return; From 8d97882ad34b9d6591bb3dd14501d96ebe32c67e Mon Sep 17 00:00:00 2001 From: jikim1290 Date: Mon, 25 May 2026 14:06:20 +0900 Subject: [PATCH 2/3] fix o2linter --- PWGCF/Flow/Tasks/CMakeLists.txt | 2 +- PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx | 36 +++++++---------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index 0f5f97f64fb..64f235e7337 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -114,7 +114,7 @@ o2physics_add_dpl_workflow(pid-flow-pt-corr PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(flow-gpol-ese +o2physics_add_dpl_workflow(flow-directed-flow-task SOURCES flowDirectedFlowTask.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx index 70a64eeed4a..a4ea133605c 100644 --- a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx +++ b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx @@ -221,17 +221,6 @@ struct flowDirectedFlowTask { histos.add("hSparseAntiLambdaAvgUyQ1", "AntiLambda vs q1", HistType::kTHnSparseF, axesPolSPQ1, true); } - float getPhiInRange(float phi) - { - while (phi <= -o2::constants::math::PI) { - phi += o2::constants::math::TwoPI; - } - while (phi > o2::constants::math::PI) { - phi -= o2::constants::math::TwoPI; - } - return phi; - } - template bool eventSelected(TCollision collision) { @@ -387,9 +376,6 @@ struct flowDirectedFlowTask { if (std::abs(v0.yLambda()) > cfgV0Rap) { return false; } - if (std::abs(v0.eta()) > 0.8) { - return false; - } return true; } @@ -438,12 +424,12 @@ struct flowDirectedFlowTask { const float cosThetaStar = daughterStar.Pz() / daughterStar.P(); const float sinThetaStar = std::sqrt(std::max(0.0, 1.0 - cosThetaStar * cosThetaStar)); - const float sinPhiStar = std::sin(getPhiInRange(phiStar)); - const float cosPhiStar = std::cos(getPhiInRange(phiStar)); + const float sinPhiStar = std::sin(phiStar); + const float cosPhiStar = std::cos(phiStar); - float polEP_A = std::sin(getPhiInRange(phiStar - psiA)); - float polEP_C = std::sin(getPhiInRange(phiStar - psiC)); - float polEP = std::sin(getPhiInRange(phiStar - psiFull)); + float polEP_A = std::sin(phiStar - psiA); + float polEP_C = std::sin(phiStar - psiC); + float polEP = std::sin(phiStar - psiFull); const float qxFull = qxC - qxA; const float qyFull = qyC - qyA; @@ -463,8 +449,8 @@ struct flowDirectedFlowTask { polEP_A /= accDen; polEP_C /= accDen; - const float cosPsi = std::cos(getPhiInRange(psiFull)); - const float sinPsi = std::sin(getPhiInRange(psiFull)); + const float cosPsi = std::cos(psiFull); + const float sinPsi = std::sin(psiFull); if (isLambda) { histos.fill(HIST("hSparseLambdaPolSPQ1"), mass, v0.pt(), polSP, centrality, q1, wgt); @@ -538,7 +524,7 @@ struct flowDirectedFlowTask { float dotAC = qxA * qxC + qyA * qyC; float resDot = dotAC / (magA * magC); - histos.fill(HIST("hpResCosAC"), centrality, std::cos(getPhiInRange(psiA - psiC))); + histos.fill(HIST("hpResCosAC"), centrality, std::cos(psiA - psiC)); histos.fill(HIST("hpResDotAC"), centrality, resDot); histos.fill(HIST("hpQxAQxC"), centrality, qxA * qxC); histos.fill(HIST("hpQyAQyC"), centrality, qyA * qyC); @@ -562,9 +548,9 @@ struct flowDirectedFlowTask { histos.fill(HIST("hV1SPAQ1"), centrality, track.pt(), track.eta(), q1, v1SPA); histos.fill(HIST("hV1SPCQ1"), centrality, track.pt(), track.eta(), q1, v1SPC); - histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiFull))); - histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiA))); - histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(getPhiInRange(phi - psiC))); + histos.fill(HIST("hV1EPFullQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiFull)); + histos.fill(HIST("hV1EPAQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiA)); + histos.fill(HIST("hV1EPCQ1"), centrality, track.pt(), track.eta(), q1, std::cos(phi - psiC)); } for (const auto& v0 : v0s) { From c72f305383d99b7e48ca8693b682f12fe1b5103c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 25 May 2026 05:07:00 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx index a4ea133605c..253174ef5bb 100644 --- a/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx +++ b/PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx @@ -51,6 +51,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,6 @@ #include #include #include -#include using namespace o2; using namespace o2::framework; @@ -223,7 +223,7 @@ struct flowDirectedFlowTask { template bool eventSelected(TCollision collision) - { + { if (!collision.sel8()) { return 0; } @@ -232,7 +232,7 @@ struct flowDirectedFlowTask { } if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; - } + } if (cfgPVSel && std::abs(collision.posZ()) > cfgCutVertex) { return 0; } @@ -403,8 +403,8 @@ struct flowDirectedFlowTask { ROOT::Math::PxPyPzMVector daughter; ROOT::Math::PxPyPzMVector pion; float mass = 0.0; - - if (isLambda) { + + if (isLambda) { daughter = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); pion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); mass = v0.mLambda(); @@ -413,7 +413,7 @@ struct flowDirectedFlowTask { pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); mass = v0.mAntiLambda(); } - + const auto hyperon = daughter + pion; ROOT::Math::Boost boostToRest(hyperon.BoostToCM()); const auto daughterStar = boostToRest(daughter);