Skip to content

[PWGLF] Add a workflow for (anti)triton analysis#17151

Open
AnalitikGnid wants to merge 5 commits into
AliceO2Group:masterfrom
AnalitikGnid:pwglf-antitriton
Open

[PWGLF] Add a workflow for (anti)triton analysis#17151
AnalitikGnid wants to merge 5 commits into
AliceO2Group:masterfrom
AnalitikGnid:pwglf-antitriton

Conversation

@AnalitikGnid

Copy link
Copy Markdown
Contributor

Summary

Adds a new workflow for measuring (anti)triton production in Run 3 data

Dependencies

Uses output of the o2-analysis-cf-single-track-selector (https://aliceo2group.github.io/analysis-framework/docs/datamodel/pwgTables.html)

Links

Presented at the Nuclei and Exotica PAG meeting on Thursday, 16th July, 2026 (https://indico.cern.ch/event/1688019/)

@github-actions github-actions Bot added the pwglf label Jul 21, 2026
@github-actions github-actions Bot changed the title Add a workflow for (anti)triton analysis [PWGLF] Add a workflow for (anti)triton analysis Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 3da74bd at 2026-07-21 14:55:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:347:9: error: unused variable 'cnt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:245:65: error: unused parameter 'pdg' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for bc69f0c at 2026-07-21 16:49:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 29 errors and 28 warnings.'
Found 29 errors and 28 warnings.
++ [[ 29 -gt 0 ]]
++ cat /sw/BUILD/41268eafeda58e4074914082e92524b220edd01b/O2Physics-code-check/errors.txt
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:20:1: error: included header Multiplicity.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:25:1: error: included header DataTypes.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:28:1: error: included header StaticFor.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:30:1: error: included header Utils.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:32:1: error: included header TH1F.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:33:1: error: included header TParameter.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:48:46: error: no header providing "o2::framework::OutputObjHandlingPolicy" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:51:3: error: no header providing "o2::framework::Configurable" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:68:16: error: no header providing "int16_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:106:21: error: no header providing "TH1" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:107:21: error: no header providing "TH2" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:127:21: error: no header providing "TH3" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:132:34: error: member 'stageDirs' of type 'const std::vector<std::string>' (aka 'const vector<basic_string<char>>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:146:36: error: member 'signDirs' of type 'const std::array<std::string, 2>' (aka 'const array<basic_string<char>, 2>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:155:71: error: no header providing "o2::framework::kTH1F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:157:78: error: no header providing "o2::framework::kTH2F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:158:94: error: no header providing "M_PI" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:175:7: error: no header providing "o2::framework::kTH3F" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:192:42: error: no header providing "Form" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:208:29: error: no header providing "std::sqrt" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:217:24: error: no header providing "std::log" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:274:28: error: no header providing "o2::framework::InitContext" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:278:16: error: no header providing "o2::aod::ITSResponse" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:284:13: error: narrowing conversion from 'value_type' (aka 'float') to 'int' [bugprone-narrowing-conversions,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:289:21: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:299:10: error: no header providing "size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:307:11: error: no header providing "o2::framework::AxisSpec" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:312:52: error: no header providing "o2::framework::kTH2I" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:433:3: error: no header providing "PROCESS_SWITCH" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 28 -gt 0 ]]
++ cat /sw/BUILD/41268eafeda58e4074914082e92524b220edd01b/O2Physics-code-check/warnings.txt
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:251:25: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:277:20: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:323:69: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:325:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:327:62: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:329:73: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:331:86: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:333:72: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:335:102: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:337:106: warning: statement should be inside braces [readability-braces-around-statements]
PWGLF/Tasks/Nuspex/antitritonAnalysis.cxx:339:114: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@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.

Since you are adding a new file, make sure it's clean from errors and warnings.

Configurable<float> maxTpcFractionSharedCls{"maxTpcFractionSharedCls", 0.4, "maximum fraction of TPC shared clasters"};
Configurable<int> minItsNCls{"minItsNCls", 0, "minimum allowed number of ITS clasters for a track"};
Configurable<float> itsChi2NCl{"itsChi2NCl", 100.0, "upper limit for chi2 value of a fit over ITS clasters for a track"};
Configurable<int> particlePDG{"particlePDG", 1000010030, "PDG code of a particle to perform PID for (only pion, kaon, proton and deurton are supported 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.

Use the named constant.

Configurable<std::vector<float>> tofNSigma{"tofNSigma", std::vector<float>{-4.0f, 4.0f}, "Nsigma range in TOF"};
Configurable<std::vector<float>> tpcNSigmaResidual{"tpcNSigmaResidual", std::vector<float>{-5.0f, 5.0f}, "residual TPC Nsigma cut to use with the TOF"};

Configurable<std::vector<int>> particlePDGtoReject{"particlePDGtoReject", std::vector<int>{2212}, "PDG codes of perticles that will be rejected with TPC"};

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.

Use the named constant.

std::pair<int, std::vector<float>> TPCcuts;
std::pair<int, std::vector<float>> TOFcuts;

static constexpr float kMassTriton = 2.808921f; // GeV/c^2

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.

Use the named constant.

Comment on lines +211 to +218
template <typename TrackType>
static float getY(const TrackType& track, float mass)
{
const float pTr = track.p();
const float pzTr = track.pz();
const float ETr = std::sqrt(pTr * pTr + mass * mass);
return 0.5f * std::log((ETr + pzTr) / (ETr - pzTr));
}

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.

Don't reinvent the wheel. There are RecoDecay methods for this.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for bc69f0c at 2026-07-22 08:39:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

@AnalitikGnid
AnalitikGnid requested a review from vkucera July 23, 2026 20:52
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.

3 participants