Skip to content

Commit 73c7877

Browse files
committed
Resolved conflicts with previous analyse-mft-tracks.cxx
2 parents 9ce33c1 + 2d691f3 commit 73c7877

107 files changed

Lines changed: 3639 additions & 1366 deletions

File tree

Some content is hidden

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

.github/workflows/codeowner-self-approval.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: PR self-approval
22

33
on:
4-
pull_request:
4+
# We need pull_request_target so we can use ${{ secrets.* }}.
5+
pull_request_target:
56
types:
67
- auto_merge_enabled
7-
- auto_merge_disabled
8-
pull_request_review:
9-
types:
10-
- submitted
118

129
jobs:
1310
approve:
@@ -18,36 +15,15 @@ jobs:
1815
# submit our review, that'll trigger this workflow again, so only run if
1916
# someone other than us (i.e. alibuild) reviewed.
2017
if: >-
21-
(github.event.action == 'submitted' &&
22-
github.event.review.state == 'approved' &&
23-
github.event.sender.login != 'alibuild' &&
24-
contains(github.event.pull_request.labels.*.name, 'auto-approval-requested')) ||
25-
((github.event.action == 'auto_merge_enabled' ||
26-
github.event.action == 'auto_merge_disabled') &&
18+
(github.event.action == 'auto_merge_enabled' &&
2719
github.event.sender.login == github.event.pull_request.user.login)
2820
2921
steps:
30-
- name: Add label when auto-merge is enabled
31-
if: github.event.action == 'auto_merge_enabled'
32-
uses: actions-ecosystem/action-add-labels@v1
33-
with:
34-
labels: auto-approval-requested
35-
github_token: ${{ secrets.ALIBUILD_GITHUB_TOKEN }}
36-
37-
- name: Remove label when auto-merge is disabled
38-
if: github.event.action == 'auto_merge_disabled'
39-
uses: actions-ecosystem/action-remove-labels@v1
40-
with:
41-
labels: auto-approval-requested
42-
github_token: ${{ secrets.ALIBUILD_GITHUB_TOKEN }}
43-
4422
- name: Install dependencies
45-
if: github.event.action != 'auto_merge_disabled'
4623
run: pip install codeowners PyGithub
4724

4825
# Approve the PR, if the author is only editing files owned by themselves.
4926
- name: Auto-approve PR if permitted
50-
if: github.event.action != 'auto_merge_disabled'
5127
shell: python
5228
env:
5329
submitter: ${{ github.event.pull_request.user.login }}
@@ -75,7 +51,7 @@ jobs:
7551
if owner_type == 'USERNAME':
7652
return owner_name.lstrip('@') == os.environ['submitter']
7753
elif owner_type == 'TEAM':
78-
org, _, team_name = user_or_team.lstrip('@').partition('/')
54+
org, _, team_name = owner_name.lstrip('@').partition('/')
7955
try:
8056
gh.get_organization(org) \
8157
.get_team_by_slug(team_name) \
@@ -95,7 +71,7 @@ jobs:
9571
pr = repo.get_pull(int(os.environ['pr']))
9672
owners = CodeOwners(repo.get_contents('CODEOWNERS')
9773
.decoded_content.decode('utf-8'))
98-
approvals_from = {review.user for review in pr.get_reviews()
74+
approvals_from = {review.user.login for review in pr.get_reviews()
9975
if review.state == 'APPROVED'}
10076
10177
# At least one username per CODEOWNERS line must match the submitter
@@ -105,7 +81,7 @@ jobs:
10581
auto_approve = True
10682
for filename in (f.filename for f in pr.get_files()):
10783
file_owners, line = owners.matching_line(filename)
108-
file_owners_names = {name for _, name in file_owners}
84+
file_owners_names = {name.lstrip('@') for _, name in file_owners}
10985
if approvals_from & file_owners_names:
11086
print(f'{filename}: OK: you have approval from the code'
11187
' owners of this file, specifically:',
@@ -131,5 +107,5 @@ jobs:
131107
else:
132108
print('::warning::Not approving PR. You can see whose approval'
133109
' you need in the messages above. This check will run again'
134-
" when someone approves this PR, or when the PR's author"
135-
' disables and reenables auto-merge.', file=sys.stderr)
110+
" when the PR's author disables and reenables auto-merge.",
111+
file=sys.stderr)

ALICE3/Tasks/ECALqa.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
// O2 includes
2020
#include "Framework/AnalysisTask.h"
2121
#include "ALICE3/DataModel/ECAL.h"
22-
#include "Common/Core/MC.h"
2322
#include "Common/Core/PID/PIDResponse.h"
2423
#include "ReconstructionDataFormats/PID.h"
2524
#include "Framework/HistogramRegistry.h"

ALICE3/Tasks/alice3-cdeuteron.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// O2 includes
1616
#include "Framework/AnalysisTask.h"
1717
#include "Framework/runDataProcessing.h"
18-
#include "Common/Core/MC.h"
1918
#include "TLorentzVector.h"
2019
#include "Framework/HistogramRegistry.h"
2120
#include "ReconstructionDataFormats/PID.h"

ALICE3/Tasks/alice3-lutmaker.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
// O2 includes
1717
#include "Framework/AnalysisTask.h"
18-
#include "Common/Core/MC.h"
1918
#include "ReconstructionDataFormats/Track.h"
19+
#include "SimulationDataFormat/MCUtils.h"
2020

2121
using namespace o2;
2222
using namespace framework;
@@ -198,7 +198,7 @@ struct Alice3LutMaker {
198198
if (mcParticle.pdgCode() != pdg) {
199199
continue;
200200
}
201-
if (selPrim.value && !MC::isPhysicalPrimary(mcParticle)) { // Requiring is physical primary
201+
if (selPrim.value && !mcParticle.isPhysicalPrimary()) { // Requiring is physical primary
202202
continue;
203203
}
204204

@@ -281,7 +281,7 @@ struct Alice3LutMaker {
281281
if (mcParticle.pdgCode() != pdg) {
282282
continue;
283283
}
284-
if (!MC::isPhysicalPrimary(mcParticle)) { // Requiring is physical primary
284+
if (!mcParticle.isPhysicalPrimary()) { // Requiring is physical primary
285285
continue;
286286
}
287287

ALICE3/Tasks/alice3-qa-singleparticle.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// O2 includes
1515
#include "Framework/AnalysisTask.h"
1616
#include "Framework/runDataProcessing.h"
17-
#include "Common/Core/MC.h"
1817
#include "Framework/HistogramRegistry.h"
1918

2019
using namespace o2;
@@ -177,13 +176,13 @@ struct Alice3SingleParticle {
177176
continue;
178177
}
179178
auto mother = mcParticle.mother0_as<aod::McParticles>();
180-
if (MC::isPhysicalPrimary(mcParticle)) {
179+
if (mcParticle.isPhysicalPrimary()) {
181180
histos.get<TH1>(HIST("track/primaries"))->Fill(Form("%i", mother.pdgCode()), 1.f);
182181
} else {
183182
histos.get<TH1>(HIST("track/secondaries"))->Fill(Form("%i", mother.pdgCode()), 1.f);
184183
}
185184
if (doPrint) {
186-
LOG(info) << "Track " << track.globalIndex() << " is a " << mcParticle.pdgCode() << " and comes from a " << mother.pdgCode() << " and is " << (MC::isPhysicalPrimary(mcParticle) ? "" : "not") << " a primary";
185+
LOG(info) << "Track " << track.globalIndex() << " is a " << mcParticle.pdgCode() << " and comes from a " << mother.pdgCode() << " and is " << (mcParticle.isPhysicalPrimary() ? "" : "not") << " a primary";
187186
}
188187
}
189188
}

ALICE3/Tasks/pidFTOFqa.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "Framework/ASoAHelpers.h"
1818
#include "ALICE3/DataModel/FTOF.h"
1919
#include "Common/DataModel/TrackSelectionTables.h"
20-
#include "Common/Core/MC.h"
2120

2221
using namespace o2;
2322
using namespace o2::framework;
@@ -122,7 +121,7 @@ struct ftofPidQaMC {
122121
if (pdgCode != 0 && abs(mcParticle.pdgCode()) != pdgCode) {
123122
continue;
124123
}
125-
if (useOnlyPhysicsPrimary == 1 && !MC::isPhysicalPrimary(mcParticle)) { // Selecting primaries
124+
if (useOnlyPhysicsPrimary == 1 && !mcParticle.isPhysicalPrimary()) { // Selecting primaries
126125
histos.fill(HIST("p/Sec"), track.p());
127126
continue;
128127
}

ALICE3/Tasks/pidRICHqa.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// O2 includes
1919
#include "Framework/AnalysisTask.h"
2020
#include "ALICE3/DataModel/RICH.h"
21-
#include "Common/Core/MC.h"
2221
#include "Common/Core/PID/PIDResponse.h"
2322
#include "ReconstructionDataFormats/PID.h"
2423

@@ -216,7 +215,7 @@ struct richPidQaMc {
216215
}
217216
histos.fill(HIST(hbRICHNSigmaMC[pidIndex]), track.pt(), nsigma);
218217

219-
if (MC::isPhysicalPrimary(particle)) { // Selecting primaries
218+
if (particle.isPhysicalPrimary()) { // Selecting primaries
220219
histos.fill(HIST(hbRICHNSigmaMCPrm[pidIndex]), track.pt(), nsigma);
221220
} else {
222221
histos.fill(HIST(hbRICHNSigmaMCSec[pidIndex]), track.pt(), nsigma);
@@ -232,7 +231,7 @@ struct richPidQaMc {
232231
histos.fill(HIST(hfRICHNSigmaMC[pidIndex]), track.pt(), nsigma);
233232
histos.fill(HIST(hfRICHNSigmaMCVsp[pidIndex]), track.p(), nsigma);
234233

235-
if (MC::isPhysicalPrimary(particle)) { // Selecting primaries
234+
if (particle.isPhysicalPrimary()) { // Selecting primaries
236235
histos.fill(HIST(hfRICHNSigmaMCPrm[pidIndex]), track.pt(), nsigma);
237236
histos.fill(HIST(hfRICHNSigmaMCPrmVsp[pidIndex]), track.p(), nsigma);
238237
} else {
@@ -338,7 +337,7 @@ struct richPidQaMc {
338337
histos.fill(HIST(hbRICHDelta[pid_type]), track.p(), delta);
339338
// const auto mcParticle = labels.iteratorAt(track.globalIndex()).mcParticle();
340339
const auto mcParticle = track.mcParticle();
341-
if (MC::isPhysicalPrimary(mcParticle)) { // Selecting primaries
340+
if (mcParticle.isPhysicalPrimary()) { // Selecting primaries
342341
histos.fill(HIST(hbRICHNSigmaPrm[pid_type]), track.pt(), nsigma);
343342
histos.fill(HIST("bRICH/signalvsPPrm"), track.p(), track.rich().richSignal());
344343
histos.fill(HIST("bRICH/pPrm"), track.p());
@@ -379,7 +378,7 @@ struct richPidQaMc {
379378
histos.fill(HIST(hfRICHNSigma[pid_type]), track.pt(), nsigma);
380379
histos.fill(HIST(hfRICHDelta[pid_type]), track.p(), delta);
381380
const auto mcParticle = track.mcParticle();
382-
if (MC::isPhysicalPrimary(mcParticle)) { // Selecting primaries
381+
if (mcParticle.isPhysicalPrimary()) { // Selecting primaries
383382
histos.fill(HIST(hfRICHNSigmaPrm[pid_type]), track.pt(), nsigma);
384383
histos.fill(HIST("fRICH/signalvsPPrm"), track.p(), track.frich().frichSignal());
385384
histos.fill(HIST("fRICH/pPrm"), track.p());

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif()
3838

3939
# Dependencies
4040
find_package(O2 CONFIG REQUIRED)
41-
find_package(ONNXRuntime::ONNXRuntime CONFIG REQUIRED)
41+
find_package(ONNXRuntime::ONNXRuntime CONFIG)
4242

4343
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
4444

@@ -78,5 +78,6 @@ add_subdirectory(PWGLF)
7878
add_subdirectory(PWGMM)
7979
add_subdirectory(PWGUD)
8080

81+
add_subdirectory(Tools)
8182
add_subdirectory(Tutorials)
8283
add_subdirectory(EventFiltering)

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
/PWGDQ @alibuild @iarsene
2626
/PWGHF @alibuild @ginnocen @vkucera @fcolamar
2727
/PWGLF @alibuild @njacazio
28-
/PWGMM @alibuild @aalkin
28+
/PWGMM @alibuild @aalkin
29+
/Tools/PIDML @alibuild @saganatt

Common/Core/AnalysisCoreLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
#pragma link C++ class o2::pid::tof::TOFReso + ;
2222
#pragma link C++ class o2::pid::tpc::BetheBloch + ;
2323
#pragma link C++ class o2::pid::tpc::TPCReso + ;
24+
#pragma link C++ class OrbitRange + ;

0 commit comments

Comments
 (0)