Skip to content

Commit fe5032f

Browse files
JaeYoonCHOalibuild
andauthored
[PWGHF] Add a possibility to use ML selection in XicToXiPiPi candidate selector and task (AliceO2Group#8520)
Co-authored-by: ALICE Action Bot <[email protected]>
1 parent 59369ab commit fe5032f

File tree

4 files changed

+335
-23
lines changed

4 files changed

+335
-23
lines changed
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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+
/// \file HfMlResponseXicToXiPiPi.h
13+
/// \brief Class to compute the ML response for Ξc± → Ξ∓ π± π± analysis selections
14+
/// \author Jaeyoon Cho <[email protected]>, Inha University
15+
16+
#ifndef PWGHF_CORE_HFMLRESPONSEXICTOXIPIPI_H_
17+
#define PWGHF_CORE_HFMLRESPONSEXICTOXIPIPI_H_
18+
19+
#include <map>
20+
#include <string>
21+
#include <vector>
22+
23+
#include "PWGHF/Core/HfMlResponse.h"
24+
25+
// Fill the map of available input features
26+
// the key is the feature's name (std::string)
27+
// the value is the corresponding value in EnumInputFeatures
28+
#define FILL_MAP_XICTOXIPIPI(FEATURE) \
29+
{ \
30+
#FEATURE, static_cast<uint8_t>(InputFeaturesXicToXiPiPi::FEATURE) \
31+
}
32+
33+
// Check if the index of mCachedIndices (index associated to a FEATURE)
34+
// matches the entry in EnumInputFeatures associated to this FEATURE
35+
// if so, the inputFeatures vector is filled with the FEATURE's value
36+
// by calling the corresponding GETTER from OBJECT
37+
#define CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL(OBJECT, FEATURE, GETTER) \
38+
case static_cast<uint8_t>(InputFeaturesXicToXiPiPi::FEATURE): { \
39+
inputFeatures.emplace_back(OBJECT.GETTER()); \
40+
break; \
41+
}
42+
43+
// Specific case of CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL(OBJECT, FEATURE, GETTER)
44+
// where OBJECT is named candidate and FEATURE = GETTER
45+
#define CHECK_AND_FILL_VEC_XICTOXIPIPI(GETTER) \
46+
case static_cast<uint8_t>(InputFeaturesXicToXiPiPi::GETTER): { \
47+
inputFeatures.emplace_back(candidate.GETTER()); \
48+
break; \
49+
}
50+
51+
namespace o2::analysis
52+
{
53+
54+
enum class InputFeaturesXicToXiPiPi : uint8_t {
55+
ptProng0 = 0,
56+
ptProng1,
57+
ptProng2,
58+
chi2PCA,
59+
decayLength,
60+
decayLengthNormalised,
61+
decayLengthXY,
62+
decayLengthXYNormalised,
63+
cpa,
64+
cpaXY,
65+
cosPaXi,
66+
cosPaXYXi,
67+
cosPaLambda,
68+
cosPaXYLambda,
69+
impactParameterXY0,
70+
impactParameterXY1,
71+
impactParameterXY2
72+
};
73+
74+
template <typename TypeOutputScore = float>
75+
class HfMlResponseXicToXiPiPi : public HfMlResponse<TypeOutputScore>
76+
{
77+
public:
78+
/// Default constructor
79+
HfMlResponseXicToXiPiPi() = default;
80+
/// Default destructor
81+
virtual ~HfMlResponseXicToXiPiPi() = default;
82+
83+
/// Method to get the input features vector needed for ML inference
84+
/// \param candidate is the Xic candidate
85+
/// \return inputFeatures vector
86+
template <typename T1>
87+
std::vector<float> getInputFeatures(T1 const& candidate)
88+
{
89+
std::vector<float> inputFeatures;
90+
91+
for (const auto& idx : MlResponse<TypeOutputScore>::mCachedIndices) {
92+
switch (idx) {
93+
CHECK_AND_FILL_VEC_XICTOXIPIPI(ptProng0);
94+
CHECK_AND_FILL_VEC_XICTOXIPIPI(ptProng1);
95+
CHECK_AND_FILL_VEC_XICTOXIPIPI(ptProng2);
96+
CHECK_AND_FILL_VEC_XICTOXIPIPI(chi2PCA);
97+
CHECK_AND_FILL_VEC_XICTOXIPIPI(decayLength);
98+
CHECK_AND_FILL_VEC_XICTOXIPIPI(decayLengthNormalised);
99+
CHECK_AND_FILL_VEC_XICTOXIPIPI(decayLengthXY);
100+
CHECK_AND_FILL_VEC_XICTOXIPIPI(decayLengthXYNormalised);
101+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cpa);
102+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cpaXY);
103+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cosPaXi);
104+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cosPaXYXi);
105+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cosPaLambda);
106+
CHECK_AND_FILL_VEC_XICTOXIPIPI(cosPaXYLambda);
107+
CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL(candidate, impactParameterXY0, impactParameter0);
108+
CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL(candidate, impactParameterXY1, impactParameter1);
109+
CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL(candidate, impactParameterXY2, impactParameter2);
110+
}
111+
}
112+
113+
return inputFeatures;
114+
}
115+
116+
protected:
117+
/// Method to fill the map of available input features
118+
void setAvailableInputFeatures()
119+
{
120+
MlResponse<TypeOutputScore>::mAvailableInputFeatures = {
121+
FILL_MAP_XICTOXIPIPI(ptProng0),
122+
FILL_MAP_XICTOXIPIPI(ptProng1),
123+
FILL_MAP_XICTOXIPIPI(ptProng2),
124+
FILL_MAP_XICTOXIPIPI(chi2PCA),
125+
FILL_MAP_XICTOXIPIPI(decayLength),
126+
FILL_MAP_XICTOXIPIPI(decayLengthNormalised),
127+
FILL_MAP_XICTOXIPIPI(decayLengthXY),
128+
FILL_MAP_XICTOXIPIPI(decayLengthXYNormalised),
129+
FILL_MAP_XICTOXIPIPI(cpa),
130+
FILL_MAP_XICTOXIPIPI(cpaXY),
131+
FILL_MAP_XICTOXIPIPI(cosPaXi),
132+
FILL_MAP_XICTOXIPIPI(cosPaXYXi),
133+
FILL_MAP_XICTOXIPIPI(cosPaLambda),
134+
FILL_MAP_XICTOXIPIPI(cosPaXYLambda),
135+
FILL_MAP_XICTOXIPIPI(impactParameterXY0),
136+
FILL_MAP_XICTOXIPIPI(impactParameterXY1),
137+
FILL_MAP_XICTOXIPIPI(impactParameterXY2)};
138+
}
139+
};
140+
141+
} // namespace o2::analysis
142+
143+
#undef FILL_MAP_XICTOXIPIPI
144+
#undef CHECK_AND_FILL_VEC_XICTOXIPIPI_FULL
145+
#undef CHECK_AND_FILL_VEC_XICTOXIPIPI
146+
147+
#endif // PWGHF_CORE_HFMLRESPONSEXICTOXIPIPI_H_

