Skip to content

[PWGCF] TwoParticleCorrelationsMultSpher - #18137

Open
matarzil wants to merge 6 commits into
AliceO2Group:masterfrom
matarzil:my/eventshape-analysis
Open

matarzil wants to merge 6 commits into
AliceO2Group:masterfrom
matarzil:my/eventshape-analysis

Conversation

@matarzil

@matarzil matarzil commented Oct 1, 2026

Copy link
Copy Markdown

This is the first commit of this task. It adds the two-particle angular correlation (Δφ, Δη) analysis in pp collisions at 13 TeV, structured in parallel with the AliRoot AliMESppColTask analysis, to PWGCF/TwoParticleCorrelations.

Adds an analysis task (o2-analysis-cf-two-particle-correlations-mult-spher) that fills same-event and mixed-event Δφ-Δη correlation histograms (THnSparse for the full multi-dimensional binning, plus direct TH2D SE/ME pairs for both per-trigger and per-pair normalisation), differential in multiplicity class and transverse sphericity class, at both MC generator level and reconstructed level. Some selection variants are kept togglable via Configurables for methodology cross-checks.

correlation (Δφ, Δη) analysis in pp collisions at 13 TeV, structured in
parallel with the AliRoot AliMESppColTask analysis, to
PWGCF/TwoParticleCorrelations.

Adds an analysis task (o2-analysis-cf-two-particle-correlations-mult-spher)
that fills same-event and mixed-event Δφ-Δη correlation histograms
(THnSparse for the full multi-dimensional binning, plus direct TH2D
SE/ME pairs for both per-trigger and per-pair normalisation), differential
in multiplicity class and transverse sphericity class, at both MC generator level and
reconstructed level. Some selection variants are kept togglable via
Configurables for methodology cross-checks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YbYBgosEJaDJTkCuqAtNHk
@github-actions github-actions Bot added the pwgcf label Oct 1, 2026
@github-actions github-actions Bot changed the title TwoParticleCorrelationsMultSpher [PWGCF] TwoParticleCorrelationsMultSpher Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 107 warnings, 🔕 0 disabled

