From d829b949e1883f8c3049593fb59bee80d629ade0 Mon Sep 17 00:00:00 2001 From: miedema-11 <1260971129@qq.com> Date: Wed, 30 Sep 2026 10:51:48 +0800 Subject: [PATCH] fix zdc gapside selection --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 33 +++++++++-------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index d708c17e5ae..a1dae010e98 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -78,7 +78,6 @@ struct FlowCorrelationsUpc { 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") O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum number of crossed TPC Rows") 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") @@ -122,11 +121,7 @@ struct FlowCorrelationsUpc { // make the filters and cuts. Filter trackFilter = (aod::udtrack::isPVContributor == true); - Filter collisionFilter = cfgGapSideMerge - ? ((aod::udcollision::gapSide == (uint8_t)0 || aod::udcollision::gapSide == (uint8_t)1) && - (aod::upcservice::truegapside == 0 || aod::upcservice::truegapside == 1)) - : ((aod::udcollision::gapSide == (uint8_t)cfgGapSide) && - (aod::upcservice::truegapside == cfgGapSide)); + Filter collisionFilter = ((aod::udcollision::gapSide == (uint8_t)cfgGapSide) && (aod::upcservice::truegapside == cfgGapSide)); // Connect to ccdb Service ccdb{}; @@ -264,13 +259,13 @@ struct FlowCorrelationsUpc { registry.fill(HIST("neutronClass"), 0, 0); } if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { - neutronClass = 1; - registry.fill(HIST("neutronClass"), 0, 1); - } - if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { neutronClass = 2; registry.fill(HIST("neutronClass"), 1, 0); } + if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { + neutronClass = 1; + registry.fill(HIST("neutronClass"), 0, 1); + } if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { neutronClass = 3; registry.fill(HIST("neutronClass"), 1, 1); @@ -281,15 +276,11 @@ struct FlowCorrelationsUpc { return false; } // if A or C gap is requested, keep corresponding neutron class - if (cfgGapSideMerge) { - // accepted - } else { - if (cfgGapSide == 0 || cfgGapSide == 1) { - if ((cfgGapSide == 0 && neutronClass == 1) || (cfgGapSide == 1 && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut) - // accepted - } else { - return false; - } + if (cfgGapSide == 0 || cfgGapSide == 1) { + if ((cfgGapSide == 0 && neutronClass == 1) || (cfgGapSide == 1 && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut) + // accepted + } else { + return false; } } } @@ -332,10 +323,6 @@ struct FlowCorrelationsUpc { return false; } - if (!zdcTimeCut(collision)) { - return false; - } - return true; }