From fc94fbc6219a38d68cf0c2a2e3134a378e8919d7 Mon Sep 17 00:00:00 2001 From: rabbit Date: Mon, 5 May 2025 00:35:26 +0800 Subject: [PATCH 1/5] add cuts --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 7b00062f453..bbecac47d15 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -225,6 +225,13 @@ struct FlowCorrelationsUpc { void processSame(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) { + if (nabs(collision.posZ()) > cfgZVtxCut) { + return; + } + if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { + return; + } + int gapSide = collision.gapSide(); if (gapSide < 0 || gapSide > 2) { return; From 29048b41ace54f62bb81d0e67ade212f498295f6 Mon Sep 17 00:00:00 2001 From: rabbit Date: Mon, 5 May 2025 00:38:51 +0800 Subject: [PATCH 2/5] nabs -> std::abs --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index bbecac47d15..90ca3d60fb1 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -225,7 +225,7 @@ struct FlowCorrelationsUpc { void processSame(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) { - if (nabs(collision.posZ()) > cfgZVtxCut) { + if (std::abs(collision.posZ()) > cfgZVtxCut) { return; } if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { From 7eafa615349909838f4ed001a02b9f434899aebc Mon Sep 17 00:00:00 2001 From: rabbit Date: Mon, 5 May 2025 00:42:10 +0800 Subject: [PATCH 3/5] linter --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 90ca3d60fb1..e7c25300372 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -225,12 +225,12 @@ struct FlowCorrelationsUpc { void processSame(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) { - if (std::abs(collision.posZ()) > cfgZVtxCut) { - return; - } - if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { - return; - } + if (std::abs(collision.posZ()) > cfgZVtxCut) { + return; + } + if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { + return; + } int gapSide = collision.gapSide(); if (gapSide < 0 || gapSide > 2) { From 9c6943247a65208fda242175a04d0d31146a9042 Mon Sep 17 00:00:00 2001 From: rabbit Date: Mon, 5 May 2025 00:50:34 +0800 Subject: [PATCH 4/5] linter --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index e7c25300372..003933ac85b 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -233,7 +233,8 @@ struct FlowCorrelationsUpc { } int gapSide = collision.gapSide(); - if (gapSide < 0 || gapSide > 2) { + // The gapSide are the selection criteria from the UPC from, not `magic number` + if (gapSide < 0 || gapSide > 2) { // o2-linter: disable=magic-number return; } From 48680db36eb2c69ccd651604c6c06f643adb1e99 Mon Sep 17 00:00:00 2001 From: rabbit Date: Mon, 5 May 2025 00:55:12 +0800 Subject: [PATCH 5/5] linter --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 003933ac85b..59aae4d6c86 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -233,8 +233,9 @@ struct FlowCorrelationsUpc { } int gapSide = collision.gapSide(); - // The gapSide are the selection criteria from the UPC from, not `magic number` - if (gapSide < 0 || gapSide > 2) { // o2-linter: disable=magic-number + const int minGapSide = 0; + const int maxGapSide = 2; + if (gapSide < minGapSide || gapSide > maxGapSide) { return; }