From 8dba04c6edde43b7aa5537d52061f967d9075906 Mon Sep 17 00:00:00 2001 From: jikim1290 Date: Mon, 22 Jun 2026 12:04:54 +0900 Subject: [PATCH 1/2] add q2 selection from ccdb --- PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx | 50 +++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx index 35e40530b3c8..29385066c5ba 100644 --- a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx +++ b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx @@ -134,14 +134,18 @@ struct JEPFlowAnalysis { Configurable cfgShiftPath{"cfgShiftPath", "Users/j/junlee/Qvector/QvecCalib/Shift", "Path for Shift"}; Configurable cfgVertexZ{"cfgVertexZ", 10.0, "Maximum vertex Z selection"}; - Configurable cfgq2analysis{"cfgq2analysis", false, "ese analysis flag"}; + Configurable cfgq2analysis{"cfgq2analysis", 0, "ese analysis selection mode"}; Configurable> cfgMultq2SelBin{"cfgMultq2SelBin", {0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, ""}; Configurable> cfgMultq2high{"cfgMultq2high", {}, ""}; Configurable> cfgMultq2low{"cfgMultq2low", {}, ""}; + Configurable cfgQ2SelFrac{"cfgQ2SelFrac", 0.5, "ese analysis q2 selection with cfgq2analysis=2"}; Configurable cfgJetSubEvtSel{"cfgJetSubEvtSel", 0, "0: none, 1: Ratio, 2: relative ratio"}; Configurable> cfgJetSubEvlSelVar{"cfgJetSubEvlSelVar", {}, ""}; + Configurable cfgQselHistPath{"cfgQselHistPath", "", "CCDB path for q2 histogram"}; + Configurable cfgEventQAonly{"cfgEventQAonly", false, "event loop only"}; + Configurable cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"}; Configurable cfgRefAName{"cfgRefAName", "TPCPos", "The name of detector for reference A"}; Configurable cfgRefBName{"cfgRefBName", "TPCNeg", "The name of detector for reference B"}; @@ -187,6 +191,9 @@ struct JEPFlowAnalysis { std::string fullCCDBShiftCorrPath; THn* effMap = nullptr; + TH3F* q2Map = nullptr; + float q2selHigh = 100.; + float q2selLow = 0.; std::vector ft0RelGainConst{}; std::vector fv0RelGainConst{}; @@ -399,6 +406,11 @@ struct JEPFlowAnalysis { q2Mag = std::sqrt(std::pow(qx_shifted[0], 2) + std::pow(qy_shifted[0], 2)); + if (cfgq2analysis == 2) { + q2selHigh = q2Map->GetBinContent(q2Map->GetXaxis()->FindBin(i + 2), q2Map->GetYaxis()->FindBin(cent), q2Map->GetZaxis()->FindBin(cfgQ2SelFrac)); + q2selLow = q2Map->GetBinContent(q2Map->GetXaxis()->FindBin(i + 2), q2Map->GetYaxis()->FindBin(cent), q2Map->GetZaxis()->FindBin(1. - cfgQ2SelFrac)); + } + epFlowHistograms.fill(HIST("EpDet"), i + 2, cent, eps[0]); epFlowHistograms.fill(HIST("EpRefA"), i + 2, cent, eps[1]); epFlowHistograms.fill(HIST("EpRefB"), i + 2, cent, eps[2]); @@ -419,10 +431,10 @@ struct JEPFlowAnalysis { if (cfgJetSubEvtSel) { epFlowHistograms.fill(HIST("EpResQvecEvslDetRefAxx"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]); epFlowHistograms.fill(HIST("EpResQvecEvslDetRefBxx"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]); - epFlowHistograms.fill(HIST("EpResQvecEvslRefARefBxy"), i + 2, cent, qx_shifted[2] * qy_shifted[1] - qx_shifted[1] * qy_shifted[2]); + epFlowHistograms.fill(HIST("EpResQvecEvslRefARefBxx"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]); } - if (cfgq2analysis) { + if (cfgq2analysis == 1) { if (q2sel(q2Mag, true)) { epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]); epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]); @@ -432,6 +444,20 @@ struct JEPFlowAnalysis { epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]); epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2low"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]); } + } else if (cfgq2analysis == 2) { + if (q2Mag > q2selHigh) { + epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]); + epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]); + epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2high"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]); + } else if (q2Mag < q2selLow) { + epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]); + epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]); + epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2low"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]); + } + } + + if (cfgEventQAonly) { + continue; } highestPt = 0.0; @@ -458,12 +484,18 @@ struct JEPFlowAnalysis { epFlowHistograms.fill(HIST("SPvnxx"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); epFlowHistograms.fill(HIST("SPvnxy"), i + 2, cent, track.pt(), track.eta(), (std::sin(track.phi() * static_cast(i + 2)) * qx_shifted[0] - std::cos(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); - if (cfgq2analysis) { + if (cfgq2analysis == 1) { if (q2sel(q2Mag, true)) { epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); } else if (q2sel(q2Mag, false)) { epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); } + } else if (cfgq2analysis == 2) { + if (q2Mag > q2selHigh) { + epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); + } else if(q2Mag < q2selLow) { + epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); + } } } if (i == 0) { // second harmonic only @@ -642,6 +674,16 @@ struct JEPFlowAnalysis { } } + if (cfgq2analysis == 2) { + auto bc = coll.bc_as(); + currentRunNumber = bc.runNumber(); + if (currentRunNumber != lastRunNumber) { + std::string fullPath; + fullPath = cfgQselHistPath; + q2Map = ccdb->getForTimeStamp(cfgQselHistPath, bc.timestamp()); + } + } + cent = coll.cent(); epFlowHistograms.fill(HIST("hCentrality"), cent); epFlowHistograms.fill(HIST("hVertex"), coll.posZ()); From 7411a049314abd8a4569b468d9cdaf02e194e2dc Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 22 Jun 2026 03:06:06 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx index 29385066c5ba..25fd4bdc1627 100644 --- a/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx +++ b/PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx @@ -493,7 +493,7 @@ struct JEPFlowAnalysis { } else if (cfgq2analysis == 2) { if (q2Mag > q2selHigh) { epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); - } else if(q2Mag < q2selLow) { + } else if (q2Mag < q2selLow) { epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast(i + 2)) * qy_shifted[0]), weight); } }