From 10a64353fe42f5913567d067e6b7220e585ed7d6 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Sat, 11 Jul 2026 19:55:00 +0800 Subject: [PATCH 1/6] add ZDC timing cut; replace with new minimum dihadron container; add RCT flags and interaction rate cut; --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 238 +++++++++++++--------------- PWGUD/Tasks/flowCumulantsUpc.cxx | 135 ++++++++++++++-- 2 files changed, 230 insertions(+), 143 deletions(-) mode change 100644 => 100755 PWGUD/Tasks/flowCorrelationsUpc.cxx diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx old mode 100644 new mode 100755 index a7ee9ea3dfb..4c2940befd3 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -11,11 +11,11 @@ /// \file flowCorrelationsUpc.cxx /// \brief Provides a sparse with usefull two particle correlation info -/// \author Yongxi Du (yongxi.du@cern.ch), Mingrui Zhao (mingrui.zhao@cern.ch, mingrui.zhao@mail.labz0.org) -/// copied from Thor Jensen (thor.kjaersgaard.jensen@cern.ch) and Debojit Sarkar (debojit.sarkar@cern.ch) +/// \author Yongxi Du (yongxi.du@cern.ch), Mingrui Zhao (mingrui.zhao@cern.ch, mingrui.zhao@mail.labz0.org), Zhiyong Lu (zhiyong.lu@cern.ch) #include "PWGCF/Core/CorrelationContainer.h" #include "PWGCF/GenericFramework/Core/GFWWeights.h" +#include "PWGCF/TwoParticleCorrelations/Core/DihadronContainer.h" #include "PWGUD/Core/SGSelector.h" #include "PWGUD/DataModel/UDTables.h" #include "PWGUD/DataModel/UDTruegapsideTables.h" @@ -51,18 +51,6 @@ #include #include -// namespace o2::aod -// { -// namespace flowcorrupc -// { -// DECLARE_SOA_COLUMN(Multiplicity, multiplicity, int); -// DECLARE_SOA_COLUMN(Truegapside, truegapside, int); -// } // namespace flowcorrupc -// DECLARE_SOA_TABLE(Multiplicity, "AOD", "MULTIPLICITY", -// flowcorrupc::Multiplicity); -// DECLARE_SOA_TABLE(Truegapside, "AOD", "TRUEGAPSIDE", flowcorrupc::Truegapside); -// } // namespace o2::aod - using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; @@ -71,58 +59,6 @@ using namespace o2::constants::math; // define the filtered collisions and tracks #define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable NAME{#NAME, DEFAULT, HELP}; -// struct CalcNchUpc { -// O2_DEFINE_CONFIGURABLE(cfgZVtxCut, float, 10.0f, "Accepted z-vertex range") -// O2_DEFINE_CONFIGURABLE(cfgPtCutMin, float, 0.1f, "minimum accepted track pT") -// O2_DEFINE_CONFIGURABLE(cfgEtaCut, float, 0.9f, "Eta cut") -// O2_DEFINE_CONFIGURABLE(cfgMinMixEventNum, int, 5, "Minimum number of events to mix") - -// // Added UPC Cuts -// SGSelector sgSelector; -// Configurable cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"}; -// Configurable cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"}; -// Configurable cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"}; -// Configurable cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"}; - -// // Filter trackFilter = (nabs(aod::track::eta) < cfgEtaCut) && (aod::track::pt > cfgPtCutMin) && (aod::track::pt < cfgPtCutMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)); - -// using UdTracks = soa::Join; -// using UdTracksFull = soa::Join; -// using UDCollisionsFull = soa::Join; - -// Produces multiplicityNch; -// Produces truegapside; - -// HistogramRegistry registry{"registry"}; - -// void init(InitContext&) -// { -// AxisSpec axisNch = {100, 0, 100}; -// AxisSpec axisVrtx = {10, -10, 10}; -// // AxisSpec axisgap = {12, -6, 6}; -// // std::vector trueGapBins = {-2, -1, 0, 1, 2, 3}; -// // AxisSpec axisgap = {trueGapBins, "true gap side"}; - -// std::vector binEdges = {-1.5, -0.5, 0.5, 1.5, 2.5, 3.5}; -// AxisSpec axisgap = {binEdges, "true gap side"}; -// registry.add("truegap", "truegap", {HistType::kTH1D, {axisgap}}); - -// registry.add("Ncharge", "N_{charge}", {HistType::kTH1D, {axisNch}}); -// registry.add("zVtx_all", "zVtx_all", {HistType::kTH1D, {axisVrtx}}); -// registry.add("Nch_vs_zVtx", "Nch vs zVtx", {HistType::kTH2D, {axisVrtx, axisNch}}); -// // registry.add("truegap", "truegap", {HistType::kTH1D, {axisgap}}); -// } - -// void process(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) -// { -// multiplicityNch(tracks.size()); -// truegapside(sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC)); -// // LOG(info) << "truegapside=" << sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); -// registry.fill(HIST("Ncharge"), tracks.size()); -// registry.fill(HIST("zVtx_all"), collision.posZ()); -// } -// }; - struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgZVtxCut, float, 10.0f, "Accepted z-vertex range") O2_DEFINE_CONFIGURABLE(cfgIfVertex, bool, false, "choose vertex or not") @@ -140,7 +76,7 @@ struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgRadiusHigh, float, 2.5, "High radius for merging cut") O2_DEFINE_CONFIGURABLE(cfgDcaxy, bool, true, "choose dcaxy") O2_DEFINE_CONFIGURABLE(cfgDcaz, bool, false, "choose dcaz") - O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 10.0, "dcaz cut") + O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 2.0, "dcaz cut") O2_DEFINE_CONFIGURABLE(cfgMaxTPCChi2NCl, int, 4, "tpcchi2") O2_DEFINE_CONFIGURABLE(cfgGapSide, int, 1, "choose one side 0:A; 1:C") O2_DEFINE_CONFIGURABLE(cfgGapSideMerge, bool, true, "merge A and C side") @@ -148,9 +84,14 @@ struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum number of found TPC clusters") O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum number of ITS clusters") O2_DEFINE_CONFIGURABLE(cfgGlobalTrack, bool, true, "require TPC+ITS track") - O2_DEFINE_CONFIGURABLE(cfgUseNchCorrected, bool, true, "use corrected Nch for X axis") + O2_DEFINE_CONFIGURABLE(cfgUseNchEffCorrected, bool, false, "use corrected Nch for X axis by efficiency correction") + O2_DEFINE_CONFIGURABLE(cfgUseNchRoughMCCorrected, bool, false, "use corrected Nch for X axis by Nch Reco vs True") + O2_DEFINE_CONFIGURABLE(cfgNchRoughMCFunction, std::string, "1.1*x + 0.3", "Function for Nch Reco vs True"); O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object") O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event") + O2_DEFINE_CONFIGURABLE(cfgRctFlagEnabled, bool, false, "use run condition table flag") + O2_DEFINE_CONFIGURABLE(cfgRctFlagIndex, int, 1, "1: isCBTOk; 2:isCBTZdcOk; 3: isCBTHadronOk; 4:isCBTHadronZdcOk ") + O2_DEFINE_CONFIGURABLE(cfgIRMaxCut, double, 50, "maximum interaction rate for UPC events") ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"}; ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"}; @@ -160,27 +101,19 @@ struct FlowCorrelationsUpc { ConfigurableAxis axisDeltaEta{"axisDeltaEta", {40, -2, 2}, "delta eta axis for histograms"}; ConfigurableAxis axisPtTrigger{"axisPtTrigger", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "pt trigger axis for histograms"}; ConfigurableAxis axisPtAssoc{"axisPtAssoc", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "pt associated axis for histograms"}; - ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100}, "multiplicity / centrality axis for histograms"}; + ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50}, "multiplicity / centrality axis for histograms"}; ConfigurableAxis vtxMix{"vtxMix", {VARIABLE_WIDTH, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "vertex axis for mixed event histograms"}; ConfigurableAxis multMix{"multMix", {VARIABLE_WIDTH, 0, 5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100}, "multiplicity / centrality axis for mixed event histograms"}; - - ConfigurableAxis axisVertexEfficiency{"axisVertexEfficiency", {10, -10, 10}, "vertex axis for efficiency histograms"}; - ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", {20, -1.0, 1.0}, "eta axis for efficiency histograms"}; - ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0}, "pt axis for efficiency histograms"}; ConfigurableAxis axisSample{"axisSample", {cfgSampleSize, 0, cfgSampleSize}, "sample axis for histograms"}; // Added UPC Cuts SGSelector sgSelector; - Configurable cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"}; - Configurable cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"}; - Configurable cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"}; - Configurable cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"}; ConfigurableAxis axisIndependent{"axisIndependent", {VARIABLE_WIDTH, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60}, "X axis for histograms"}; - ConfigurableAxis axisNch{"axisNch", {300, 0, 300}, "N_{ch}"}; // Corrections TH3D* mEfficiency = nullptr; bool correctionsLoaded = false; + TF1* fnchRoughMCFunc = nullptr; // make the filters and cuts. Filter trackFilter = (aod::udtrack::isPVContributor == true); @@ -194,22 +127,20 @@ struct FlowCorrelationsUpc { Service ccdb; Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + // global variables OutputObj fWeights{GFWWeights("weights")}; - - TAxis* fPtAxis = nullptr; - int lastRunNumber = -1; - std::vector runNumbers; // map of TH3 histograms for all runs std::vector efficiencyCache; + enum EventType { + SameEvent = 1, + MixedEvent = 3 + }; - using UdTracks = soa::Filtered>; using UdTracksFull = soa::Filtered>; - using UDCollisionsFull = soa::Filtered>; // Define the outputs - OutputObj same{Form("sameEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult))}; - OutputObj mixed{Form("mixedEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult))}; - + OutputObj sameDihadron{"sameEvent"}; + OutputObj mixedDihadron{"mixedEvent"}; HistogramRegistry registry{"registry"}; void init(InitContext&) @@ -231,21 +162,16 @@ struct FlowCorrelationsUpc { registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisIndependent, axisPtTrigger}}}); registry.add("eventcont", "bin", {HistType::kTH1F, {{10, 0, 10, "bin"}}}); // histogram to see how many events are in the same and mixed event - registry.add("deltaEta_deltaPhi_same", "deltaeta-deltaphi", {HistType::kTH2D, {axisDeltaEta, axisDeltaPhi}}); // histogram to check the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed", "deltaeta-deltaphi", {HistType::kTH2D, {axisDeltaEta, axisDeltaPhi}}); // histogram to check the delta eta and delta phi distribution + registry.get(HIST("eventcont"))->GetXaxis()->SetBinLabel(4, "same"); + registry.get(HIST("eventcont"))->GetXaxis()->SetBinLabel(5, "mix pair"); + registry.add("deltaPhi_deltaEta_same", "deltaphi-deltaeta", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEta}}); // histogram to check the delta eta and delta phi distribution + registry.add("deltaPhi_deltaEta_mixed", "deltaphi-deltaeta", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEta}}); // histogram to check the delta eta and delta phi distribution registry.add("Nch_raw_vs_independent", "Raw vs Independent", {HistType::kTH2D, {axisMultiplicity, axisIndependent}}); + registry.add("interactionRate", "kHz", {HistType::kTH1F, {{50, 0, 50, "kHz"}}}); - // if (doprocessSim) { - // registry.add("eventCounterMC", "Number of MC Events;; Count", {HistType::kTH1D, {{5, 0, 5}}}); - // registry.add("hVtxZMC", "Vexter Z distribution (MC)", {HistType::kTH1D, {axisVertex}}); - // registry.add("hMultMC", "Multiplicity distribution (MC)", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); - // registry.add("numberOfTracksMC", "Number of MC tracks;; Count", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); - // } - - o2::framework::AxisSpec axis = axisPtTrigger; - int nPtBins = axis.binEdges.size() - 1; - double* ptBins = &(axis.binEdges)[0]; - fPtAxis = new TAxis(nPtBins, ptBins); + if (cfgUseNchRoughMCCorrected) { + fnchRoughMCFunc = new TF1("fnchRoughMCFunc", cfgNchRoughMCFunction->c_str(), 0, 100); + } std::vector corrAxis = {{axisSample, "Sample"}, {axisVertex, "z-vtx (cm)"}, @@ -254,20 +180,11 @@ struct FlowCorrelationsUpc { {axisPtAssoc, "p_{T} (GeV/c)"}, {axisDeltaPhi, "#Delta#varphi (rad)"}, {axisDeltaEta, "#Delta#eta"}}; - std::vector effAxis = { - {axisVertexEfficiency, "z-vtx (cm)"}, - {axisPtEfficiency, "p_{T} (GeV/c)"}, - {axisEtaEfficiency, "#eta"}, - }; - std::vector userAxis; - same.setObject(new CorrelationContainer(Form("sameEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult)), Form("sameEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult)), corrAxis, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer(Form("mixedEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult)), Form("mixedEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult)), corrAxis, effAxis, userAxis)); + sameDihadron.setObject(new DihadronContainer("sameEvent", "sameEvent", corrAxis)); + mixedDihadron.setObject(new DihadronContainer("mixedEvent", "mixedEvent", corrAxis)); + LOGF(info, "End of init"); } - enum EventType { - SameEvent = 1, - MixedEvent = 3 - }; template float getDPhiStar(TTrack const& track1, TTrack const& track2, float radius, int runnum, float phi1, float phi2) @@ -292,14 +209,70 @@ struct FlowCorrelationsUpc { return dPhiStar; } + template + bool isGoodRctFlag(const C& collision) + { + switch (cfgRctFlagIndex) { + case 1: + return sgSelector.isCBTOk(collision); + case 2: + return sgSelector.isCBTZdcOk(collision); + case 3: + return sgSelector.isCBTHadronOk(collision); + case 4: + return sgSelector.isCBTHadronZdcOk(collision); + default: + return true; + } + } + + template + bool eventSelected(const C& collision) + { + if (cfgIfVertex && std::abs(collision.posZ()) > cfgZVtxCut) { + return false; + } + if (!collision.vtxITSTPC()) { + return false; + } + + if (!collision.sbp()) { + return false; + } + + if (!collision.itsROFb()) { + return false; + } + + if (!collision.tfb()) { + return false; + } + + if (collision.hadronicRate() > cfgIRMaxCut) { + return false; + } + + if (cfgRctFlagEnabled) { + if (!isGoodRctFlag(collision)) // check RCT flags + return false; + } + + return true; + } + template bool trackSelected(TTrack track) { // registry.fill(HIST("hTrackCount"), 0.5); + auto momentum = std::array{track.px(), track.py(), track.pz()}; + double eta = RecoDecay::eta(momentum); // UPC selection if (track.pt() < cfgPtCutMin || track.pt() > cfgPtCutMax) { return false; } + if (std::fabs(eta) > cfgEtaCut) { + return false; + } if (cfgGlobalTrack && !(track.hasITS() && track.hasTPC())) { return false; } @@ -388,7 +361,7 @@ struct FlowCorrelationsUpc { } } - template + template void fillCorrelations(TTracks tracks1, TTracks tracks2, float posZ, int system, int runnum, float vtxz, float eventWeight, double independent) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms { @@ -473,11 +446,11 @@ struct FlowCorrelationsUpc { // fill the right sparse and histograms with weights if (system == SameEvent) { - same->getPairHist()->Fill(step, fSampleIndex, posZ, independent, pt1, pt2, deltaPhi, deltaEta, weight); - registry.fill(HIST("deltaEta_deltaPhi_same"), deltaPhi, deltaEta, weight); + sameDihadron->getCorrHist()->Fill(0, fSampleIndex, posZ, independent, pt1, pt2, deltaPhi, deltaEta, weight); + registry.fill(HIST("deltaPhi_deltaEta_same"), deltaPhi, deltaEta, weight); } else if (system == MixedEvent) { - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, independent, pt1, pt2, deltaPhi, deltaEta, weight); - registry.fill(HIST("deltaEta_deltaPhi_mixed"), deltaPhi, deltaEta, weight); + mixedDihadron->getCorrHist()->Fill(0, fSampleIndex, posZ, independent, pt1, pt2, deltaPhi, deltaEta, weight); + registry.fill(HIST("deltaPhi_deltaEta_mixed"), deltaPhi, deltaEta, weight); } } } @@ -485,7 +458,6 @@ struct FlowCorrelationsUpc { void processSame(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) { - // LOG(info) << "Event passed filter: truegapside=" << collision.truegapside(); if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { return; } @@ -494,6 +466,9 @@ struct FlowCorrelationsUpc { auto currentRunNumber = collision.runNumber(); auto runDuration = ccdb->getRunDuration(currentRunNumber); + if(!eventSelected(collision)) + return; + loadCorrections(runDuration.first); registry.fill(HIST("eventcont"), 3.5); @@ -512,7 +487,7 @@ struct FlowCorrelationsUpc { nTracksRaw += 1.; - if (cfgUseNchCorrected) { + if (cfgUseNchEffCorrected) { float weff = 1.; if (getEfficiencyCorrection(weff, eta, pt, vtxz)) { nTracksCorrected += weff; @@ -520,25 +495,23 @@ struct FlowCorrelationsUpc { } } registry.fill(HIST("Nch_raw_vs_independent"), nTracksRaw, nTracksCorrected); + registry.fill(HIST("interactionRate"), collision.hadronicRate()); double independent = nTracksRaw; - if (cfgUseNchCorrected) { + if (cfgUseNchEffCorrected) { independent = nTracksCorrected; + } else if (cfgUseNchRoughMCCorrected) { + independent = fnchRoughMCFunc->Eval(nTracksRaw); } fillYield(collision, tracks, vtxz); - fillCorrelations( - tracks, tracks, collision.posZ(), SameEvent, - currentRunNumber, vtxz, 1.0f, independent); + fillCorrelations(tracks, tracks, collision.posZ(), SameEvent, currentRunNumber, vtxz, 1.0f, independent); } PROCESS_SWITCH(FlowCorrelationsUpc, processSame, "Process same event", true); - // event mixing - SliceCache cache; // using MixedBinning = ColumnBinningPolicy; - // the process for filling the mixed events void processMixed(UDCollisionsFull const& collisions, UdTracksFull const& tracks) { @@ -559,6 +532,8 @@ struct FlowCorrelationsUpc { tracks2.size() < cfgMinMult || tracks2.size() > cfgMaxMult) { continue; } + if(!eventSelected(collision1) || !eventSelected(collision2)) + continue; auto runDuration1 = ccdb->getRunDuration(collision1.runNumber()); loadCorrections(runDuration1.first); @@ -578,7 +553,7 @@ struct FlowCorrelationsUpc { nTracksRaw += 1.; - if (cfgUseNchCorrected) { + if (cfgUseNchEffCorrected) { float weff = 1.; if (getEfficiencyCorrection(weff, eta, pt, collision1.posZ())) { nTracksCorrected += weff; @@ -587,8 +562,10 @@ struct FlowCorrelationsUpc { } double independent = nTracksRaw; - if (cfgUseNchCorrected) { + if (cfgUseNchEffCorrected) { independent = nTracksCorrected; + } else if (cfgUseNchRoughMCCorrected) { + independent = fnchRoughMCFunc->Eval(nTracksRaw); } float eventWeight = 1.0f; @@ -596,9 +573,7 @@ struct FlowCorrelationsUpc { eventWeight = 1.0f / it.currentWindowNeighbours(); } - fillCorrelations( - tracks1, tracks2, collision1.posZ(), MixedEvent, - collision1.runNumber(), collision1.posZ(), eventWeight, independent); + fillCorrelations(tracks1, tracks2, collision1.posZ(), MixedEvent, collision1.runNumber(), collision1.posZ(), eventWeight, independent); } } PROCESS_SWITCH(FlowCorrelationsUpc, processMixed, "Process mixed events", true); @@ -607,7 +582,6 @@ struct FlowCorrelationsUpc { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - // adaptAnalysisTask(cfgc), adaptAnalysisTask(cfgc), }; } diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index eff14256879..1f3cf570976 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -92,10 +92,15 @@ struct FlowCumulantsUpc { O2_DEFINE_CONFIGURABLE(cfgGapSideC, bool, false, "only pass gapside C, otherwise pass A+C") O2_DEFINE_CONFIGURABLE(cfgGlobalTrack, bool, true, "require TPC+ITS track") O2_DEFINE_CONFIGURABLE(cfgUseNchCorrected, bool, true, "use corrected Nch for X axis") + O2_DEFINE_CONFIGURABLE(cfgRctFlagEnabled, bool, true, "use run condition table flag") + O2_DEFINE_CONFIGURABLE(cfgRctFlagIndex, int, 1, "1: isCBTOk; 2:isCBTZdcOk; 3: isCBTHadronOk; 4:isCBTHadronZdcOk ") O2_DEFINE_CONFIGURABLE(cfgDcaxy, bool, true, "choose dcaxy") O2_DEFINE_CONFIGURABLE(cfgDcaz, bool, false, "choose dcaz") O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 10.0, "dcaz cut") O2_DEFINE_CONFIGURABLE(cfgConsistentEventFlag, int, 0, "Flag to select consistent events - 0: off, 1: v2{2} gap calculable, 2: v2{4} full calculable, 4: v2{4} gap calculable, 8: v2{4} 3sub calculable") + O2_DEFINE_CONFIGURABLE(cfgZdcTime, bool, false, "choose zdc time cut") + O2_DEFINE_CONFIGURABLE(cfgZdcTimeCut, float, 2.0, "zdc time cut") + O2_DEFINE_CONFIGURABLE(cfgIRMaxCut, double, 50, "maximum interaction rate for UPC events") Configurable> cfgUserDefineGFWCorr{"cfgUserDefineGFWCorr", std::vector{"refN02 {2} refP02 {-2}", "refN12 {2} refP12 {-2}"}, "User defined GFW CorrelatorConfig"}; Configurable> cfgUserDefineGFWName{"cfgUserDefineGFWName", std::vector{"Ch02Gap22", "Ch12Gap22"}, "User defined GFW Name"}; @@ -166,13 +171,20 @@ struct FlowCumulantsUpc { // Add some output objects to the histogram registry // Event QA - registry.add("hEventCount", "Number of Event;; Count", {HistType::kTH1D, {{6, 0, 6}}}); + registry.add("hEventCount", "Number of Event;; Count", {HistType::kTH1D, {{13, 0, 13}}}); registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(1, "Filtered event"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "after gapside selection"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "after vertex selection"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "after occupancy"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "after loadcorrection"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(6, "after consistency check"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "after ZDC timing"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "after gapside"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "after Vz"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "after occupancy"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(6, "after load corr"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(7, "after vtxITSTPC"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(8, "after sbp"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(9, "after itsROFb"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(10, "after tfb"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(11, "after rct flag"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(12, "after consistency check"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(13, "after IR cut"); registry.add("hTrackCount", "Number of tracks;; Count", {HistType::kTH1D, {{9, 0, 9}}}); registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(1, "default UD tracks"); @@ -188,6 +200,9 @@ struct FlowCumulantsUpc { registry.add("hMultWoSel", "Multiplicity distribution", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); registry.add("hMult", "Multiplicity distribution", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); // Reco Track QA + registry.add("ZDCEnergy", "ZNA; ZNC; Count", {HistType::kTH2D, {{100, 0, 100}, {100, 0, 100}}}); + registry.add("ZDCTime", "ZNA; ZNC; Count", {HistType::kTH2D, {{100, -10, 10}, {100, -10, 10}}}); + registry.add("neutronClass", "ZNA; ZNC; Count", {HistType::kTH2D, {{2, 0, 2}, {2, 0, 2}}}); registry.add("hPhi", "#phi distribution", {HistType::kTH1D, {axisPhi}}); registry.add("hPhiWeighted", "corrected #phi distribution", {HistType::kTH1D, {axisPhi}}); registry.add("hEta", "#eta distribution", {HistType::kTH1D, {axisEta}}); @@ -201,6 +216,7 @@ struct FlowCumulantsUpc { registry.add("hDCAz", "DCAz after cuts; DCAz (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}}); registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}}); registry.add("hTrackCorrection2d", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}}); + registry.add("interactionRate", "kHz", {HistType::kTH1F, {{50, 0, 50, "kHz"}}}); // Mc track QA registry.add("hPhiMC", "#phi distribution", {HistType::kTH1D, {axisPhi}}); registry.add("hPhiWeightedMC", "corrected #phi distribution", {HistType::kTH1D, {axisPhi}}); @@ -560,6 +576,23 @@ struct FlowCumulantsUpc { return true; } + template + bool isGoodRctFlag(const C& collision) + { + switch (cfgRctFlagIndex) { + case 1: + return sgSelector.isCBTOk(collision); + case 2: + return sgSelector.isCBTZdcOk(collision); + case 3: + return sgSelector.isCBTHadronOk(collision); + case 4: + return sgSelector.isCBTHadronZdcOk(collision); + default: + return true; + } + } + template bool trackSelected(TTrack track) { @@ -636,6 +669,59 @@ struct FlowCumulantsUpc { return; } registry.fill(HIST("hEventCount"), 1.5); + + //zdc time cut + int neutronClass = -1; + bool xnxn = false, onon = false, xnon = false, onxn = false; + float energyCommonZNA = collision.energyCommonZNA(), energyCommonZNC = collision.energyCommonZNC(); + float timeZNA = collision.timeZNA(), timeZNC = collision.timeZNC(); + if (std::isinf(energyCommonZNA)) + energyCommonZNA = -999; + if (std::isinf(energyCommonZNC)) + energyCommonZNC = -999; + if (std::isinf(timeZNA)) + timeZNA = -999; + if (std::isinf(timeZNC)) + timeZNC = -999; + registry.fill(HIST("ZDCEnergy"), energyCommonZNC, energyCommonZNA); + registry.fill(HIST("ZDCTime"), timeZNC, timeZNA); + if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { + onon = true; + neutronClass = 0; + registry.fill(HIST("neutronClass"), 0, 0); + } + if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { + xnon = true; + neutronClass = 1; + registry.fill(HIST("neutronClass"), 0, 1); + } + if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { + onxn = true; + neutronClass = 2; + registry.fill(HIST("neutronClass"), 1, 0); + } + if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { + xnxn = true; + neutronClass = 3; + registry.fill(HIST("neutronClass"), 1, 1); + } + if(cfgZdcTime) { + // reject 0n0n and XnXn + if(neutronClass == 0 || neutronClass == 3) { + return; + } + // if A or C gap is requested, keep corresponding neutron class + if(cfgGapSideA || cfgGapSideC) { + if((cfgGapSideA && neutronClass == 1) || + (cfgGapSideC && neutronClass == 2)) { + // accepted + } else { + return; + } + } + } + registry.fill(HIST("hEventCount"), 2.5); + float lRandom = fRndm->Rndm(); float vtxz = collision.posZ(); registry.fill(HIST("hVtxZ"), vtxz); @@ -644,12 +730,12 @@ struct FlowCumulantsUpc { if (cfgIfVertex && std::abs(vtxz) > cfgCutVertex) { return; } - registry.fill(HIST("hEventCount"), 2.5); + registry.fill(HIST("hEventCount"), 3.5); int occupancy = collision.occupancyInTime(); if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { return; } - registry.fill(HIST("hEventCount"), 3.5); + registry.fill(HIST("hEventCount"), 4.5); auto currentRunNumber = collision.runNumber(); auto runDuration = ccdb->getRunDuration(currentRunNumber); @@ -667,7 +753,29 @@ struct FlowCumulantsUpc { return; } } - registry.fill(HIST("hEventCount"), 4.5); + registry.fill(HIST("hEventCount"), 5.5); + if (!collision.vtxITSTPC()) { + return; + } + registry.fill(HIST("hEventCount"), 6.5); + if (!collision.sbp()) { + return; + } + registry.fill(HIST("hEventCount"), 7.5); + if (!collision.itsROFb()) { + return; + } + registry.fill(HIST("hEventCount"), 8.5); + if (!collision.tfb()) { + return; + } + registry.fill(HIST("hEventCount"), 9.5); + + if (cfgRctFlagEnabled) { + if (!isGoodRctFlag(collision)) // check RCT flags + return; + registry.fill(HIST("hEventCount"), 10.5); + } // // track weights float weff = 1, wacc = 1; @@ -762,11 +870,16 @@ struct FlowCumulantsUpc { return; } } - registry.fill(HIST("hEventCount"), 5.5); + registry.fill(HIST("hEventCount"), 11.5); + if(collision.hadronicRate() > cfgIRMaxCut){ + return; + } + registry.fill(HIST("interactionRate"), collision.hadronicRate()); + registry.fill(HIST("hEventCount"), 12.5); // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { - fillFC(corrconfigs.at(l_ind), independent, lRandom); + fillFC(corrconfigs.at(l_ind), independent, lRandom); } } PROCESS_SWITCH(FlowCumulantsUpc, processData, "processData", true); From e0428c6f0c9370e6dd84e484f36fa4fdeb3f6317 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sat, 11 Jul 2026 12:02:29 +0000 Subject: [PATCH 2/6] Please consider the following formatting changes --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 20 +++++++++---------- PWGUD/Tasks/flowCumulantsUpc.cxx | 30 ++++++++++++++--------------- 2 files changed, 25 insertions(+), 25 deletions(-) mode change 100755 => 100644 PWGUD/Tasks/flowCorrelationsUpc.cxx diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx old mode 100755 new mode 100644 index 4c2940befd3..60aed422695 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -233,20 +233,20 @@ struct FlowCorrelationsUpc { return false; } if (!collision.vtxITSTPC()) { - return false; - } + return false; + } if (!collision.sbp()) { - return false; - } + return false; + } if (!collision.itsROFb()) { - return false; - } + return false; + } if (!collision.tfb()) { - return false; - } + return false; + } if (collision.hadronicRate() > cfgIRMaxCut) { return false; @@ -466,7 +466,7 @@ struct FlowCorrelationsUpc { auto currentRunNumber = collision.runNumber(); auto runDuration = ccdb->getRunDuration(currentRunNumber); - if(!eventSelected(collision)) + if (!eventSelected(collision)) return; loadCorrections(runDuration.first); @@ -532,7 +532,7 @@ struct FlowCorrelationsUpc { tracks2.size() < cfgMinMult || tracks2.size() > cfgMaxMult) { continue; } - if(!eventSelected(collision1) || !eventSelected(collision2)) + if (!eventSelected(collision1) || !eventSelected(collision2)) continue; auto runDuration1 = ccdb->getRunDuration(collision1.runNumber()); diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index 1f3cf570976..a318a1dcef6 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -670,7 +670,7 @@ struct FlowCumulantsUpc { } registry.fill(HIST("hEventCount"), 1.5); - //zdc time cut + // zdc time cut int neutronClass = -1; bool xnxn = false, onon = false, xnon = false, onxn = false; float energyCommonZNA = collision.energyCommonZNA(), energyCommonZNC = collision.energyCommonZNC(); @@ -705,15 +705,15 @@ struct FlowCumulantsUpc { neutronClass = 3; registry.fill(HIST("neutronClass"), 1, 1); } - if(cfgZdcTime) { + if (cfgZdcTime) { // reject 0n0n and XnXn - if(neutronClass == 0 || neutronClass == 3) { + if (neutronClass == 0 || neutronClass == 3) { return; } // if A or C gap is requested, keep corresponding neutron class - if(cfgGapSideA || cfgGapSideC) { - if((cfgGapSideA && neutronClass == 1) || - (cfgGapSideC && neutronClass == 2)) { + if (cfgGapSideA || cfgGapSideC) { + if ((cfgGapSideA && neutronClass == 1) || + (cfgGapSideC && neutronClass == 2)) { // accepted } else { return; @@ -755,20 +755,20 @@ struct FlowCumulantsUpc { } registry.fill(HIST("hEventCount"), 5.5); if (!collision.vtxITSTPC()) { - return; + return; } registry.fill(HIST("hEventCount"), 6.5); if (!collision.sbp()) { - return; - } + return; + } registry.fill(HIST("hEventCount"), 7.5); if (!collision.itsROFb()) { - return; - } + return; + } registry.fill(HIST("hEventCount"), 8.5); if (!collision.tfb()) { - return; - } + return; + } registry.fill(HIST("hEventCount"), 9.5); if (cfgRctFlagEnabled) { @@ -871,7 +871,7 @@ struct FlowCumulantsUpc { } } registry.fill(HIST("hEventCount"), 11.5); - if(collision.hadronicRate() > cfgIRMaxCut){ + if (collision.hadronicRate() > cfgIRMaxCut) { return; } registry.fill(HIST("interactionRate"), collision.hadronicRate()); @@ -879,7 +879,7 @@ struct FlowCumulantsUpc { // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { - fillFC(corrconfigs.at(l_ind), independent, lRandom); + fillFC(corrconfigs.at(l_ind), independent, lRandom); } } PROCESS_SWITCH(FlowCumulantsUpc, processData, "processData", true); From e93a34cad68bc78e98577e088c6ac4915b4d88d6 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Sat, 11 Jul 2026 20:24:36 +0800 Subject: [PATCH 3/6] modified following o2 linter and code-check --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 18 +++++++++--------- PWGUD/Tasks/flowCumulantsUpc.cxx | 22 ++++++---------------- 2 files changed, 15 insertions(+), 25 deletions(-) mode change 100644 => 100755 PWGUD/Tasks/flowCorrelationsUpc.cxx diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx old mode 100644 new mode 100755 index 60aed422695..9159bb73607 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -314,7 +314,7 @@ struct FlowCorrelationsUpc { if (mEfficiency == nullptr) { LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency); + LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast(mEfficiency)); } correctionsLoaded = true; } @@ -385,10 +385,10 @@ struct FlowCorrelationsUpc { if (!trackSelected(track1)) continue; - auto momentum = std::array{track1.px(), track1.py(), track1.pz()}; - double pt1 = RecoDecay::pt(momentum); - double phi1 = RecoDecay::phi(momentum); - double eta1 = RecoDecay::eta(momentum); + auto momentum1 = std::array{track1.px(), track1.py(), track1.pz()}; + double pt1 = RecoDecay::pt(momentum1); + double phi1 = RecoDecay::phi(momentum1); + double eta1 = RecoDecay::eta(momentum1); // 计算track1的权重 float weff1 = 1., wacc1 = 1.; @@ -407,10 +407,10 @@ struct FlowCorrelationsUpc { if (system == MixedEvent && cfgUsePtOrderInMixEvent && pt1 <= track2.pt()) continue; - auto momentum = std::array{track2.px(), track2.py(), track2.pz()}; - double pt2 = RecoDecay::pt(momentum); - double phi2 = RecoDecay::phi(momentum); - double eta2 = RecoDecay::eta(momentum); + auto momentum2 = std::array{track2.px(), track2.py(), track2.pz()}; + double pt2 = RecoDecay::pt(momentum2); + double phi2 = RecoDecay::phi(momentum2); + double eta2 = RecoDecay::eta(momentum2); float weff2 = 1., wacc2 = 1.; if (mEfficiency) { diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index a318a1dcef6..dc92412c181 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -147,7 +147,7 @@ struct FlowCumulantsUpc { GFW* fGFWMC = new GFW(); std::vector corrconfigs; std::vector corrconfigsmc; - TAxis* fPtAxis; + TAxis* fPtAxis = nullptr; TRandom3* fRndm = new TRandom3(0); TRandom3* fRndmMc = new TRandom3(0); int lastRunNumber = -1; @@ -543,9 +543,9 @@ struct FlowCumulantsUpc { if (cfgAcceptance.value.empty() == false) { mAcceptance = ccdb->getForTimeStamp(cfgAcceptance, timestamp); if (mAcceptance) { - LOGF(info, "Loaded acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)mAcceptance); + LOGF(info, "Loaded acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), static_cast(mAcceptance)); } else { - LOGF(warning, "Could not load acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), (void*)mAcceptance); + LOGF(warning, "Could not load acceptance weights from %s (%p)", cfgAcceptance.value.c_str(), static_cast(mAcceptance)); } } if (cfgEfficiency.value.empty() == false) { @@ -553,7 +553,7 @@ struct FlowCumulantsUpc { if (mEfficiency == nullptr) { LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency); + LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), static_cast(mEfficiency)); } correctionsLoaded = true; } @@ -672,7 +672,6 @@ struct FlowCumulantsUpc { // zdc time cut int neutronClass = -1; - bool xnxn = false, onon = false, xnon = false, onxn = false; float energyCommonZNA = collision.energyCommonZNA(), energyCommonZNC = collision.energyCommonZNC(); float timeZNA = collision.timeZNA(), timeZNC = collision.timeZNC(); if (std::isinf(energyCommonZNA)) @@ -686,34 +685,29 @@ struct FlowCumulantsUpc { registry.fill(HIST("ZDCEnergy"), energyCommonZNC, energyCommonZNA); registry.fill(HIST("ZDCTime"), timeZNC, timeZNA); if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { - onon = true; neutronClass = 0; registry.fill(HIST("neutronClass"), 0, 0); } if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { - xnon = true; neutronClass = 1; registry.fill(HIST("neutronClass"), 0, 1); } if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { - onxn = true; neutronClass = 2; registry.fill(HIST("neutronClass"), 1, 0); } if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { - xnxn = true; neutronClass = 3; registry.fill(HIST("neutronClass"), 1, 1); } if (cfgZdcTime) { // reject 0n0n and XnXn - if (neutronClass == 0 || neutronClass == 3) { + if (neutronClass == 0 || neutronClass == 3) { // o2-linter: disable=magic-number return; } // if A or C gap is requested, keep corresponding neutron class if (cfgGapSideA || cfgGapSideC) { - if ((cfgGapSideA && neutronClass == 1) || - (cfgGapSideC && neutronClass == 2)) { + if ((cfgGapSideA && neutronClass == 1) || (cfgGapSideC && neutronClass == 2)) { // o2-linter: disable=magic-number // accepted } else { return; @@ -836,8 +830,6 @@ struct FlowCumulantsUpc { registry.fill(HIST("hDCAxy"), track.dcaXY(), track.pt()); nTracksRaw += 1.; nTracksCorrected += weff; - } - if (withinPtRef) { fGFW->Fill(eta, fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 1); } if (withinPtPOI) { @@ -942,8 +934,6 @@ struct FlowCumulantsUpc { registry.fill(HIST("hEtaMC"), eta); registry.fill(HIST("hPtRefMC"), pt); nTracksCorrected += weff; - } - if (withinPtRef) { fGFWMC->Fill(eta, fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 1); } if (withinPtPOI) { From 5e770eabae48d2c38b7fbe4b7004ff901663ccf8 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Sat, 11 Jul 2026 20:28:27 +0800 Subject: [PATCH 4/6] o2 linter --- PWGUD/Tasks/flowCumulantsUpc.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index dc92412c181..e1513890707 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -702,12 +702,12 @@ struct FlowCumulantsUpc { } if (cfgZdcTime) { // reject 0n0n and XnXn - if (neutronClass == 0 || neutronClass == 3) { // o2-linter: disable=magic-number + if (neutronClass == 0 || neutronClass == 3) { // o2-linter: disable=magic-number (ZDC time cut) return; } // if A or C gap is requested, keep corresponding neutron class if (cfgGapSideA || cfgGapSideC) { - if ((cfgGapSideA && neutronClass == 1) || (cfgGapSideC && neutronClass == 2)) { // o2-linter: disable=magic-number + if ((cfgGapSideA && neutronClass == 1) || (cfgGapSideC && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut) // accepted } else { return; From dcf146a3baa60efb14e92294e8da2ee6b5da3138 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sat, 11 Jul 2026 12:29:07 +0000 Subject: [PATCH 5/6] Please consider the following formatting changes --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 PWGUD/Tasks/flowCorrelationsUpc.cxx diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx old mode 100755 new mode 100644 From ca26df3dd45c7deaff127eea708d20eb75199408 Mon Sep 17 00:00:00 2001 From: Luzhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Sat, 11 Jul 2026 20:40:44 +0800 Subject: [PATCH 6/6] add library for new dihadron container --- PWGUD/Tasks/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 0b4af02e173..7244f33fb0e 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -261,7 +261,7 @@ o2physics_add_dpl_workflow(flow-cumulants-upc o2physics_add_dpl_workflow(flow-correlations-upc SOURCES flowCorrelationsUpc.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore O2Physics::PWGCFCore + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore O2Physics::PWGCFCore O2Physics::TwoPartCorrCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(flow-mc-upc