From 640bda62fb1870245f2dc6e80e5fda86ab3ce0a1 Mon Sep 17 00:00:00 2001 From: gianniliveraro Date: Tue, 31 Mar 2026 06:25:25 -0300 Subject: [PATCH 1/8] Small fix in histo declaration + including missing header --- .../Strangeness/sigma0builder.cxx | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index bad2b681d13..67f71342ec2 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -57,6 +57,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; @@ -471,15 +472,17 @@ struct sigma0builder { histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR"); histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPC NSigma"); - histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisCandSel}); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(1, "No Sel"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(2, "Definition"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(3, "MinCell"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(4, "Energy"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(5, "Eta"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(6, "Time"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(7, "Exotic"); - histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(8, "Shape"); + if (doprocessPCMVsEMCalQA){ + histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisCandSel}); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(1, "No Sel"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(2, "Definition"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(3, "MinCell"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(4, "Energy"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(5, "Eta"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(6, "Time"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(7, "Exotic"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(8, "Shape"); + } } else { for (const auto& histodir : DirList2) { @@ -491,6 +494,16 @@ struct sigma0builder { histos.add(histodir + "/hExotic", "hExotic", kTH1D, {{2, -0.5f, 1.5f}}); histos.add(histodir + "/h2dShape", "h2dShape", kTH2D, {axisPt, axisClrShape}); } + + histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisCandSel}); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(1, "No Sel"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(2, "Definition"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(3, "MinCell"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(4, "Energy"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(5, "Eta"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(6, "Time"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(7, "Exotic"); + histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(8, "Shape"); } histos.add("LambdaSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisCandSel}); @@ -2773,9 +2786,7 @@ struct sigma0builder { } } } - } - - LOGF(info, "N. photons: %i, N. lambdas: %i, expected pairs: %i, got: %i", bestGammasArray.size(), bestLambdasArray.size(), bestGammasArray.size() * bestLambdasArray.size(), nSigma0Candidates); + } } } From 0497c619e84cb963cd6d8d9a9a54fb6191d30fd3 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 31 Mar 2026 09:31:17 +0000 Subject: [PATCH 2/8] Please consider the following formatting changes --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 67f71342ec2..87170d35a97 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -56,8 +56,8 @@ #include #include #include -#include #include +#include using namespace o2; using namespace o2::framework; @@ -472,7 +472,7 @@ struct sigma0builder { histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR"); histos.get(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPC NSigma"); - if (doprocessPCMVsEMCalQA){ + if (doprocessPCMVsEMCalQA) { histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisCandSel}); histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(1, "No Sel"); histos.get(HIST("EMCalPhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(2, "Definition"); @@ -2786,7 +2786,7 @@ struct sigma0builder { } } } - } + } } } From cf020647e5bfe81337354e5c4ba8606517746158 Mon Sep 17 00:00:00 2001 From: gianniliveraro Date: Wed, 1 Apr 2026 11:31:01 -0300 Subject: [PATCH 3/8] Dummy commit --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 87170d35a97..b4be21dee75 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -3199,3 +3199,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } + From 0d8516b75078c4a786a0da1e78fa601cf55c4d11 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 1 Apr 2026 14:31:47 +0000 Subject: [PATCH 4/8] Please consider the following formatting changes --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index b4be21dee75..87170d35a97 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -3199,4 +3199,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } - From 71390e5cccef5ba173ae10b87fc3cc75e85a3650 Mon Sep 17 00:00:00 2001 From: gianniliveraro Date: Wed, 1 Apr 2026 13:20:22 -0300 Subject: [PATCH 5/8] Fixing some O2-linter errors --- .../Strangeness/sigma0builder.cxx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 87170d35a97..a949c029793 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -45,10 +45,8 @@ #include "Math/Vector3D.h" #include -#include #include #include -#include #include #include @@ -875,8 +873,9 @@ struct sigma0builder { // Calculate properties and fill struct info.DCADau = (cross.Mag2() > 0) ? std::abs(posdiff.Dot(cross)) / cross.R() : 999.f; info.CosPA = v01momentumNorm.Dot(v02momentumNorm); - - if (d < 1e-5f) { // Parallel or nearly parallel lines + + float Min_threshold = 1e-5f; // Threshold to consider lines as parallel, can be tuned + if (d < Min_threshold) { // Parallel or nearly parallel lines info.X = info.Y = info.Z = 0.f; // should we use another dummy value? Perhaps 999.f? return info; } @@ -1540,7 +1539,7 @@ struct sigma0builder { auto v0MC = v0.template v0MCCore_as>(); - float V0MCpT = RecoDecay::pt(array{v0MC.pxMC(), v0MC.pyMC()}); + float V0MCpT = RecoDecay::pt(std::array{v0MC.pxMC(), v0MC.pyMC()}); float V0PA = TMath::ACos(v0.v0cosPA()); bool fIsV0CorrectlyAssigned = (v0MC.straMCCollisionId() == v0MCCollision.globalIndex()); bool isPrimary = v0MC.isPhysicalPrimary(); @@ -1604,7 +1603,7 @@ struct sigma0builder { histos.fill(HIST("GenQA/h2dSigma0MCSourceVsPDGMother"), GenInfo.IsProducedByGenerator, GenInfo.PDGCodeMother); // Checking decay modes and getting daughter pTs - for (auto& daughter : daughters) { + for (auto const& daughter : daughters) { histos.fill(HIST("GenQA/h2dSigma0NDaughtersVsPDG"), daughters.size(), daughter.pdgCode()); if (GenInfo.NDaughters == 2) { @@ -1619,13 +1618,13 @@ struct sigma0builder { if ((GenInfo.IsKStar) && genSelections.doQA) { histos.fill(HIST("GenQA/h2dKStarMCSourceVsPDGMother"), GenInfo.IsProducedByGenerator, GenInfo.PDGCodeMother); - for (auto& daughter : daughters) // checking decay modes + for (auto const& daughter : daughters) // checking decay modes histos.fill(HIST("GenQA/h2dKStarNDaughtersVsPDG"), daughters.size(), daughter.pdgCode()); } if (GenInfo.IsPi0 && genSelections.doQA) { histos.fill(HIST("GenQA/h2dPi0MCSourceVsPDGMother"), GenInfo.IsProducedByGenerator, GenInfo.PDGCodeMother); - for (auto& daughter : daughters) // checking decay modes + for (auto const& daughter : daughters) // checking decay modes histos.fill(HIST("GenQA/h2dPi0NDaughtersVsPDG"), daughters.size(), daughter.pdgCode()); } } @@ -1735,7 +1734,7 @@ struct sigma0builder { template void genProcess(TMCParticles const& mcParticles) { - for (auto& mcParticle : mcParticles) { + for (auto const& mcParticle : mcParticles) { // Rapidity selection if ((mcParticle.y() < genSelections.mc_rapidityMin) || (mcParticle.y() > genSelections.mc_rapidityMax)) continue; @@ -1791,7 +1790,7 @@ struct sigma0builder { static constexpr std::string_view MainDir2[] = {"EMCalPhotonBeforeSel", "EMCalPhotonSel"}; // calculate pT for cluster assuming they are photons (so no mass) - float gammapT = sqrt(cluster.energy() * cluster.energy()) / std::cosh(cluster.eta()); + float gammapT = std::sqrt(cluster.energy() * cluster.energy()) / std::cosh(cluster.eta()); histos.fill(HIST(MainDir2[mode]) + HIST("/hDefinition"), cluster.definition()); histos.fill(HIST(MainDir2[mode]) + HIST("/h2dNCells"), gammapT, cluster.nCells()); @@ -2401,7 +2400,7 @@ struct sigma0builder { bool buildEMCalSigma0(TV0Object const& lambda, TEMCalClsObject const& gamma, TCollision const& collision, TMCParticles const& mcparticles, std::vector const& emcaltracksmatched) { // calculate pT for cluster assuming they are photons (so no mass) - float gammapT = sqrt(gamma.energy() * gamma.energy()) / std::cosh(gamma.eta()); + float gammapT = std::sqrt(gamma.energy() * gamma.energy()) / std::cosh(gamma.eta()); // Momentum components float gammapx = gammapT * std::cos(gamma.phi()); From 6b95e3567907e24115bcfa4c6dbc48ec6d9ad813 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 1 Apr 2026 16:23:19 +0000 Subject: [PATCH 6/8] Please consider the following formatting changes --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index a949c029793..ce0b483390e 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -873,9 +873,9 @@ struct sigma0builder { // Calculate properties and fill struct info.DCADau = (cross.Mag2() > 0) ? std::abs(posdiff.Dot(cross)) / cross.R() : 999.f; info.CosPA = v01momentumNorm.Dot(v02momentumNorm); - - float Min_threshold = 1e-5f; // Threshold to consider lines as parallel, can be tuned - if (d < Min_threshold) { // Parallel or nearly parallel lines + + float Min_threshold = 1e-5f; // Threshold to consider lines as parallel, can be tuned + if (d < Min_threshold) { // Parallel or nearly parallel lines info.X = info.Y = info.Z = 0.f; // should we use another dummy value? Perhaps 999.f? return info; } From b5543d7e3f40fa4f9a7c14751b1b01b41f0b62ab Mon Sep 17 00:00:00 2001 From: gianniliveraro Date: Wed, 1 Apr 2026 14:10:38 -0300 Subject: [PATCH 7/8] Removing unused variable --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index ce0b483390e..e46c4c987a1 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -2731,8 +2731,7 @@ struct sigma0builder { } //_______________________________________________ - // Photon-V0 nested loop - int nSigma0Candidates = 0; + // Photon-V0 nested loop for (size_t i = 0; i < bestGammasArray.size(); ++i) { //_______________________________________________ @@ -2750,9 +2749,7 @@ struct sigma0builder { auto gamma1 = fullV0s.rawIteratorAt(bestGammasArray[i]); if (!buildPCMSigma0(lambda, gamma1, coll, mcparticles)) continue; - } - - nSigma0Candidates++; + } } } From 0d3dc2ee2f3b9a6ff1a0a69d763647d922a82533 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 1 Apr 2026 17:18:32 +0000 Subject: [PATCH 8/8] Please consider the following formatting changes --- PWGLF/TableProducer/Strangeness/sigma0builder.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index e46c4c987a1..339088a311c 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -2731,7 +2731,7 @@ struct sigma0builder { } //_______________________________________________ - // Photon-V0 nested loop + // Photon-V0 nested loop for (size_t i = 0; i < bestGammasArray.size(); ++i) { //_______________________________________________ @@ -2749,7 +2749,7 @@ struct sigma0builder { auto gamma1 = fullV0s.rawIteratorAt(bestGammasArray[i]); if (!buildPCMSigma0(lambda, gamma1, coll, mcparticles)) continue; - } + } } }