Skip to content

Commit fd93abb

Browse files
authored
Merge branch 'master' into RBRweights
2 parents d247556 + 2477796 commit fd93abb

File tree

608 files changed

+72121
-28249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

608 files changed

+72121
-28249
lines changed

.checkov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# You can see all available properties here: https://github.com/bridgecrewio/checkov#configuration-using-a-config-file
3+
quiet: true
4+
skip-check:
5+
- CKV_DOCKER_2
6+
- CKV_GHA_7

.github/labeler.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@ common:
99

1010
infrastructure:
1111
- changed-files:
12-
- any-glob-to-any-file: ['.github/**', 'cmake/**', 'dependencies/**', 'packaging/**']
12+
- any-glob-to-any-file:
13+
- '.clang-format'
14+
- '.clang-tidy'
15+
- '.flake8'
16+
- '.github/**'
17+
- '.checkov.yml'
18+
- '.mega-linter.yml'
19+
- 'cmake/**'
20+
- 'CODEOWNERS'
21+
- 'CPPLINT.cfg'
22+
- 'dependencies/**'
23+
- 'packaging/**'
24+
- 'pyproject.toml'
25+
26+
datamodel:
27+
- changed-files:
28+
- any-glob-to-any-file: ['DataModel/**', '*/DataModel/**']
1329

1430
dpg:
1531
- changed-files:

.github/workflows/clean-test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Clean PR checks
3+
4+
'on':
5+
workflow_dispatch:
6+
inputs:
7+
pr:
8+
description: PR number in this repo to be cleaned
9+
type: string # can't use number here
10+
required: true
11+
message:
12+
description: Human-readable message displayed on the new pending status
13+
type: string
14+
required: false
15+
default: ''
16+
17+
# Warning: GitHub limits the total number of inputs to 10, so a maximum of
18+
# 8 checks is allowed here!
19+
# Warning: the check_* keys are magic and must consist of the string
20+
# "check_" followed by the applicable check name exactly. The
21+
# "description" field is only the human-readable label for the input.
22+
'check_build/O2Physics/o2/macOS-arm':
23+
description: build/O2Physics/o2/macOS-arm
24+
type: boolean
25+
default: true
26+
27+
'check_build/O2Physics/o2/macOS':
28+
description: build/O2Physics/o2/macOS
29+
type: boolean
30+
default: true
31+
32+
'check_build/O2Physics/o2':
33+
description: build/O2Physics/o2
34+
type: boolean
35+
default: true
36+
37+
permissions: {}
38+
39+
jobs:
40+
clean:
41+
name: Clean PR checks
42+
uses: alisw/ali-bot/.github/workflows/clean-pr-checks.yml@master
43+
with:
44+
owner: ${{ github.event.repository.owner.login }}
45+
repo: ${{ github.event.repository.name }}
46+
pr: ${{ github.event.inputs.pr }}
47+
message: ${{ github.event.inputs.message }}
48+
checks: ${{ toJSON(github.event.inputs) }}
49+
permissions:
50+
pull-requests: read # to get last commit for pr (octokit/graphql-action)
51+
statuses: write # for set-github-status

.github/workflows/labeler.yml

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
name: "Pull Request Labeler"
3-
on:
4-
- pull_request_target
3+
'on':
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, edited]
56
permissions: read-all
67