PWGHF/D2H/Tasks/taskXicToXiPiPi.cxx

Lines changed: 124 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
///
1616
/// \author Phil Lennart Stahlhut <[email protected]>, Heidelberg University
1717
/// \author Carolina Reetz <[email protected]>, Heidelberg University
18+
/// \author Jaeyoon Cho <[email protected]>, Inha University
19+
20+
#include <vector>
1821

1922
#include "CommonConstants/PhysicsConstants.h"
2023
#include "Framework/AnalysisTask.h"
@@ -42,7 +45,17 @@ struct HfTaskXicToXiPiPi {
4245
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_xic_to_xi_pi_pi::vecBinsPt}, "pT bin limits"};
4346
// MC checks
4447
Configurable<bool> checkDecayTypeMc{"checkDecayTypeMc", false, "Flag to enable DecayType histogram"};
45-
48+
// THnSparese for ML selection check
49+
Configurable<bool> enableTHn{"enableTHn", false, "Fill THnSparse for Xic"};
50+
ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {400, 0., 40.}, ""};
51+
ConfigurableAxis thnConfigAxisMass{"thnConfigAxisMass", {300, 1.8, 3.0}, ""};
52+
ConfigurableAxis thnConfigAxisPtProng{"thnConfigAxisPtProng", {300, 0., 30.}, ""};
53+
ConfigurableAxis thnConfigAxisChi2PCA{"thnConfigAxisChi2PCA", {200, 0., 20}, ""};
54+
ConfigurableAxis thnConfigAxisDecLength{"thnConfigAxisDecLength", {200, 0., 0.5}, ""};
55+
ConfigurableAxis thnConfigAxisDecLengthXY{"thnConfigAxisDecLengthXY", {200, 0., 0.5}, ""};
56+
ConfigurableAxis thnConfigAxisCPA{"thnConfigAxisCPA", {110, -1.1, 1.1}, ""};
57+
ConfigurableAxis thnConfigAxisBdtScoreBkg{"thnConfigAxisBdtScoreBkg", {100, 0., 1.}, ""};
58+
ConfigurableAxis thnConfigAxisBdtScoreSignal{"thnConfigAxisBdtScoreSignal", {100, 0., 1.}, ""};
4659
// Axis
4760
ConfigurableAxis binsDecLength{"binsDecLength", {200, 0., 0.5}, ""};
4861
ConfigurableAxis binsErrDecLength{"binsErrDecLength", {100, 0., 1.}, ""};
@@ -64,20 +77,15 @@ struct HfTaskXicToXiPiPi {
6477

6578
void init(InitContext const&)
6679
{
67-
if (!doprocessWithKFParticle && !doprocessWithDCAFitter && !doprocessMcWithKFParticle && !doprocessMcWithDCAFitter) {
68-
LOGF(fatal, "No process function enabled. Please enable one.");
69-
}
70-
if (doprocessWithKFParticle && doprocessWithDCAFitter) {
71-
LOGF(fatal, "Cannot enable doprocessWithKFParticle and doprocessWithDCAFitter at the same time. Please choose one.");
80+
std::array<bool, 8> doprocess{doprocessWithDCAFitter, doprocessWithKFParticle, doprocessWithDCAFitterAndML, doprocessWithKFParticleAndML, doprocessMcWithDCAFitter, doprocessMcWithKFParticle, doprocessMcWithDCAFitterAndML, doprocessMcWithKFParticleAndML};
81+
if ((std::accumulate(doprocess.begin(), doprocess.end(), 0)) == 0) {
82+
LOGP(fatal, "No process function enabled. Please enable one.");
7283
}
73-
if (doprocessMcWithKFParticle && doprocessMcWithDCAFitter) {
74-
LOGF(fatal, "Cannot enable doprocessMcWithKFParticle and doprocessMcWithDCAFitter at the same time. Please choose one.");
84+
if ((doprocessWithDCAFitter || doprocessWithDCAFitterAndML || doprocessMcWithDCAFitter || doprocessMcWithDCAFitterAndML) && (doprocessWithKFParticle || doprocessWithKFParticleAndML || doprocessMcWithKFParticle || doprocessMcWithKFParticleAndML)) {
85+
LOGP(fatal, "Cannot enable DCAFitter and KFParticle at the same time. Please choose one.");
7586
}
76-
if (doprocessWithKFParticle && doprocessMcWithDCAFitter) {
77-
LOGF(fatal, "Cannot enable doprocessWithKFParticle and doprocessMcWithDCAFitter at the same time. Please choose one.");
78-
}
79-
if (doprocessWithDCAFitter && doprocessMcWithKFParticle) {
80-
LOGF(fatal, "Cannot enable doprocessWithDCAFitter and doprocessMcWithKFParticle at the same time. Please choose one.");
87+
if ((doprocessWithDCAFitter || doprocessWithKFParticle || doprocessMcWithDCAFitter || doprocessMcWithKFParticle) && (doprocessWithDCAFitterAndML || doprocessWithKFParticleAndML || doprocessMcWithDCAFitterAndML || doprocessMcWithKFParticleAndML)) {
88+
LOGP(fatal, "Cannot enable process function with ML and process function without ML at the same time. Please choose one.");
8189
}
8290

8391
static const AxisSpec axisMassXic = {300, 1.8, 3.0, "inv. mass (GeV/#it{c}^{2})"};
@@ -120,14 +128,14 @@ struct HfTaskXicToXiPiPi {
120128
registry.add("hMassXiPi1", "#Xi^{#plus}_{c} candidates;inv. mass #Xi^{#mp} #pi^{#pm} (prong 1) (GeV/#it{c}^{2});#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisMassXiRes, axisPt}});
121129
registry.add("hMassXiPi2", "#Xi^{#plus}_{c} candidates;inv. mass #Xi^{#mp} #pi^{#pm} (prong 2) (GeV/#it{c}^{2});#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {axisMassXiRes, axisPt}});
122130

123-
if (doprocessWithKFParticle) {
131+
if (doprocessWithKFParticle || doprocessWithKFParticleAndML) {
124132
registry.add("hChi2geoXi", "#Xi^{#plus}_{c} candidates;#Xi^{#mp} #chi^{2}_{geo};entries", {HistType::kTH2F, {axisChi2, axisPt}});
125133
registry.add("hChi2geoLam", "#Xi^{#plus}_{c} candidates;#Lambda #chi^{2}_{geo};entries", {HistType::kTH2F, {axisChi2, axisPt}});
126134
registry.add("hChi2topoToPV", "#Xi^{#plus}_{c} candidates;#Xi^{#plus}_{c} candidate #chi^{2}_{topo} to PV;entries", {HistType::kTH2F, {axisChi2, axisPt}});
127135
registry.add("hChi2topoXiToXicPlus", "#Xi^{#plus}_{c} candidates;#Xi^{#mp} candidate #chi^{2}_{topo} to #Xi^{#plus}_{c};entries", {HistType::kTH2F, {axisChi2, axisPt}});
128136
}
129137

130-
if (doprocessMcWithKFParticle || doprocessMcWithDCAFitter) {
138+
if (doprocessMcWithKFParticle || doprocessMcWithDCAFitter || doprocessMcWithKFParticleAndML || doprocessMcWithDCAFitterAndML) {
131139
// MC reconstructed
132140
registry.add("hPtGenSig", "#Xi^{#plus}_{c} candidates (gen+rec);candidate #it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 30.}}});
133141
registry.add("hPtRecSig", "#Xi^{#plus}_{c} candidates (matched);candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 30.}}});
@@ -191,7 +199,7 @@ struct HfTaskXicToXiPiPi {
191199
registry.add("hMassXiPi2RecSig", "#Xi^{#plus}_{c} candidates (matched);inv. mass #Xi^{#mp} #pi^{#pm} (prong 2) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{300, 1.0, 2.0}, axisPt}});
192200
registry.add("hMassXiPi2RecBg", "#Xi^{#plus}_{c} candidates (unmatched);inv. mass #Xi^{#mp} #pi^{#pm} (prong 2) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{300, 1.0, 2.0}, axisPt}});
193201

194-
if (doprocessMcWithKFParticle) {
202+
if (doprocessMcWithKFParticle || doprocessMcWithDCAFitterAndML) {
195203
registry.add("hChi2topoToPVRecSig", "#Xi^{#plus}_{c} candidates (matched);#Xi^{#plus}_{c} candidate #chi^{2}_{topo} to PV;entries", {HistType::kTH2F, {axisChi2, axisPt}});
196204
registry.add("hChi2topoToPVRecBg", "#Xi^{#plus}_{c} candidates (unmatched);#Xi^{#plus}_{c} candidate #chi^{2}_{topo} to PV;entries", {HistType::kTH2F, {axisChi2, axisPt}});
197205
registry.add("hChi2geoXiRecSig", "#Xi^{#plus}_{c} candidates (matched);#Xi^{#mp} #chi^{2}_{geo};entries", {HistType::kTH2F, {axisChi2, axisPt}});
@@ -235,6 +243,50 @@ struct HfTaskXicToXiPiPi {
235243
registry.get<TH3>(HIST("hDecayTypeMc"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin]);
236244
}
237245
}
246+
247+
if (enableTHn) {
248+
const AxisSpec thnAxisPt{thnConfigAxisPt, "#it{p}_{T} (GeV/#it{c})"};
249+
const AxisSpec thnAxisMass{thnConfigAxisMass, "inv. mass #Xi^{#mp} #pi^{#pm} #pi^{#pm}"};
250+
const AxisSpec thnAxisChi2PCA{thnConfigAxisChi2PCA, "Chi2PCA to sec. vertex (cm)"};
251+
const AxisSpec thnAxisDecLength{thnConfigAxisDecLength, "decay length (cm)"};
252+
const AxisSpec thnAxisDecLengthXY{thnConfigAxisDecLengthXY, "decay length xy (cm)"};
253+
const AxisSpec thnAxisCPA{thnConfigAxisCPA, "#Xi^{#plus}_{c} candidate cosine of pointing angle"};
254+
const AxisSpec thnAxisBdtScoreBkg{thnConfigAxisBdtScoreBkg, "BDT score of background"};
255+
const AxisSpec thnAxisBdtScoreSignal{thnConfigAxisBdtScoreSignal, "BDT score of prompt Xic"};
256+
257+
if (doprocessWithKFParticleAndML || doprocessWithDCAFitterAndML || doprocessMcWithKFParticleAndML || doprocessMcWithDCAFitterAndML) {
258+
// with ML information
259+
registry.add("hXicToXiPiPiVarsWithML", "THnSparse for Xic with ML", HistType::kTHnSparseF, {thnAxisPt, thnAxisMass, thnAxisChi2PCA, thnAxisDecLength, thnAxisDecLengthXY, thnAxisCPA, thnAxisBdtScoreBkg, thnAxisBdtScoreSignal});
260+
} else {
261+
// without ML information
262+
registry.add("hXicToXiPiPiVars", "THnSparse for Xic", HistType::kTHnSparseF, {thnAxisPt, thnAxisMass, thnAxisChi2PCA, thnAxisDecLength, thnAxisDecLengthXY, thnAxisCPA});
263+
}
264+
} // enable THnSpare
265+
266+
} // end init
267+
268+
/// Fill THnSpare depending on whether ML selection is used
269+
// \param candidate is candidate
270+
template <bool useMl, typename T1>
271+
void fillTHnSparse(const T1& candidate)
272+
{
273+
if (!enableTHn) {
274+
return;
275+
}
276+
277+
if constexpr (useMl) {
278+
// with ML information
279+
double outputBkg = -99.;
280+
double outputPrompt = -99.;
281+
if (candidate.mlProbXicToXiPiPi().size() > 0) {
282+
outputBkg = candidate.mlProbXicToXiPiPi()[0];
283+
outputPrompt = candidate.mlProbXicToXiPiPi()[1];
284+
}
285+
registry.get<THnSparse>(HIST("hXicToXiPiPiVarsWithML"))->Fill(candidate.pt(), candidate.invMassXic(), candidate.chi2PCA(), candidate.decayLength(), candidate.decayLengthXY(), candidate.cpa(), outputBkg, outputPrompt);
286+
} else {
287+
// without ML information
288+
registry.get<THnSparse>(HIST("hXicToXiPiPiVars"))->Fill(candidate.pt(), candidate.invMassXic(), candidate.chi2PCA(), candidate.decayLength(), candidate.decayLengthXY(), candidate.cpa());
289+
}
238290
}
239291

240292
/// Selection of Xic daughter in geometrical acceptance
@@ -248,7 +300,7 @@ struct HfTaskXicToXiPiPi {
248300
}
249301

250302
/// Function to fill histograms
251-
template <bool useKfParticle, typename TCanTable>
303+
template <bool useKfParticle, bool useMl, typename TCanTable>
252304
void fillHistograms(TCanTable const& candidates)
253305
{
254306
for (const auto& candidate : candidates) {
@@ -299,11 +351,20 @@ struct HfTaskXicToXiPiPi {
299351
registry.fill(HIST("hChi2geoXi"), candidate.kfCascadeChi2(), ptCandXic);
300352
registry.fill(HIST("hChi2geoLam"), candidate.kfV0Chi2(), ptCandXic);
301353
}
354+
355+
// fill THnSparse
356+
if (enableTHn) {
357+
if constexpr (useMl) {
358+
fillTHnSparse<true>(candidate);
359+
} else {
360+
fillTHnSparse<false>(candidate);
361+
}
362+
}
302363
} // candidate loop
303364
}
304365

305366
/// Function for MC analysis and histogram filling
306-
template <bool useKfParticle, typename TCandTable>
367+
template <bool useKfParticle, bool useMl, typename TCandTable>
307368
void fillHistogramsMc(TCandTable const& candidates,
308369
soa::Join<aod::McParticles, aod::HfCandXicMcGen> const& mcParticles,
309370
aod::TracksWMc const&)
@@ -413,6 +474,15 @@ struct HfTaskXicToXiPiPi {
413474
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_xic_to_xi_pi_pi::DecayType::NDecayType, candidate.invMassXic(), ptCandXic);
414475
}
415476
}
477+
// fill THnSparse
478+
if (enableTHn) {
479+
if constexpr (useMl) {
480+
fillTHnSparse<true>(candidate);
481+
} else {
482+
fillTHnSparse<false>(candidate);
483+
}
484+
}
485+
416486
} // rec
417487

418488
// MC gen. level
@@ -473,24 +543,38 @@ struct HfTaskXicToXiPiPi {
473543
} // gen
474544
}
475545

546+
/// Data analysis and fill histograms
476547
void processWithDCAFitter(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfSelXicToXiPiPi>> const& candidates)
477548
{
478-
fillHistograms<false>(candidates);
549+
fillHistograms<false, false>(candidates);
479550
}
480551
PROCESS_SWITCH(HfTaskXicToXiPiPi, processWithDCAFitter, "Process data with DCAFitter", true);
481552

482553
void processWithKFParticle(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfCandXicKF, aod::HfSelXicToXiPiPi>> const& candidates)
483554
{
484-
fillHistograms<true>(candidates);
555+
fillHistograms<true, false>(candidates);
485556
}
486557
PROCESS_SWITCH(HfTaskXicToXiPiPi, processWithKFParticle, "Process data with KFParticle", false);
487558

559+
/// Data analysis and fill histograms with ML
560+
void processWithDCAFitterAndML(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfSelXicToXiPiPi, aod::HfMlXicToXiPiPi>> const& candidates)
561+
{
562+
fillHistograms<false, true>(candidates);
563+
}
564+
PROCESS_SWITCH(HfTaskXicToXiPiPi, processWithDCAFitterAndML, "Process data with DCAFitter and ML approach", false);
565+
566+
void processWithKFParticleAndML(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfCandXicKF, aod::HfSelXicToXiPiPi, aod::HfMlXicToXiPiPi>> const& candidates)
567+
{
568+
fillHistograms<true, true>(candidates);
569+
}
570+
PROCESS_SWITCH(HfTaskXicToXiPiPi, processWithKFParticleAndML, "Process data with KFParticle and ML approach", false);
571+
488572
/// MC analysis and fill histograms
489573
void processMcWithDCAFitter(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfSelXicToXiPiPi, aod::HfCandXicMcRec>> const& candidates,
490574
soa::Join<aod::McParticles, aod::HfCandXicMcGen> const& mcParticles,
491575
aod::TracksWMc const& tracksWMc)
492576
{
493-
fillHistogramsMc<false>(candidates, mcParticles, tracksWMc);
577+
fillHistogramsMc<false, false>(candidates, mcParticles, tracksWMc);
494578
}
495579
PROCESS_SWITCH(HfTaskXicToXiPiPi, processMcWithDCAFitter, "Process MC with DCAFitter", false);
496580

@@ -499,9 +583,27 @@ struct HfTaskXicToXiPiPi {
499583
soa::Join<aod::McParticles, aod::HfCandXicMcGen> const& mcParticles,
500584
aod::TracksWMc const& tracksWMc)
501585
{
502-
fillHistogramsMc<true>(candidates, mcParticles, tracksWMc);
586+
fillHistogramsMc<true, false>(candidates, mcParticles, tracksWMc);
503587
}
504588
PROCESS_SWITCH(HfTaskXicToXiPiPi, processMcWithKFParticle, "Process MC with KFParticle", false);
589+
590+
// MC analysis and fill histograms with ML
591+
void processMcWithDCAFitterAndML(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfSelXicToXiPiPi, aod::HfMlXicToXiPiPi, aod::HfCandXicMcRec>> const& candidates,
592+
soa::Join<aod::McParticles, aod::HfCandXicMcGen> const& mcParticles,
593+
aod::TracksWMc const& tracksWMc)
594+
{
595+
fillHistogramsMc<false, true>(candidates, mcParticles, tracksWMc);
596+
}
597+
PROCESS_SWITCH(HfTaskXicToXiPiPi, processMcWithDCAFitterAndML, "Process MC with DCAFitter and ML approach", false);
598+
599+
void processMcWithKFParticleAndML(soa::Filtered<soa::Join<aod::HfCandXic, aod::HfCandXicKF, aod::HfSelXicToXiPiPi, aod::HfMlXicToXiPiPi, aod::HfCandXicMcRec>> const& candidates,
600+
soa::Join<aod::McParticles, aod::HfCandXicMcGen> const& mcParticles,
601+
aod::TracksWMc const& tracksWMc)
602+
{
603+
fillHistogramsMc<true, true>(candidates, mcParticles, tracksWMc);
604+
}
605+
PROCESS_SWITCH(HfTaskXicToXiPiPi, processMcWithKFParticleAndML, "Process MC with KFParticle and ML approach", false);
606+
505607
}; // struct
506608

507609
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)