From 278fc87c1781317d69f911645bd7bba08a896bf8 Mon Sep 17 00:00:00 2001 From: m-rasa Date: Thu, 1 Oct 2026 17:27:16 +0200 Subject: [PATCH 1/8] Add deuteron in UPC task --- PWGUD/Tasks/CMakeLists.txt | 5 + PWGUD/Tasks/sgDeuteronSpectra.cxx | 167 ++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 PWGUD/Tasks/sgDeuteronSpectra.cxx diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 7244f33fb0e..d2b22f579d6 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -303,3 +303,8 @@ o2physics_add_dpl_workflow(pt-spectra-inclusive-upc SOURCES ptSpectraInclusiveUpc.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(sg-deuteron-spectra + SOURCES sgDeuteronSpectra.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx new file mode 100644 index 00000000000..a771281c04a --- /dev/null +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -0,0 +1,167 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// \Single Gap Event Analyzer for (anti)deuteron production +// \author Marika Rasa, marika.rasa@cern.ch +// \since September 2026 + +#include "PWGUD/Core/SGSelector.h" +#include "PWGUD/Core/SGTrackSelector.h" +#include "PWGUD/DataModel/UDTables.h" + +#include +#include +#include +#include +#include +#include +#include + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +struct SGDeuteronSpectra { + //UPC cuts + SGSelector sgSelector; + Configurable FV0_cut{"FV0", 50., "FV0A threshold"}; + Configurable ZDC_cut{"ZDC", 10., "ZDC threshold"}; + Configurable FT0A_cut{"FT0A", 150., "FT0A threshold"}; + Configurable FT0C_cut{"FT0C", 50., "FT0C threshold"}; + Configurable FDDA_cut{"FDDA", 10000., "FDDA threshold"}; + Configurable FDDC_cut{"FDDC", 10000., "FDDC threshold"}; + + //Track cuts + Configurable PV_cut{"PV_cut", 1.0, "Use Only PV tracks"}; + Configurable dcaZ_cut{"dcaZ_cut", 2.0, "dcaZ cut"}; + Configurable dcaXY_cut{"dcaXY_cut", 0.0, "dcaXY cut (0 for Pt-function)"}; + Configurable tpcChi2_cut{"tpcChi2_cut", 4, "Max tpcChi2NCl"}; + Configurable tpcNClsFindable_cut{"tpcNClsFindable_cut", 70, "Min tpcNClsFindable"}; + Configurable itsChi2_cut{"itsChi2_cut", 36, "Max itsChi2NCl"}; + Configurable eta_cut{"eta_cut", 0.9, "Track Pseudorapidity"}; + Configurable pt_cut{"pt_cut", 0.1, "Track Pt"}; + + //configurable axis for histograms + ConfigurableAxis ptAxis{"ptAxis", {200, 0.0, 10.0}, "p_{T}"}; + ConfigurableAxis nsigmaAxis{"nSigmaAxis", {800,-20.0,20.0}, "nSigma axis for TPC and TOF"}; + + // initialize histogram registry + HistogramRegistry registry{"registry",{}}; + + void init(InitContext&) + { + const AxisSpec axispt{ptAxis, "p_{T}"}; + const AxisSpec axistpc{nsigmaAxis, "n#sigma_{TPC}"}; + const AxisSpec axistof{nsigmaAxis, "n#sigma_{TOF}"}; + + // Collision histograms + registry.add("collisions/GapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{3, -0.5, 2.5}}}); + registry.add("collisions/TrueGapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{4, -1.5, 2.5}}}); + registry.add("tracks/Deut_Pt_TPC_GapA", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Deut_Pt_TOF_GapA", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Deut_Pt_TOF_GapA_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TPC_GapA", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Antideut_Pt_TOF_GapA", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TOF_GapA_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Deut_Pt_TPC_GapC", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Deut_Pt_TOF_GapC", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Deut_Pt_TOF_GapC_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TPC_GapC", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Antideut_Pt_TOF_GapC", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TOF_GapC_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Deut_Pt_TPC_DoubleGap", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Deut_Pt_TOF_DoubleGap", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TPC_DoubleGap", "", {HistType::kTH2F, {axispt, axistpc}}); + registry.add("tracks/Antideut_Pt_TOF_DoubleGap", "", {HistType::kTH2F, {axispt, axistof}}); + registry.add("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); + + } + + + // define data types + using UDCollisionsFull = soa::Join; // UDCollisions + using UDCollisionFull = UDCollisionsFull::iterator; + using UDTracksFull = soa::Join; + + void process(UDCollisionFull const& coll, UDTracksFull const& tracks) + { + + registry.fill(HIST("collisions/GapSide"), coll.gapSide(), 1.); + float FIT_cut[5] = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; + int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut); + registry.fill(HIST("collisions/TrueGapSide"), truegapSide, 1.); + + + std::vector parameters = {PV_cut, dcaZ_cut, dcaXY_cut, tpcChi2_cut, tpcNClsFindable_cut, itsChi2_cut, eta_cut, pt_cut}; + + for (const auto& t : tracks) { + if (trackselector(t, parameters)) { + if (truegapSide == 0) { + if (t.sign() > 0) { + registry.fill(HIST("tracks/Deut_Pt_TPC_GapA"), t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Deut_Pt_TOF_GapA"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Deut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + else { + registry.fill(HIST("tracks/Antideut_Pt_TPC_GapA"), t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + } + + if (truegapSide == 1) { + if (t.sign() > 0) { + registry.fill(HIST("tracks/Deut_Pt_TPC_GapC"), t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Deut_Pt_TOF_GapC"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Deut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + else { + registry.fill(HIST("tracks/Antideut_Pt_TPC_GapC"), t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + } + + if (truegapSide == 2) { + if (t.sign() > 0) { + registry.fill(HIST("tracks/Deut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + else { + registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"),t.pt(), t.tpcNSigmaDe()); + registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); + } + } + } + } + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc, TaskName{"sgdeuteronspectra"}), + }; +} From b1e234b4d97f7272396e6b84180cb4aa81ed33c3 Mon Sep 17 00:00:00 2001 From: m-rasa Date: Fri, 2 Oct 2026 17:28:59 +0200 Subject: [PATCH 2/8] Fix PR formatting issues --- PWGUD/Tasks/CMakeLists.txt | 2 +- PWGUD/Tasks/sgDeuteronSpectra.cxx | 40 +++++++++++++------------------ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index bd034bc15bf..85b021b606d 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -307,4 +307,4 @@ o2physics_add_dpl_workflow(pt-spectra-inclusive-upc o2physics_add_dpl_workflow(sg-deuteron-spectra SOURCES sgDeuteronSpectra.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore - COMPONENT_NAME Analysis) + COMPONENT_NAME Analysis) \ No newline at end of file diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index a771281c04a..824048822f7 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -30,7 +30,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; struct SGDeuteronSpectra { - //UPC cuts + // UPC cuts SGSelector sgSelector; Configurable FV0_cut{"FV0", 50., "FV0A threshold"}; Configurable ZDC_cut{"ZDC", 10., "ZDC threshold"}; @@ -39,7 +39,7 @@ struct SGDeuteronSpectra { Configurable FDDA_cut{"FDDA", 10000., "FDDA threshold"}; Configurable FDDC_cut{"FDDC", 10000., "FDDC threshold"}; - //Track cuts + // Track cuts Configurable PV_cut{"PV_cut", 1.0, "Use Only PV tracks"}; Configurable dcaZ_cut{"dcaZ_cut", 2.0, "dcaZ cut"}; Configurable dcaXY_cut{"dcaXY_cut", 0.0, "dcaXY cut (0 for Pt-function)"}; @@ -49,19 +49,19 @@ struct SGDeuteronSpectra { Configurable eta_cut{"eta_cut", 0.9, "Track Pseudorapidity"}; Configurable pt_cut{"pt_cut", 0.1, "Track Pt"}; - //configurable axis for histograms + // Configurable axis for histograms ConfigurableAxis ptAxis{"ptAxis", {200, 0.0, 10.0}, "p_{T}"}; - ConfigurableAxis nsigmaAxis{"nSigmaAxis", {800,-20.0,20.0}, "nSigma axis for TPC and TOF"}; + ConfigurableAxis nsigmaAxis{"nSigmaAxis", {800, -20.0, 20.0}, "nSigma axis for TPC and TOF"}; - // initialize histogram registry - HistogramRegistry registry{"registry",{}}; + // Initialize histogram registry + HistogramRegistry registry{"registry", {}}; void init(InitContext&) { const AxisSpec axispt{ptAxis, "p_{T}"}; const AxisSpec axistpc{nsigmaAxis, "n#sigma_{TPC}"}; const AxisSpec axistof{nsigmaAxis, "n#sigma_{TOF}"}; - + // Collision histograms registry.add("collisions/GapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{3, -0.5, 2.5}}}); registry.add("collisions/TrueGapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{4, -1.5, 2.5}}}); @@ -83,18 +83,15 @@ struct SGDeuteronSpectra { registry.add("tracks/Antideut_Pt_TPC_DoubleGap", "", {HistType::kTH2F, {axispt, axistpc}}); registry.add("tracks/Antideut_Pt_TOF_DoubleGap", "", {HistType::kTH2F, {axispt, axistof}}); registry.add("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}}); - - } - + } - // define data types + // Define data types using UDCollisionsFull = soa::Join; // UDCollisions using UDCollisionFull = UDCollisionsFull::iterator; using UDTracksFull = soa::Join; void process(UDCollisionFull const& coll, UDTracksFull const& tracks) { - registry.fill(HIST("collisions/GapSide"), coll.gapSide(), 1.); float FIT_cut[5] = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut); @@ -112,14 +109,13 @@ struct SGDeuteronSpectra { if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } - else { + } else { registry.fill(HIST("tracks/Antideut_Pt_TPC_GapA"), t.pt(), t.tpcNSigmaDe()); registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA"), t.pt(), t.tofNSigmaDe()); if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } + } } if (truegapSide == 1) { @@ -129,30 +125,28 @@ struct SGDeuteronSpectra { if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } - else { + } else { registry.fill(HIST("tracks/Antideut_Pt_TPC_GapC"), t.pt(), t.tpcNSigmaDe()); registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC"), t.pt(), t.tofNSigmaDe()); if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } + } } - + if (truegapSide == 2) { if (t.sign() > 0) { registry.fill(HIST("tracks/Deut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe()); registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe()); if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } - else { - registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"),t.pt(), t.tpcNSigmaDe()); + } else { + registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe()); registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe()); if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); } - } + } } } } From 6dc198fd781d85edd1a6f6e8c6f45c76bbc40d1b Mon Sep 17 00:00:00 2001 From: m-rasa Date: Sun, 4 Oct 2026 16:48:40 +0200 Subject: [PATCH 3/8] Further changes for clang/MegaLinter checks --- PWGUD/Tasks/CMakeLists.txt | 3 ++- PWGUD/Tasks/sgDeuteronSpectra.cxx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index 85b021b606d..baef6aa3361 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -307,4 +307,5 @@ o2physics_add_dpl_workflow(pt-spectra-inclusive-upc o2physics_add_dpl_workflow(sg-deuteron-spectra SOURCES sgDeuteronSpectra.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore - COMPONENT_NAME Analysis) \ No newline at end of file + COMPONENT_NAME Analysis) + \ No newline at end of file diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index 824048822f7..52532c2a0f5 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -25,6 +25,8 @@ #include #include +#include + using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; @@ -97,7 +99,6 @@ struct SGDeuteronSpectra { int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut); registry.fill(HIST("collisions/TrueGapSide"), truegapSide, 1.); - std::vector parameters = {PV_cut, dcaZ_cut, dcaXY_cut, tpcChi2_cut, tpcNClsFindable_cut, itsChi2_cut, eta_cut, pt_cut}; for (const auto& t : tracks) { @@ -138,7 +139,8 @@ struct SGDeuteronSpectra { if (t.sign() > 0) { registry.fill(HIST("tracks/Deut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe()); registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe()); - if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); + if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { + registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe()); } } else { registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe()); From 19685df73b42130bf469ab3f357bb9c5392b5aef Mon Sep 17 00:00:00 2001 From: m-rasa Date: Sun, 4 Oct 2026 17:02:18 +0200 Subject: [PATCH 4/8] Fix white spaces in CMakeList --- PWGUD/Tasks/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGUD/Tasks/CMakeLists.txt b/PWGUD/Tasks/CMakeLists.txt index baef6aa3361..55f69f53d26 100644 --- a/PWGUD/Tasks/CMakeLists.txt +++ b/PWGUD/Tasks/CMakeLists.txt @@ -308,4 +308,3 @@ o2physics_add_dpl_workflow(sg-deuteron-spectra SOURCES sgDeuteronSpectra.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) - \ No newline at end of file From 06d4d224d01c69df79b5a5d6fe0c55e18d727a88 Mon Sep 17 00:00:00 2001 From: m-rasa Date: Mon, 5 Oct 2026 09:40:39 +0200 Subject: [PATCH 5/8] Fixing compilation issues (missing headers and implicit declarations) --- PWGUD/Tasks/sgDeuteronSpectra.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index 52532c2a0f5..2c6e2641792 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -26,6 +26,7 @@ #include #include +#include using namespace o2; using namespace o2::framework; @@ -95,14 +96,14 @@ struct SGDeuteronSpectra { void process(UDCollisionFull const& coll, UDTracksFull const& tracks) { registry.fill(HIST("collisions/GapSide"), coll.gapSide(), 1.); - float FIT_cut[5] = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; + std::vector FIT_cut = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut); registry.fill(HIST("collisions/TrueGapSide"), truegapSide, 1.); std::vector parameters = {PV_cut, dcaZ_cut, dcaXY_cut, tpcChi2_cut, tpcNClsFindable_cut, itsChi2_cut, eta_cut, pt_cut}; for (const auto& t : tracks) { - if (trackselector(t, parameters)) { + if (trackselector(t, parameters) != 0) { if (truegapSide == 0) { if (t.sign() > 0) { registry.fill(HIST("tracks/Deut_Pt_TPC_GapA"), t.pt(), t.tpcNSigmaDe()); From d2498441b22c734868e1e989c3880994d45b92e9 Mon Sep 17 00:00:00 2001 From: m-rasa Date: Mon, 5 Oct 2026 09:47:22 +0200 Subject: [PATCH 6/8] Fix PR formatting issues - clang format --- PWGUD/Tasks/sgDeuteronSpectra.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index 2c6e2641792..e6f48a3ab18 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -96,7 +96,7 @@ struct SGDeuteronSpectra { void process(UDCollisionFull const& coll, UDTracksFull const& tracks) { registry.fill(HIST("collisions/GapSide"), coll.gapSide(), 1.); - std::vector FIT_cut = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; + std::vector FIT_cut = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut}; int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut); registry.fill(HIST("collisions/TrueGapSide"), truegapSide, 1.); From 1084e05d7bb930869dc89ec9e5bc07e5e323084c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 5 Oct 2026 07:48:34 +0000 Subject: [PATCH 7/8] Please consider the following formatting changes --- PWGUD/Tasks/sgDeuteronSpectra.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index e6f48a3ab18..7bfc6cbb1dc 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -25,9 +25,10 @@ #include #include -#include #include +#include + using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; From 12421b492b66d6e41071b7866dcbc403ee55f865 Mon Sep 17 00:00:00 2001 From: m-rasa Date: Mon, 5 Oct 2026 16:02:31 +0200 Subject: [PATCH 8/8] Fixing wrong header --- PWGUD/Tasks/sgDeuteronSpectra.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGUD/Tasks/sgDeuteronSpectra.cxx b/PWGUD/Tasks/sgDeuteronSpectra.cxx index 7bfc6cbb1dc..b0762560dc3 100644 --- a/PWGUD/Tasks/sgDeuteronSpectra.cxx +++ b/PWGUD/Tasks/sgDeuteronSpectra.cxx @@ -25,7 +25,7 @@ #include #include -#include +#include #include