78
jobs:
@@ -10,8 +11,112 @@ jobs:
1011
permissions:
1112
contents: read
1213
pull-requests: write
14+
outputs:
15+
labels: ${{ steps.labeler.outputs.all-labels }}
1316
steps:
14-
- uses: actions/labeler@v5
17+
- name: Label the PR
18+
id: labeler
19+
uses: actions/labeler@v5
1520
with:
1621
repo-token: ${{ secrets.GITHUB_TOKEN }}
1722
sync-labels: true
23+
title-prefix-checker:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
pull-requests: write
28+
needs: labeler
29+
steps:
30+
- name: Check the PR title prefix
31+
id: check-prefix
32+
env:
33+
title: ${{ github.event.pull_request.title }}
34+
labels: ${{ needs.labeler.outputs.labels }}
35+
shell: python
36+
run: |
37+
import os
38+
import re
39+
import sys
40+
title = os.environ['title']
41+
labels = os.environ['labels']
42+
tags = {
43+
"infrastructure": "Infrastructure",
44+
"common": "Common",
45+
"alice3": "ALICE3",
46+
"pwgcf": "PWGCF",
47+
"pwgdq": "PWGDQ",
48+
"pwgem": "PWGEM",
49+
"pwghf": "PWGHF",
50+
"pwgje": "PWGJE",
51+
"pwglf": "PWGLF",
52+
"pwgud": "PWGUD",
53+
"dpg": "DPG",
54+
"trigger": "Trigger",
55+
"tutorial": "Tutorial",
56+
}
57+
print(f'PR title: "{title}"')
58+
print(f'PR labels: "{labels}"')
59+
tags_relevant = [tags[label] for label in tags if label in labels.split(",")]
60+
print("Relevant title tags:", ",".join(tags_relevant))
61+
passed = True
62+
prefix_good = ",".join(tags_relevant)
63+
prefix_good = f"[{prefix_good}] "
64+
print(f"Generated prefix: {prefix_good}")
65+
replace_title = 0
66+
title_new = title
67+
# If there is a prefix which contains a known tag, check it for correct tags, and reformat it if needed.
68+
# If there is a prefix which does not contain any known tag, add the tag prefix.
69+
# If there is no prefix, add the tag prefix.
70+
if match := re.match(r"\[?(\w[\w, /\+-]+)[\]:]+ ", title):
71+
prefix_title = match.group(1)
72+
words_prefix_title = prefix_title.replace(",", " ").replace("/", " ").split()
73+
title_stripped = title[len(match.group()) :]
74+
print(f'PR title prefix: "{prefix_title}" -> tags: {words_prefix_title}')
75+
print(f'Stripped PR title: "{title_stripped}"')
76+
if any(tag in words_prefix_title for tag in tags.values()):
77+
for tag in tags.values():
78+
if tag in tags_relevant and tag not in words_prefix_title:
79+
print(f'::error::Relevant tag "{tag}" not found in the prefix of the PR title.')
80+
passed = False
81+
if tag not in tags_relevant and tag in words_prefix_title:
82+
print(f'::error::Irrelevant tag "{tag}" found in the prefix of the PR title.')
83+
passed = False
84+
# Format a valid prefix.
85+
if passed:
86+
prefix_good = ",".join(w for w in prefix_title.replace(",", " ").split() if w)
87+
prefix_good = f"[{prefix_good}] "
88+
print(f"::notice::Reformatted prefix: {prefix_good}")
89+
if match.group() != prefix_good:
90+
replace_title = 1
91+
title_new = prefix_good + title_stripped
92+
else:
93+
print("::warning::No known tags found in the prefix.")
94+
if tags_relevant:
95+
replace_title = 1
96+
title_new = prefix_good + title
97+
else:
98+
print("::warning::No valid prefix found in the PR title.")
99+
if tags_relevant:
100+
replace_title = 1
101+
title_new = prefix_good + title
102+
if not passed:
103+
print("::error::Problems were found in the PR title prefix.")
104+
print('::notice::Use the form "tags: title" or "[tags] title".')
105+
sys.exit(1)
106+
if replace_title:
107+
print("::warning::The PR title prefix with tags needs to be added or adjusted.")
108+
print(f'::warning::New title: "{title_new}".')
109+
else:
110+
print("::notice::The PR title prefix is fine.")
111+
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
112+
print(f"replace={replace_title}", file=fh)
113+
print(f"title={title_new}", file=fh)
114+
- name: Fix the PR title prefix
115+
if: ${{ steps.check-prefix.outputs.replace == 1 }}
116+
uses: the-wright-jamie/[email protected]
117+
with:
118+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
119+
base-branch-regex: master
120+
error-on-fail: false
121+
title-template: "${{ steps.check-prefix.outputs.title }}"
122+
title-update-action: replace

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
id: ml
3939
# You can override MegaLinter flavor used to have faster performances
4040
# More info at https://megalinter.io/flavors/
41-
uses: oxsecurity/megalinter@v8
41+
uses: oxsecurity/megalinter@v8.1.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/