matarzil and others added 2 commits October 1, 2026 15:54
Applies clang-format (project style) and converts C-style casts to
static_cast, as flagged by the cpplint check in CI. No behavior change:
rebuilt and re-ran the single-file smoke test, same histogram counts as
before. Also adds the <memory> include cpplint pointed out for
shared_ptr<>.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YbYBgosEJaDJTkCuqAtNHk
Framework/*.h headers must use angle brackets (<...>), not quotes,
per the O2Physics include-style convention (Scripts/format_includes.awk)
enforced by the PR formatting / clang-format CI check. Re-ran
clang-format after the change; rebuilt and re-ran the single-file
smoke test, same result as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YbYBgosEJaDJTkCuqAtNHk
@matarzil
matarzil marked this pull request as ready for review October 1, 2026 17:48
@matarzil

matarzil commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

Hi @jaelpark @wenyaCern @lauraser @dsarkaralice @victor-gonzalez , this PR adds a new two-particle angular correlation analysis task (Δφ-Δη, differential in multiplicity and transverse sphericity) to PWGCF/TwoParticleCorrelations, and adds the corresponding workflow block to PWGCF/TwoParticleCorrelations/Tasks/CMakeLists.txt, which needs a PWGCF
code-owner approval. All checks pass except MegaLinter (cppcheck style suggestions only — const-reference parameters, two unused struct members; happy to address them if you'd like, just didn't want to hold up the review
for non-blocking style notes). Could one of you please take a look when you have a moment? Thank you very much!

matarzil and others added 2 commits October 7, 2026 12:31
resolution.

The web-based merge-conflict editor used to resolve the upstream/master
merge dropped the "COMPONENT_NAME Analysis)" line closing the
two-particle-correlations-mult-spher workflow block, running it into the
next block (hparticle-correlation) and breaking CMake configuration.
Verified: CMake reconfigure, incremental rebuild, and single-file smoke
test all clean after the fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YbYBgosEJaDJTkCuqAtNHk
lauraser
lauraser previously approved these changes Oct 7, 2026
@lauraser
lauraser enabled auto-merge (squash) October 7, 2026 12:46
@alibuild

alibuild commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 4b4b132 at 2026-10-07 14:47:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 43 errors and 122 warnings.'
Found 43 errors and 122 warnings.
++ [[ 43 -gt 0 ]]
++ cat /sw/BUILD/c43907da4e9e33b904e9ec6af7eb681d1859638c/O2Physics-code-check/errors.txt
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:72:25: error: unused variable 'kSphMin' [clang-diagnostic-unused-const-variable,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:73:25: error: unused variable 'kSphMax' [clang-diagnostic-unused-const-variable,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:83:3: error: no header providing "o2::framework::Configurable" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:203:3: error: no header providing "o2::framework::HistogramRegistry" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:203:42: error: no header providing "o2::framework::OutputObjHandlingPolicy" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:507:17: error: no header providing "std::clamp" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:527:13: error: no header providing "o2::framework::InitContext" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:529:11: error: no header providing "o2::framework::AxisSpec" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:559:98: error: parameter 'hPt_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:559:98: error: unused parameter 'hPt_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:560:98: error: parameter 'hPtLead_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:560:98: error: unused parameter 'hPtLead_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:561:98: error: parameter 'hPtAssoc_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:561:98: error: unused parameter 'hPtAssoc_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:562:73: error: parameter 'hSph_vs_mult_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:562:73: error: unused parameter 'hSph_vs_mult_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:563:73: error: parameter 'hMult_vs_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:563:73: error: unused parameter 'hMult_vs_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:564:73: error: parameter 'hSphTrack_vs_mult_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:564:73: error: unused parameter 'hSphTrack_vs_mult_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:565:73: error: parameter 'hMultTrack_vs_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:565:73: error: unused parameter 'hMultTrack_vs_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:566:73: error: parameter 'hSphLead_vs_mult_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:566:73: error: unused parameter 'hSphLead_vs_mult_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:567:73: error: parameter 'hMultLead_vs_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:567:73: error: unused parameter 'hMultLead_vs_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:568:73: error: parameter 'hMultReal_vs_sph_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:568:73: error: unused parameter 'hMultReal_vs_sph_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:569:50: error: parameter 'hMultReal_vs_pid_' is unused [misc-unused-parameters,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:569:50: error: unused parameter 'hMultReal_vs_pid_' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:572:92: error: no header providing "o2::framework::HistType" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:582:90: error: no header providing "o2::framework::kTH1D" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:839:23: error: no header providing "o2::aod::McCollision" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:840:23: error: no header providing "o2::aod::McParticles" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:842:17: error: no header providing "HIST" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:854:54: error: variable 'yLead' set but not used [clang-diagnostic-unused-but-set-variable,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:893:9: error: Value stored to 'yLead' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1176:3: error: no header providing "PROCESS_SWITCH" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1181:34: error: no header providing "o2::aod::Collisions" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1182:36: error: no header providing "o2::aod::TracksIU" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1204:54: error: variable 'yLead' set but not used [clang-diagnostic-unused-but-set-variable,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1268:9: error: Value stored to 'yLead' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@alibuild

alibuild commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 4b4b132 at 2026-10-07 14:51:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:559:98: error: unused parameter 'hPt_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:560:98: error: unused parameter 'hPtLead_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:561:98: error: unused parameter 'hPtAssoc_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:562:73: error: unused parameter 'hSph_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:563:73: error: unused parameter 'hMult_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:564:73: error: unused parameter 'hSphTrack_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:565:73: error: unused parameter 'hMultTrack_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:566:73: error: unused parameter 'hSphLead_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:567:73: error: unused parameter 'hMultLead_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:568:73: error: unused parameter 'hMultReal_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:569:50: error: unused parameter 'hMultReal_vs_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:854:54: error: variable 'yLead' set but not used [-Werror=unused-but-set-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1204:54: error: variable 'yLead' set but not used [-Werror=unused-but-set-variable]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 4b4b132 at 2026-10-07 15:01:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:559:98: error: unused parameter 'hPt_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:560:98: error: unused parameter 'hPtLead_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:561:98: error: unused parameter 'hPtAssoc_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:562:73: error: unused parameter 'hSph_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:563:73: error: unused parameter 'hMult_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:564:73: error: unused parameter 'hSphTrack_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:565:73: error: unused parameter 'hMultTrack_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:566:73: error: unused parameter 'hSphLead_vs_mult_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:567:73: error: unused parameter 'hMultLead_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:568:73: error: unused parameter 'hMultReal_vs_sph_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:569:50: error: unused parameter 'hMultReal_vs_pid_' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:854:54: error: variable 'yLead' set but not used [-Werror=unused-but-set-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMultSpher.cxx:1204:54: error: variable 'yLead' set but not used [-Werror=unused-but-set-variable]
ninja: build stopped: subcommand failed.

Full log here.

…orrectness

Removes the dead kSphMin constant and yLead variable, adds
[[maybe_unused]] to the struct members and bookChannel lambda
parameters that are only referenced inside the disabled
histogram-budget blocks, and adds const to those same lambda
parameters per cppcheck's constParameterReference suggestion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YbYBgosEJaDJTkCuqAtNHk
auto-merge was automatically disabled October 7, 2026 13:53

Head branch was pushed to by a user without write access

@lauraser
lauraser enabled auto-merge (squash) October 7, 2026 14:36

@vkucera vkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @matarzil , since you are adding a new file, I strongly recommend to fix all reported errors and warnings, otherwise they will keep popping up in all future PRs.
Formatting the includes is mandatory because it's part of the required formatting check.

#include <Framework/OutputObjHeader.h>
#include <Framework/runDataProcessing.h>

// Reco headers — compiled but used only by processReco (switched off for now)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not insert comments between includes. It prevents the automatic sorting done by the formatting check.

Comment on lines +862 to +864
auto* pdgPtr = TDatabasePDG::Instance()->GetParticle(p.pdgCode());
if (!pdgPtr || std::fabs(pdgPtr->Charge()) < 0.1)
continue;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the PDG database plugin instead, as advised by the O2 linter.

Comment on lines +949 to +953
#if 0
// Helper: maps PidSpecies (0=unid,1=pion,2=kaon,3=proton)
// to pidStudy index (0=all,1=pion,2=kaon,3=proton)
// All tracks fill index 0 ("all") always, plus their specific PID
auto fillPtStudy = [&](std::array<std::array<std::shared_ptr<TH2>, nPidStudy>, nSphClasses>& arr,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this dead code needed?

Comment on lines +1052 to +1054
#if 0
fillPtStudy(hPtAssoc_sph_pid_MC, sphCls, mBin, static_cast<double>(assoc.pt), pidAssoc);
#endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Comment on lines +479 to +489
static double computeDeltaPhi(double phi1, double phi2)
{
double dphi = phi1 - phi2;
while (dphi <= -TMath::Pi())
dphi += 2. * TMath::Pi();
while (dphi > TMath::Pi())
dphi -= 2. * TMath::Pi();
if (dphi <= -0.5 * TMath::Pi())
dphi += 2. * TMath::Pi();
return dphi;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not reinvent the wheel and use existing utilities from RecoDecay.

Comment on lines +447 to +477
static int zvtxBin(double z)
{
if (z >= -10. && z < -5.)
return 0;
if (z >= -5. && z < -2.5)
return 1;
if (z >= -2.5 && z < 2.5)
return 2;
if (z >= 2.5 && z < 5.)
return 3;
if (z >= 5. && z <= 10.)
return 4;
return -1;
}

static int multBin(int n)
{
if (n >= 1 && n <= 9)
return 0;
if (n >= 10 && n <= 14)
return 1;
if (n >= 15 && n <= 19)
return 2;
if (n >= 20 && n <= 29)
return 3;
if (n >= 30 && n <= 45)
return 4;
if (n >= 46 && n <= 80)
return 5;
return -1;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coding magic numbers is very bug-prone and hard to maintain. Consider using an array and a utility search function (look for findBin in the repository).


// ---- one-pass: build selTracks + find leading ---------------
std::vector<TrackSimple> selTracks;
selTracks.reserve(64);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does 64 mean?

@vkucera
vkucera disabled auto-merge October 7, 2026 14:51
@alibuild

alibuild commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for afc6a46 at 2026-10-07 16:59:

No log files found

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants