From 307fd194a2a2d80e27d4de81e22c7d8dfe6371c0 Mon Sep 17 00:00:00 2001 From: Evgeny Kryshen Date: Fri, 30 Oct 2026 09:15:57 +0300 Subject: [PATCH 1/3] code-checker fixes --- PWGUD/TableProducer/upcCandProducerBarrel.cxx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/PWGUD/TableProducer/upcCandProducerBarrel.cxx b/PWGUD/TableProducer/upcCandProducerBarrel.cxx index c6c439a0c14..744f417b9b6 100644 --- a/PWGUD/TableProducer/upcCandProducerBarrel.cxx +++ b/PWGUD/TableProducer/upcCandProducerBarrel.cxx @@ -40,9 +40,10 @@ #include #include -#include #include +#include + #include #include #include @@ -50,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -291,14 +293,15 @@ struct UpcCandProducerBarrel { float calcWeightForOccupancy(float dt) // copied from Common/Tools/EventSelectionModule.h { float wOccup = 0; - if (dt > -40 && dt < -5) // o2-linter: disable=magic-number (collisions in the past) + if (dt > -40 && dt < -5) { // o2-linter: disable=magic-number (collisions in the past) wOccup = 1. / 1225 * (dt + 40) * (dt + 40); // o2-linter: disable=magic-number (parabolic weight for past collisions) - else if (dt >= -5 && dt < 15) // o2-linter: disable=magic-number (collisions near a given one) + } else if (dt >= -5 && dt < 15) { // o2-linter: disable=magic-number (collisions near a given one) wOccup = 1; - else if (dt >= 15 && dt < 40) // o2-linter: disable=magic-number (collisions from the future) + } else if (dt >= 15 && dt < 40) { // o2-linter: disable=magic-number (collisions from the future) wOccup = -0.4 / 25 * dt + 1.24; // o2-linter: disable=magic-number (linear weight for future collisions) - else if (dt >= 40 && dt < 100) // o2-linter: disable=magic-number (collisions from the distant future) + } else if (dt >= 40 && dt < 100) { // o2-linter: disable=magic-number (collisions from the distant future) wOccup = -0.4 / 60 * dt + 0.6 + 0.8 / 3; // o2-linter: disable=magic-number (linear weight for distant future collisions) + } return wOccup; } @@ -595,8 +598,8 @@ struct UpcCandProducerBarrel { LOGP(debug, "Filling FDD activity arrays"); for (const auto& fdd : fdds) { - const float sumAmpFDDA = std::accumulate(fdd.chargeA(), fdd.chargeA() + 8, 0.f); - const float sumAmpFDDC = std::accumulate(fdd.chargeC(), fdd.chargeC() + 8, 0.f); + const float sumAmpFDDA = std::accumulate(std::begin(fdd.chargeA()), std::end(fdd.chargeA()), 0.f); + const float sumAmpFDDC = std::accumulate(std::begin(fdd.chargeC()), std::end(fdd.chargeC()), 0.f); if ((fdd.timeA() < MaxFITTime && sumAmpFDDA >= minAmpFDDA) || (fdd.timeC() < MaxFITTime && sumAmpFDDC >= minAmpFDDC)) { bcsWithFDD.push_back(fdd.bc_as().globalBC()); } @@ -694,23 +697,26 @@ struct UpcCandProducerBarrel { fillVetoHistograms(hVetoT00RCTnoPileupROFupc, hVetoTV0RCTnoPileupROFupc, hVetoTVDRCTnoPileupROFupc, bcInOrbit, tfID, distanceFT0, distanceFV0, distanceFDD); } - if (distanceFT0 == 0) + if (distanceFT0 == 0) { continue; + } float occupancy = vOccupancyFT0C[iTF][bcInTF]; hOccupancyT00RCTnoPileupROF->Fill(bcInOrbit, tfID, occupancy); if (upcMode) { hOccupancyT00RCTnoPileupROFupc->Fill(bcInOrbit, tfID, occupancy); } - if (distanceFV0 == 0) + if (distanceFV0 == 0) { continue; + } hOccupancyTV0RCTnoPileupROF->Fill(bcInOrbit, tfID, occupancy); if (upcMode) { hOccupancyTV0RCTnoPileupROFupc->Fill(bcInOrbit, tfID, occupancy); } - if (distanceFDD == 0) + if (distanceFDD == 0) { continue; + } hOccupancyTVDRCTnoPileupROF->Fill(bcInOrbit, tfID, occupancy); if (upcMode) { hOccupancyTVDRCTnoPileupROFupc->Fill(bcInOrbit, tfID, occupancy); From 7091746cec38196897ac3cc24d17e7d38a3fd065 Mon Sep 17 00:00:00 2001 From: Evgeny Kryshen Date: Fri, 30 Oct 2026 09:18:09 +0300 Subject: [PATCH 2/3] code-checker fixes 2 --- PWGUD/TableProducer/upcCandProducerBarrel.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGUD/TableProducer/upcCandProducerBarrel.cxx b/PWGUD/TableProducer/upcCandProducerBarrel.cxx index 744f417b9b6..c0c77999e89 100644 --- a/PWGUD/TableProducer/upcCandProducerBarrel.cxx +++ b/PWGUD/TableProducer/upcCandProducerBarrel.cxx @@ -40,9 +40,9 @@ #include #include -#include - #include +#include +#include #include #include From b6bba1efe45362b4917889bbebe2b1375a16eeff Mon Sep 17 00:00:00 2001 From: Evgeny Kryshen Date: Fri, 30 Oct 2026 09:19:44 +0300 Subject: [PATCH 3/3] code-checker fixes 3 --- PWGUD/TableProducer/upcCandProducerBarrel.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGUD/TableProducer/upcCandProducerBarrel.cxx b/PWGUD/TableProducer/upcCandProducerBarrel.cxx index c0c77999e89..63611498087 100644 --- a/PWGUD/TableProducer/upcCandProducerBarrel.cxx +++ b/PWGUD/TableProducer/upcCandProducerBarrel.cxx @@ -40,10 +40,11 @@ #include #include -#include #include #include +#include + #include #include #include