.github/workflows/o2-linter.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# Find issues in O2 code
3+
name: O2 linter
4+
5+
'on': [pull_request, push]
6+
permissions: {}
7+
env:
8+
MAIN_BRANCH: master
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
o2-linter:
16+
name: O2 linter
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # needed to get the full history
23+
- name: Run tests
24+
run: |
25+
# Diff against the common ancestor of the source branch and the main branch.
26+
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...)
27+
if [ ${#files[@]} -eq 0 ]; then
28+
echo "::notice::No files to lint."
29+
exit 0
30+
fi
31+
[ ${{ github.event_name }} == 'pull_request' ] && options="-g"
32+
# shellcheck disable=SC2086 # Ignore unquoted options.
33+
python3 Scripts/o2_linter.py $options "${files[@]}"
34+
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."

ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ struct OnTheFlyTOFPID {
8181
Configurable<int> nBinsTrackDeltaLength{"nBinsTrackDeltaLength", 100, "number of bins in delta track length"};
8282
Configurable<int> nBinsNsigmaCorrectSpecies{"nBinsNsigmaCorrectSpecies", 200, "number of bins in Nsigma plot (correct speies)"};
8383
Configurable<int> nBinsNsigmaWrongSpecies{"nBinsNsigmaWrongSpecies", 200, "number of bins in Nsigma plot (wrong species)"};
84+
Configurable<float> minNsigmaRange{"minNsigmaRange", -10, "lower limit for the nsigma axis"};
85+
Configurable<float> maxNsigmaRange{"maxNsigmaRange", +10, "upper limit for the nsigma axis"};
8486
Configurable<int> nBinsTimeRes{"nBinsTimeRes", 400, "number of bins plots time resolution"};
8587
Configurable<int> nBinsRelativeEtaPt{"nBinsRelativeEtaPt", 400, "number of bins plots pt and eta relative errors"};
8688
Configurable<int> nBinsEta{"nBinsEta", 400, "number of bins plot relative eta error"};
@@ -138,7 +140,7 @@ struct OnTheFlyTOFPID {
138140
}
139141

140142
if (doQAplots) {
141-
const AxisSpec axisMomentum{static_cast<int>(nBinsP), 0.0f, +4.0f, "#it{p} (GeV/#it{c})"};
143+
const AxisSpec axisMomentum{static_cast<int>(nBinsP), 0.0f, +10.0f, "#it{p} (GeV/#it{c})"};
142144
const AxisSpec axisMomentumSmall{static_cast<int>(nBinsP), 0.0f, +1.0f, "#it{p} (GeV/#it{c})"};
143145
const AxisSpec axisVelocity{static_cast<int>(nBinsBeta), 0.0f, +1.1f, "Measured #beta"};
144146
const AxisSpec axisTrackLengthInner{static_cast<int>(nBinsTrackLengthInner), 0.0f, 60.0f, "Track length (cm)"};
@@ -182,11 +184,11 @@ struct OnTheFlyTOFPID {
182184
std::string name_title_inner = "h2dInnerNsigmaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";
183185
std::string name_title_outer = "h2dOuterNsigmaTrue" + particle_names2[i_true] + "Vs" + particle_names2[i_hyp] + "Hypothesis";
184186
if (i_true == i_hyp) {
185-
const AxisSpec axisNsigmaCorrect{static_cast<int>(nBinsNsigmaCorrectSpecies), -10.0f, +10.0f, "N#sigma - True " + particle_names1[i_true] + " vs " + particle_names1[i_hyp] + " hypothesis"};
187+
const AxisSpec axisNsigmaCorrect{static_cast<int>(nBinsNsigmaCorrectSpecies), minNsigmaRange, maxNsigmaRange, "N#sigma - True " + particle_names1[i_true] + " vs " + particle_names1[i_hyp] + " hypothesis"};
186188
histos.add(name_title_inner.c_str(), name_title_inner.c_str(), kTH2F, {axisMomentum, axisNsigmaCorrect});
187189
histos.add(name_title_outer.c_str(), name_title_outer.c_str(), kTH2F, {axisMomentum, axisNsigmaCorrect});
188190
} else {
189-
const AxisSpec axisNsigmaWrong{static_cast<int>(nBinsNsigmaWrongSpecies), -10.0f, +10.0f, "N#sigma - True " + particle_names1[i_true] + " vs " + particle_names1[i_hyp] + " hypothesis"};
191+
const AxisSpec axisNsigmaWrong{static_cast<int>(nBinsNsigmaWrongSpecies), minNsigmaRange, maxNsigmaRange, "N#sigma - True " + particle_names1[i_true] + " vs " + particle_names1[i_hyp] + " hypothesis"};
190192
histos.add(name_title_inner.c_str(), name_title_inner.c_str(), kTH2F, {axisMomentum, axisNsigmaWrong});
191193
histos.add(name_title_outer.c_str(), name_title_outer.c_str(), kTH2F, {axisMomentum, axisNsigmaWrong});
192194
}

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct OnTheFlyTracker {
8181
Produces<aod::UpgradeCascades> upgradeCascades;
8282

8383
// optionally produced, empty (to be tuned later)
84-
Produces<aod::StoredTracksExtra> tracksExtra; // base table, extend later
84+
Produces<aod::StoredTracksExtra_001> tracksExtra; // base table, extend later
8585
Produces<aod::TrackSelection> trackSelection;
8686
Produces<aod::TrackSelectionExtension> trackSelectionExtension;
8787

ALICE3/TableProducer/alice3-multicharm.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,14 @@ struct alice3multicharm {
499499
continue; // do not take if radius too small, likely a primary combination
500500

501501
o2::dataformats::DCA dcaInfo;
502-
float xicdcaXY = 1e+10, xicdcaZ = 1e+10;
502+
float xicdcaXY = 1e+10;
503503
o2::track::TrackParCov xicTrackCopy(xicTrack); // paranoia
504504

505505
o2::vertexing::PVertex primaryVertex;
506506
primaryVertex.setXYZ(collision.posX(), collision.posY(), collision.posZ());
507507

508508
if (xicTrackCopy.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
509509
xicdcaXY = dcaInfo.getY();
510-
xicdcaZ = dcaInfo.getZ();
511510
}
512511

513512
histos.fill(HIST("hMassXiC"), thisXiCcandidate.mass);
@@ -543,10 +542,9 @@ struct alice3multicharm {
543542

544543
o2::track::TrackParCov xiccTrack(thisXiCCcandidate.xyz, momentumCC, thisXiCCcandidate.parentTrackCovMatrix, +2);
545544

546-
float xiccdcaXY = 1e+10, xiccdcaZ = 1e+10;
545+
float xiccdcaXY = 1e+10;
547546
if (xiccTrack.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
548547
xiccdcaXY = dcaInfo.getY();
549-
xiccdcaZ = dcaInfo.getZ();
550548
}
551549

552550
// produce multi-charm table for posterior analysis

CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/Common/CCDB @alibuild @jgrosseo @iarsene @ekryshen @ddobrigk
1616
/Common/Tools/Multiplicity @alibuild @ddobrigk @victor-gonzalez
1717
/ALICE3 @alibuild @njacazio @hscheid
18-
/DPG @alibuild @chiarazampolli @noferini
18+
/DPG @alibuild @chiarazampolli @alcaliva @catalinristea
1919
/DPG/Tasks/AOTEvent @alibuild @ekryshen @strogolo @altsybee
2020
/DPG/Tasks/AOTTrack @alibuild @mfaggin @iouribelikov @njacazio
2121
/DPG/Tasks/TOF @alibuild @noferini @njacazio
@@ -33,7 +33,7 @@
3333
/PWGCF/TableProducer @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
3434
/PWGCF/Tasks @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
3535
/PWGDQ @alibuild @iarsene @dsekihat @feisenhu @lucamicheletti93
36-
/PWGEM @alibuild @mikesas @rbailhac @feisenhu
36+
/PWGEM @alibuild @feisenhu @dsekihat @ivorobye
3737
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
3838
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
3939
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @NicoleBastid @hahassan7 @jpxrk @apalasciano
@@ -43,8 +43,8 @@
4343
/PWGLF/TableProducer/GlobalEventProperties @alibuild @njacazio @skundu692 @gbencedi @omvazque
4444
/PWGLF/Tasks/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
4545
/PWGLF/TableProducer/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
46-
/PWGLF/Tasks/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
47-
/PWGLF/TableProducer/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
46+
/PWGLF/Tasks/Resonances @alibuild @njacazio @skundu692 @dmallick2 @smaff92
47+
/PWGLF/TableProducer/Resonances @alibuild @njacazio @skundu692 @dmallick2 @smaff92
4848
/PWGLF/Tasks/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95
4949
/PWGLF/TableProducer/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95
5050

@@ -55,7 +55,7 @@
5555
/PWGMM/UE @alibuild @aalkin @aortizve
5656

5757
/PWGUD @alibuild @pbuehler @abylinkin @rolavick
58-
/PWGJE @alibuild @lhavener @maoyx @nzardosh @ddobrigk @mfasDa
58+
/PWGJE @alibuild @lhavener @maoyx @nzardosh @fjonasALICE @mfasDa @mhemmer-cern
5959
/Tools/PIDML @alibuild @saganatt
6060
/Tools/ML @alibuild @fcatalan92 @fmazzasc
6161
/Tutorials/PWGCF @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul

0 commit comments

Comments
 (0)