Skip to content

Commit a736144

Browse files
committed
New PID analysis using ML model
1 parent 8bd5029 commit a736144

2 files changed

Lines changed: 364 additions & 0 deletions

File tree

Tools/PIDML/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ o2physics_add_dpl_workflow(qa-pid
2525
SOURCES qaPid.cxx
2626
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
2727
COMPONENT_NAME Analysis)
28+
29+
o2physics_add_dpl_workflow(qa-pid-ml
30+
SOURCES qaPidML.cxx
31+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore ONNXRuntime::ONNXRuntime
32+
COMPONENT_NAME Analysis)

Tools/PIDML/qaPidML.cxx

Lines changed: 359 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,359 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
///
12+
/// \brief Task to check ML PID efficiency. Based on Maja's simpleApplyPidOnnxModel.cxx code
13+
/// \author Łukasz Sawicki
14+
/// \since
15+
16+
#include "Framework/runDataProcessing.h"
17+
#include "Framework/AnalysisTask.h"
18+
#include "Framework/HistogramRegistry.h"
19+
#include "Framework/StaticFor.h"
20+
#include "Common/DataModel/TrackSelectionTables.h"
21+
#include "Common/Core/PID/PIDResponse.h"
22+
#include <TParameter.h>
23+
#include "Tools/PIDML/pidOnnxModel.h"
24+
#include <string>
25+
26+
using namespace o2;
27+
using namespace o2::framework;
28+
using namespace o2::framework::expressions;
29+
30+
struct pidml {
31+
static const int maxP = 5;
32+
// nb of bins for TH1 hists
33+
static const int binsNb = 100;
34+
// nb of bins for TH2 hists
35+
static const int binsNb2D = 1000;
36+
static const int numParticles = 3;
37+
38+
static constexpr std::string_view pidTrueRegistryNames[numParticles] = {"pidTrue/211", "pidTrue/2212", "pidTrue/321"};
39+
static constexpr std::string_view pidFalseRegistryNames[numParticles] = {"pidFalse/211", "pidFalse/2212", "pidFalse/321"};
40+
41+
static constexpr std::string_view TPCPidTrueRegistryNames[numParticles] = {"TPCPidTrue/211", "TPCPidTrue/2212", "TPCPidTrue/321"};
42+
static constexpr std::string_view TPCPidFalseRegistryNames[numParticles] = {"TPCPidFalse/211", "TPCPidFalse/2212", "TPCPidFalse/321"};
43+
44+
static constexpr std::string_view TOFPidTrueRegistryNames[numParticles] = {"TOFPidTrue/211", "TOFPidTrue/2212", "TOFPidTrue/321"};
45+
static constexpr std::string_view TOFPidFalseRegistryNames[numParticles] = {"TOFPidFalse/211", "TOFPidFalse/2212", "TOFPidFalse/321"};
46+
47+
// available particles: 211, 2212, 321
48+
static constexpr int particlesPdgCode[numParticles] = {211, 2212, 321};
49+
50+
HistogramRegistry histReg{
51+
"allHistograms",
52+
{{"MC/211", "MC #pi^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
53+
{"MC/11", "MC e^{-};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
54+
{"MC/321", "MC K^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
55+
{"MC/2212", "MC p;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
56+
{"MC/13", "MC #mu^{-};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
57+
{"MC/0211", "MC #pi^{-};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
58+
{"MC/011", "MC e^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
59+
{"MC/0321", "MC K^{-};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
60+
{"MC/02212", "MC #bar{p};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
61+
{"MC/013", "MC #mu^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
62+
{"MC/else", "MC else;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
63+
64+
{"pidTrue/211", "PID true #pi^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
65+
{"pidTrue/321", "PID true K^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
66+
{"pidTrue/2212", "PID true p;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
67+
68+
{"pidFalse/211", "PID false #pi^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
69+
{"pidFalse/321", "PID false K^{+};p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
70+
{"pidFalse/2212", "PID false p;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
71+
72+
{"contamination/211in211", "#pi^{+} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
73+
{"contamination/2212in211", "p in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
74+
{"contamination/321in211", "K^{+} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
75+
{"contamination/11in211", "e^{-} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
76+
{"contamination/13in211", "#mu^{-} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
77+
78+
{"contamination/0211in211", "#pi^{-} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
79+
{"contamination/02212in211", "#bar{p} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
80+
{"contamination/0321in211", "K^{-} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
81+
{"contamination/011in211", "e^{+} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
82+
{"contamination/013in211", "#mu^{+} in #pi^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
83+
84+
{"contamination/211in2212", "#pi^{+} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
85+
{"contamination/2212in2212", "p in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
86+
{"contamination/321in2212", "K^{+} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
87+
{"contamination/11in2212", "e^{-} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
88+
{"contamination/13in2212", "#mu^{-} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
89+
90+
{"contamination/0211in2212", "#pi^{-} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
91+
{"contamination/02212in2212", "#bar{p} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
92+
{"contamination/0321in2212", "K^{-} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
93+
{"contamination/011in2212", "e^{+} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
94+
{"contamination/013in2212", "#mu^{+} in p sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
95+
96+
{"contamination/211in321", "#pi^{+} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
97+
{"contamination/2212in321", "p in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
98+
{"contamination/321in321", "K^{+} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
99+
{"contamination/11in321", "e^{-} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
100+
{"contamination/13in321", "#mu^{-} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
101+
102+
{"contamination/0211in321", "#pi^{-} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
103+
{"contamination/02212in321", "#bar{p} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
104+
{"contamination/0321in321", "K^{-} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
105+
{"contamination/011in321", "e^{+} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
106+
{"contamination/013in321", "#mu^{+} in K^{+} sample;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{binsNb, 0, maxP}}}},
107+
108+
{"TPCSignalPidTrue", "PID true;p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
109+
{"TPCSignalPidFalse", "PID false;p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
110+
111+
{"TPCPidTrue/211", "PID true #pi^{+};p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
112+
{"TPCPidTrue/321", "PID true K^{+};p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
113+
{"TPCPidTrue/2212", " PID true p;p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
114+
{"TPCPidFalse/211", "PID false #pi^{+};p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
115+
{"TPCPidFalse/321", "PID false K^{+};p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
116+
{"TPCPidFalse/2212", "PID false p;p (GeV/c); TPC Signal (dE/dx)", {HistType::kTH2F, {{binsNb2D, 0, 10}, {binsNb2D, 0, 300}}}},
117+
118+
{"TOFSignalPidTrue", "PID true;p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
119+
{"TOFSignalPidFalse", "PID false;p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
120+
121+
{"TOFPidTrue/211", "PID true #pi^{+};p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
122+
{"TOFPidTrue/2212", "PID true p;p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
123+
{"TOFPidTrue/321", "PID true K^{+};p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
124+
{"TOFPidFalse/211", "PID false #pi^{+};p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
125+
{"TOFPidFalse/2212", "PID false p;p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}},
126+
{"TOFPidFalse/321", "PID false K^{+};p (GeV/c); TOF #beta", {HistType::kTH2F, {{binsNb2D, 0.2, 10}, {110, 0, 1.1}}}}}};
127+
128+
void fillContaminationRegistry(int i, int pdgCode, double pt)
129+
{
130+
if (i == 0) {
131+
if (pdgCode == 211) {
132+
histReg.fill(HIST("contamination/211in211"), pt);
133+
}
134+
if (pdgCode == -211) {
135+
histReg.fill(HIST("contamination/0211in211"), pt);
136+
}
137+
138+
if (pdgCode == 2212) {
139+
histReg.fill(HIST("contamination/2212in211"), pt);
140+
}
141+
if (pdgCode == -2212) {
142+
histReg.fill(HIST("contamination/02212in211"), pt);
143+
}
144+
145+
if (pdgCode == 321) {
146+
histReg.fill(HIST("contamination/321in211"), pt);
147+
}
148+
if (pdgCode == -321) {
149+
histReg.fill(HIST("contamination/0321in211"), pt);
150+
}
151+
152+
if (pdgCode == 11) {
153+
histReg.fill(HIST("contamination/11in211"), pt);
154+
}
155+
if (pdgCode == -11) {
156+
histReg.fill(HIST("contamination/011in211"), pt);
157+
}
158+
159+
if (pdgCode == 13) {
160+
histReg.fill(HIST("contamination/13in211"), pt);
161+
}
162+
if (pdgCode == -13) {
163+
histReg.fill(HIST("contamination/013in211"), pt);
164+
}
165+
166+
} else if (i == 1) {
167+
if (pdgCode == 211) {
168+
histReg.fill(HIST("contamination/211in2212"), pt);
169+
}
170+
if (pdgCode == -211) {
171+
histReg.fill(HIST("contamination/0211in2212"), pt);
172+
}
173+
174+
if (pdgCode == 2212) {
175+
histReg.fill(HIST("contamination/2212in2212"), pt);
176+
}
177+
if (pdgCode == -2212) {
178+
histReg.fill(HIST("contamination/02212in2212"), pt);
179+
}
180+
181+
if (pdgCode == 321) {
182+
histReg.fill(HIST("contamination/321in2212"), pt);
183+
}
184+
if (pdgCode == -321) {
185+
histReg.fill(HIST("contamination/0321in2212"), pt);
186+
}
187+
188+
if (pdgCode == 11) {
189+
histReg.fill(HIST("contamination/11in2212"), pt);
190+
}
191+
if (pdgCode == -11) {
192+
histReg.fill(HIST("contamination/011in2212"), pt);
193+
}
194+
195+
if (pdgCode == 13) {
196+
histReg.fill(HIST("contamination/13in2212"), pt);
197+
}
198+
if (pdgCode == -13) {
199+
histReg.fill(HIST("contamination/013in2212"), pt);
200+
}
201+
202+
} else if (i == 2) {
203+
if (pdgCode == 211) {
204+
histReg.fill(HIST("contamination/211in321"), pt);
205+
}
206+
if (pdgCode == -211) {
207+
histReg.fill(HIST("contamination/0211in321"), pt);
208+
}
209+
210+
if (pdgCode == 2212) {
211+
histReg.fill(HIST("contamination/2212in321"), pt);
212+
}
213+
if (pdgCode == -2212) {
214+
histReg.fill(HIST("contamination/02212in321"), pt);
215+
}
216+
217+
if (pdgCode == 321) {
218+
histReg.fill(HIST("contamination/321in321"), pt);
219+
}
220+
if (pdgCode == -321) {
221+
histReg.fill(HIST("contamination/0321in321"), pt);
222+
}
223+
224+
if (pdgCode == 11) {
225+
histReg.fill(HIST("contamination/11in321"), pt);
226+
}
227+
if (pdgCode == -11) {
228+
histReg.fill(HIST("contamination/011in321"), pt);
229+
}
230+
231+
if (pdgCode == 13) {
232+
histReg.fill(HIST("contamination/13in321"), pt);
233+
}
234+
if (pdgCode == -13) {
235+
histReg.fill(HIST("contamination/013in321"), pt);
236+
}
237+
}
238+
}
239+
240+
int pidParticle(const int pidLogits[]) {
241+
// index of the biggest value in an array
242+
int index = 0;
243+
// index of the second biggest value in an array
244+
int smaller_index = 0;
245+
246+
for (int j = 0; j < numParticles; j++) {
247+
if (pidLogits[j] > pidLogits[index]) {
248+
// assign new indexes
249+
smaller_index = index;
250+
index = j;
251+
}
252+
}
253+
254+
// return 0 if logit with index 'index' is below 0 or two indexes have the same value, else map index to particle pdgCode
255+
if ((pidLogits[index] <= 0) | ((pidLogits[index] == pidLogits[smaller_index]) & (smaller_index != 0))) {
256+
return 0;
257+
} else {
258+
return particlesPdgCode[index];
259+
}
260+
}
261+
262+
template <std::size_t i, typename T>
263+
void pidML(const T& track, const int pdgCodeMC)
264+
{
265+
int pidLogits[3] = {model211.applyModel(track), model2212.applyModel(track), model321.applyModel(track)};
266+
int pid = pidParticle(pidLogits);
267+
if (pid == particlesPdgCode[i]){
268+
if (pdgCodeMC == particlesPdgCode[i]) {
269+
histReg.fill(HIST(pidTrueRegistryNames[i]), track.pt());
270+
histReg.fill(HIST(TPCPidTrueRegistryNames[i]), track.p(), track.tpcSignal());
271+
histReg.fill(HIST(TOFPidTrueRegistryNames[i]), track.p(), track.beta());
272+
histReg.fill(HIST("TPCSignalPidTrue"), track.p(), track.tpcSignal());
273+
histReg.fill(HIST("TOFSignalPidTrue"), track.p(), track.beta());
274+
} else {
275+
histReg.fill(HIST(pidFalseRegistryNames[i]), track.pt());
276+
histReg.fill(HIST(TPCPidFalseRegistryNames[i]), track.p(), track.tpcSignal());
277+
histReg.fill(HIST("TPCSignalPidFalse"), track.p(), track.tpcSignal());
278+
histReg.fill(HIST("TOFSignalPidFalse"), track.p(), track.beta());
279+
histReg.fill(HIST(TOFPidFalseRegistryNames[i]), track.p(), track.beta());
280+
281+
double pt = track.pt();
282+
fillContaminationRegistry(i, pdgCodeMC, pt);
283+
}
284+
}
285+
}
286+
287+
// prepare ML models for analysis, one instance per particle to predict
288+
// std::vector <PidONNXModel&> pidModels;
289+
290+
Configurable<bool> cfgUseTOF{"useTOF", true, "Use ML model with TOF signal"};
291+
Configurable<std::string> cfgModelDir{"model-dir", "/home/lsawicki/inz/PID/ONNX_models/", "base path to the directory with ONNX models"};
292+
Configurable<std::string> cfgScalingParamsFile{"scaling-params", "/home/lsawicki/inz/PID/ONNX_models/train_208_mc_with_beta_and_sigmas_scaling_params.json", "base path to the ccdb JSON file with scaling parameters from training"};
293+
294+
PidONNXModel model211 = PidONNXModel(cfgModelDir.value, cfgScalingParamsFile.value, 211, cfgUseTOF.value);
295+
PidONNXModel model2212 = PidONNXModel(cfgModelDir.value, cfgScalingParamsFile.value, 2212, cfgUseTOF.value);
296+
PidONNXModel model321 = PidONNXModel(cfgModelDir.value, cfgScalingParamsFile.value, 321, cfgUseTOF.value);
297+
298+
299+
void init(InitContext const&) {
300+
// for (auto& particlePdg : particlesPdgCode) {
301+
// pidModels.push_back(PidONNXModel(cfgModelDir.value, cfgScalingParamsFile.value, particlePdg, cfgUseTOF.value));
302+
// }
303+
}
304+
305+
Filter trackFilter = aod::track::isGlobalTrack == static_cast<uint8_t>(true);
306+
using pidTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::McTrackLabels, aod::TracksExtended, aod::TrackSelection, aod::pidTOFbeta, aod::TOFSignal>>;
307+
308+
void process(pidTracks const& tracks, aod::McParticles const& mcParticles) {
309+
for (auto& track : tracks) {
310+
auto particle = track.mcParticle();
311+
int pdgCodeMC = particle.pdgCode();
312+
313+
// fill MC histogram
314+
// pions
315+
if (pdgCodeMC == 211) {
316+
histReg.fill(HIST("MC/211"), track.pt());
317+
} else if (pdgCodeMC == -211) {
318+
histReg.fill(HIST("MC/0211"), track.pt());
319+
}
320+
// protons
321+
else if (pdgCodeMC == 2212) {
322+
histReg.fill(HIST("MC/2212"), track.pt());
323+
} else if (pdgCodeMC == -2212) {
324+
histReg.fill(HIST("MC/02212"), track.pt());
325+
}
326+
// kaons
327+
else if (pdgCodeMC == 321) {
328+
histReg.fill(HIST("MC/321"), track.pt());
329+
} else if (pdgCodeMC == -321) {
330+
histReg.fill(HIST("MC/0321"), track.pt());
331+
}
332+
// electrons
333+
else if (pdgCodeMC == 11) {
334+
histReg.fill(HIST("MC/11"), track.pt());
335+
} else if (pdgCodeMC == -11) {
336+
histReg.fill(HIST("MC/011"), track.pt());
337+
}
338+
// muons
339+
else if (pdgCodeMC == 13) {
340+
histReg.fill(HIST("MC/13"), track.pt());
341+
} else if (pdgCodeMC == -13) {
342+
histReg.fill(HIST("MC/013"), track.pt());
343+
} else {
344+
histReg.fill(HIST("MC/else"), track.pt());
345+
}
346+
347+
static_for<0, 2>([&](auto i) {
348+
pidML<i>(track, pdgCodeMC);
349+
});
350+
}
351+
}
352+
};
353+
354+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
355+
{
356+
return WorkflowSpec{
357+
adaptAnalysisTask<pidml>(cfgc),
358+
};
359+
}

0 commit comments

Comments
 (0)