Skip to content

Commit cba0a9b

Browse files
authored
[PWGHF] Minor fixes in charm resonance workflow (#11972)
1 parent 04cbec3 commit cba0a9b

File tree

3 files changed

+180
-82
lines changed

3 files changed

+180
-82
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,8 @@ DECLARE_SOA_TABLE(HfRed2PrNoTrks, "AOD", "HFRED2PRNOTRK", //! Table with 2 prong
13271327
hf_track_vars_reduced::EtaProng0<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0>,
13281328
hf_track_vars_reduced::EtaProng1<hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
13291329
hf_reso_2_prong::PVector<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1330+
hf_cand::PVectorProng0<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0>,
1331+
hf_cand::PVectorProng1<hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
13301332
hf_reso_2_prong::Pt<hf_cand::PxProng0, hf_cand::PxProng1, hf_cand::PyProng0, hf_cand::PyProng1>,
13311333
// InvMasses
13321334
hf_cand_dstar::InvMassD0<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,

PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx

Lines changed: 125 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
/// \brief Reconstruction of Resonance candidates
1414
///
1515
/// \author Luca Aglietta <luca.aglietta@cern.ch>, Università degli Studi di Torino
16+
/// \author Antonio Palasciano <antonio.palasciano@cern.ch>, INFN Bari
17+
1618
#include "PWGHF/D2H/Core/SelectorCutsRedDataFormat.h"
1719
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
1820
#include "PWGHF/Utils/utilsAnalysis.h"
@@ -64,7 +66,14 @@ enum DecayChannel : uint8_t {
6466
Ds2StarToDplusK0s,
6567
XcToDplusLambda,
6668
LambdaDminus,
67-
DstarTrack
69+
DstarTrack,
70+
D0Track
71+
};
72+
73+
enum DType : uint8_t {
74+
Dplus = 1,
75+
Dstar,
76+
D0
6877
};
6978

7079
enum V0Type : uint8_t {
@@ -73,6 +82,11 @@ enum V0Type : uint8_t {
7382
AntiLambda
7483
};
7584

85+
enum D0SelectionType : uint8_t {
86+
SelectedD0 = 0,
87+
SelectedD0Bar
88+
};
89+
7690
enum DecayTypeMc : uint8_t {
7791
Ds1ToDStarK0ToD0PiK0s = 1,
7892
Ds2StarToDplusK0sToPiKaPiPiPi,
@@ -84,7 +98,7 @@ enum DecayTypeMc : uint8_t {
8498
};
8599

86100
const int nBinsPt = 7;
87-
constexpr double binsPt[nBinsPt + 1] = {
101+
constexpr double BinsPt[nBinsPt + 1] = {
88102
1.,
89103
2.,
90104
4.,
@@ -93,7 +107,7 @@ constexpr double binsPt[nBinsPt + 1] = {
93107
12.,
94108
24.,
95109
1000.};
96-
auto vecBinsPt = std::vector<double>{binsPt, binsPt + nBinsPt + 1};
110+
auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + nBinsPt + 1};
97111

98112
struct HfCandidateCreatorCharmResoReduced {
99113
// Produces: Tables with resonance info
@@ -111,36 +125,41 @@ struct HfCandidateCreatorCharmResoReduced {
111125
Configurable<bool> activateQA{"activateQA", false, "Flag to enable QA histogram"};
112126
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{vecBinsPt}, "Histogram pT bin limits"};
113127
// Daughters selection cuts
114-
Configurable<LabeledArray<double>> cutsD{"cutsDdaughter", {hf_cuts_d_daughter::Cuts[0], hf_cuts_d_daughter::NBinsPt, hf_cuts_d_daughter::NCutVars, hf_cuts_d_daughter::labelsPt, hf_cuts_d_daughter::labelsCutVar}, "D daughter selections"};
128+
Configurable<LabeledArray<double>> cutsDDaughter{"cutsDDaughter", {hf_cuts_d_daughter::Cuts[0], hf_cuts_d_daughter::NBinsPt, hf_cuts_d_daughter::NCutVars, hf_cuts_d_daughter::labelsPt, hf_cuts_d_daughter::labelsCutVar}, "D daughter selections"};
115129
Configurable<std::vector<double>> binsPtD{"binsPtD", std::vector<double>{hf_cuts_d_daughter::vecBinsPt}, "pT bin limits for D daughter cuts"};
116-
Configurable<LabeledArray<double>> cutsV0{"cutsV0daughter", {hf_cuts_v0_daughter::Cuts[0], hf_cuts_v0_daughter::NBinsPt, hf_cuts_v0_daughter::NCutVars, hf_cuts_v0_daughter::labelsPt, hf_cuts_v0_daughter::labelsCutVar}, "V0 daughter selections"};
130+
Configurable<LabeledArray<double>> cutsV0Daughter{"cutsV0Daughter", {hf_cuts_v0_daughter::Cuts[0], hf_cuts_v0_daughter::NBinsPt, hf_cuts_v0_daughter::NCutVars, hf_cuts_v0_daughter::labelsPt, hf_cuts_v0_daughter::labelsCutVar}, "V0 daughter selections"};
117131
Configurable<std::vector<double>> binsPtV0{"binsPtV0", std::vector<double>{hf_cuts_v0_daughter::vecBinsPt}, "pT bin limits for V0 daughter cuts"};
118132

119133
// Configurables for ME
120134
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "Number of events mixed in ME process"};
121135
Configurable<int> numberEventsToSkip{"numberEventsToSkip", -1, "Number of events to Skip in ME process"};
122-
ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 45., 60., 75., 95, 250}, "event multiplicity pools (PV contributors for now)"};
123-
ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -4, -1, 1, 4, 10.0}, "z vertex position pools"};
124136

125-
using HfRed3PrNoTrksWithMl = soa::Join<aod::HfRed3PrNoTrks, aod::HfRed3ProngsMl>;
137+
SliceCache cache;
126138

127-
// Partition of V0 candidates based on v0Type
128-
Partition<aod::HfRedVzeros> candidatesK0s = aod::hf_reso_v0::v0Type == (uint8_t)1 || aod::hf_reso_v0::v0Type == (uint8_t)3 || aod::hf_reso_v0::v0Type == (uint8_t)5;
129-
Partition<aod::HfRedVzeros> candidatesLambda = aod::hf_reso_v0::v0Type == (uint8_t)2 || aod::hf_reso_v0::v0Type == (uint8_t)4;
139+
using HfRed3PrNoTrksWithMl = soa::Join<aod::HfRed3PrNoTrks, aod::HfRed3ProngsMl>;
140+
using HfRed2PrNoTrksWithMl = soa::Join<aod::HfRed2PrNoTrks, aod::HfRed2ProngsMl>;
130141

131-
SliceCache cache;
132142
Preslice<aod::HfRedVzeros> candsV0PerCollision = aod::hf_track_index_reduced::hfRedCollisionId;
133143
Preslice<aod::HfRedTrkNoParams> candsTrackPerCollision = aod::hf_track_index_reduced::hfRedCollisionId;
134144
Preslice<aod::HfRed3PrNoTrks> candsDPerCollision = hf_track_index_reduced::hfRedCollisionId;
145+
Preslice<aod::HfRed2PrNoTrks> candsD0PerCollision = hf_track_index_reduced::hfRedCollisionId;
135146
Preslice<HfRed3PrNoTrksWithMl> candsDPerCollisionWithMl = hf_track_index_reduced::hfRedCollisionId;
147+
Preslice<HfRed2PrNoTrksWithMl> candsD0PerCollisionWithMl = hf_track_index_reduced::hfRedCollisionId;
148+
149+
// Partition of V0 candidates based on v0Type
150+
Partition<aod::HfRedVzeros> candidatesK0s = aod::hf_reso_v0::v0Type == (uint8_t)1 || aod::hf_reso_v0::v0Type == (uint8_t)3 || aod::hf_reso_v0::v0Type == (uint8_t)5;
151+
Partition<aod::HfRedVzeros> candidatesLambda = aod::hf_reso_v0::v0Type == (uint8_t)2 || aod::hf_reso_v0::v0Type == (uint8_t)4;
152+
153+
ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 45., 60., 75., 95, 250}, "event multiplicity pools (PV contributors for now)"};
154+
ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -4, -1, 1, 4, 10.0}, "z vertex position pools"};
136155

137156
HistogramRegistry registry{"registry"};
138157

139158
void init(InitContext const&)
140159
{
141160
// check that only one process function is enabled
142-
std::array<bool, 14> doprocess{doprocessDs2StarToDplusK0s, doprocessDs2StarToDplusK0sWithMl, doprocessDs1ToDstarK0s, doprocessDs1ToDstarK0sWithMl, doprocessDs1ToDstarK0sMixedEvent, doprocessDs1ToDstarK0sMixedEventWithMl, doprocessDs2StarToDplusK0sMixedEventWithMl,
143-
doprocessXcToDplusLambda, doprocessXcToDplusLambdaWithMl, doprocessLambdaDminus, doprocessLambdaDminusWithMl, doprocessDstarTrack, doprocessDstarTrackWithMl};
161+
std::array<bool, 16> doprocess{doprocessDs2StarToDplusK0s, doprocessDs2StarToDplusK0sWithMl, doprocessDs1ToDstarK0s, doprocessDs1ToDstarK0sWithMl, doprocessDs1ToDstarK0sMixedEvent, doprocessDs1ToDstarK0sMixedEventWithMl, doprocessDs2StarToDplusK0sMixedEventWithMl,
162+
doprocessXcToDplusLambda, doprocessXcToDplusLambdaWithMl, doprocessLambdaDminus, doprocessLambdaDminusWithMl, doprocessDstarTrack, doprocessDstarTrackWithMl, doprocessD0Track, doprocessD0TrackWithMl};
144163
if ((std::accumulate(doprocess.begin(), doprocess.end(), 0)) != 1) {
145164
LOGP(fatal, "Only one process function should be enabled! Please check your configuration!");
146165
}
@@ -152,6 +171,8 @@ struct HfCandidateCreatorCharmResoReduced {
152171
registry.add("hMassXcRes", "XcRes candidates; m_XcRes (GeV/#it{c}^{2}) ;entries", {HistType::kTH2F, {{300, 1.1, 1.4}, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
153172
registry.add("hMassLambdaDminus", "LambdaDminus candidates; m_LambdaDminus (GeV/#it{c}^{2}) ;entries", {HistType::kTH2F, {{300, 1.1, 1.4}, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
154173
registry.add("hMassDstarTrack", "DstarTrack candidates; m_DstarTrack (GeV/#it{c}^{2}) ;entries", {HistType::kTH2F, {{100, 0.9, 1.4}, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
174+
registry.add("hMassD0Track", "D0Track candidates; m_D0Track (GeV/#it{c}^{2}) ;entries", {HistType::kTH2F, {{100, 0.8, 1.3}, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
175+
registry.add("hMassD0BarTrack", "D0Track candidates; m_D0Track (GeV/#it{c}^{2}) ;entries", {HistType::kTH2F, {{100, 0.8, 1.3}, {(std::vector<double>)binsPt, "#it{p}_{T} (GeV/#it{c})"}}});
155176
if (doprocessDs1ToDstarK0sMixedEvent) {
156177
registry.add("hNPvContCorr", "Collision number of PV contributors ; N contrib ; N contrib", {HistType::kTH2F, {{100, 0, 250}, {100, 0, 250}}});
157178
registry.add("hZvertCorr", "Collision Z Vtx ; z PV [cm] ; z PV [cm]", {HistType::kTH2F, {{120, -12., 12.}, {120, -12., 12.}}});
@@ -184,24 +205,31 @@ struct HfCandidateCreatorCharmResoReduced {
184205
if (ptBin == -1) {
185206
return false;
186207
}
187-
if (channel == DecayChannel::Ds2StarToDplusK0s || channel == DecayChannel::XcToDplusLambda || channel == DecayChannel::LambdaDminus) {
208+
if constexpr (channel == DecayChannel::Ds2StarToDplusK0s || channel == DecayChannel::XcToDplusLambda || channel == DecayChannel::LambdaDminus) {
188209
invMassD = candD.invMassDplus();
189-
} else if (channel == DecayChannel::Ds1ToDstarK0s || channel == DecayChannel::DstarTrack) {
210+
} else if constexpr (channel == DecayChannel::Ds1ToDstarK0s || channel == DecayChannel::DstarTrack) {
190211
if (candD.dType() > 0)
191212
invMassD = candD.invMassDstar() - candD.invMassD0();
192213
else
193214
invMassD = candD.invMassAntiDstar() - candD.invMassD0Bar();
194215
}
195216
// invariant mass selection
196217
if (!keepSideBands) {
197-
if (invMassD < cutsD->get(ptBin, "invMassSignalLow") || invMassD > cutsD->get(ptBin, "invMassSignalHigh")) {
198-
return false;
218+
if constexpr (channel == DecayChannel::D0Track) {
219+
if ((candD.invMassD0() < cutsDDaughter->get(ptBin, "invMassSignalLow") || candD.invMassD0() > cutsDDaughter->get(ptBin, "invMassSignalHigh")) &&
220+
(candD.invMassD0Bar() < cutsDDaughter->get(ptBin, "invMassSignalLow") || candD.invMassD0Bar() > cutsDDaughter->get(ptBin, "invMassSignalHigh"))) {
221+
return false;
222+
}
223+
} else {
224+
if (invMassD < cutsDDaughter->get(ptBin, "invMassSignalLow") || invMassD > cutsDDaughter->get(ptBin, "invMassSignalHigh")) {
225+
return false;
226+
}
199227
}
200228
} else {
201-
if ((invMassD < cutsD->get(ptBin, "invMassLeftSBLow")) ||
202-
(invMassD > cutsD->get(ptBin, "invMassLeftSBHigh") && invMassD < cutsD->get(ptBin, "invMassSignalLow")) ||
203-
(invMassD > cutsD->get(ptBin, "invMassSignalHigh") && invMassD < cutsD->get(ptBin, "invMassRightSBLow")) ||
204-
(invMassD > cutsD->get(ptBin, "invMassRightSBHigh"))) {
229+
if ((invMassD < cutsDDaughter->get(ptBin, "invMassLeftSBLow")) ||
230+
(invMassD > cutsDDaughter->get(ptBin, "invMassLeftSBHigh") && invMassD < cutsDDaughter->get(ptBin, "invMassSignalLow")) ||
231+
(invMassD > cutsDDaughter->get(ptBin, "invMassSignalHigh") && invMassD < cutsDDaughter->get(ptBin, "invMassRightSBLow")) ||
232+
(invMassD > cutsDDaughter->get(ptBin, "invMassRightSBHigh"))) {
205233
return false;
206234
}
207235
}
@@ -244,11 +272,11 @@ struct HfCandidateCreatorCharmResoReduced {
244272
}
245273
}
246274
// selection on V0 candidate mass
247-
if ((invMassV0 - massV0) > cutsV0->get(ptBin, "invMassLow") && (massV0 - invMassV0) < cutsV0->get(ptBin, "invMassLow")) {
275+
if ((invMassV0 - massV0) > cutsV0Daughter->get(ptBin, "invMassLow") && (massV0 - invMassV0) < cutsV0Daughter->get(ptBin, "invMassLow")) {
248276
return false;
249277
}
250278
// selection on kinematics and topology
251-
if (candV0.dca() > cutsV0->get(ptBin, "dcaMax") || candV0.cpa() < cutsV0->get(ptBin, "cpaMin") || candV0.v0Radius() < cutsV0->get(ptBin, "radiusMin")) {
279+
if (candV0.dca() > cutsV0Daughter->get(ptBin, "dcaMax") || candV0.cpa() < cutsV0Daughter->get(ptBin, "cpaMin") || candV0.v0Radius() < cutsV0Daughter->get(ptBin, "radiusMin")) {
252280
return false;
253281
}
254282
return true;
@@ -273,34 +301,47 @@ struct HfCandidateCreatorCharmResoReduced {
273301
}
274302
float invMassD{0.};
275303
float invMassD0{0.};
276-
if (std::abs(candD.dType()) == 1)
277-
invMassD = candD.invMassDplus();
278-
if (candD.dType() == 2) {
279-
invMassD = candD.invMassDstar();
280-
invMassD0 = candD.invMassD0();
281-
}
282-
if (candD.dType() == -2) {
283-
invMassD = candD.invMassAntiDstar();
284-
invMassD0 = candD.invMassD0Bar();
304+
std::array<std::array<float, 3>, 3> pVectorCharmProngs;
305+
if constexpr (channel != DecayChannel::D0Track) {
306+
if (std::abs(candD.dType()) == DType::Dplus)
307+
invMassD = candD.invMassDplus();
308+
if (candD.dType() == DType::Dstar) {
309+
invMassD = candD.invMassDstar();
310+
invMassD0 = candD.invMassD0();
311+
}
312+
if (candD.dType() == (-1) * DType::Dstar) {
313+
invMassD = candD.invMassAntiDstar();
314+
invMassD0 = candD.invMassD0Bar();
315+
}
316+
pVectorCharmProngs = {candD.pVectorProng0(), candD.pVectorProng1(), candD.pVectorProng2()};
317+
} else {
318+
pVectorCharmProngs = {candD.pVectorProng0(), candD.pVectorProng1(), {0.}};
285319
}
286320
std::array<float, 3> pVecD = {candD.px(), candD.py(), candD.pz()};
287321

288322
// loop on V0 or track candidates
289323
bool alreadyCounted{false};
290324
for (const auto& candV0Tr : candsV0Tr) {
291325
if (rejectDV0PairsWithCommonDaughter) {
292-
const std::array<int, 3> dDaughtersIDs = {candD.prong0Id(), candD.prong1Id(), candD.prong2Id()};
293-
if constexpr (channel == DecayChannel::DstarTrack) {
326+
if constexpr (channel == DecayChannel::D0Track) {
327+
const std::array<int, 2> dDaughtersIDs = {candD.prong0Id(), candD.prong1Id()};
294328
if (std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.globalIndex()) != dDaughtersIDs.end()) {
295329
continue;
296330
}
297331
} else {
298-
if (std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.prong0Id()) != dDaughtersIDs.end() || std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.prong1Id()) != dDaughtersIDs.end()) {
299-
continue;
332+
const std::array<int, 3> dDaughtersIDs = {candD.prong0Id(), candD.prong1Id(), candD.prong2Id()};
333+
if constexpr (channel == DecayChannel::DstarTrack) {
334+
if (std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.globalIndex()) != dDaughtersIDs.end()) {
335+
continue;
336+
}
337+
} else {
338+
if (std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.prong0Id()) != dDaughtersIDs.end() || std::find(dDaughtersIDs.begin(), dDaughtersIDs.end(), candV0Tr.prong1Id()) != dDaughtersIDs.end()) {
339+
continue;
340+
}
300341
}
301342
}
302343
}
303-
if constexpr (channel != DecayChannel::DstarTrack) {
344+
if constexpr ((channel != DecayChannel::DstarTrack) && (channel != DecayChannel::D0Track)) {
304345
if (!isV0Selected<channel>(candV0Tr, candD)) {
305346
continue;
306347
}
@@ -313,7 +354,6 @@ struct HfCandidateCreatorCharmResoReduced {
313354
float invMassReso{0.};
314355
float invMassV0{0.};
315356
std::array<float, 3> pVecV0Tr = {candV0Tr.px(), candV0Tr.py(), candV0Tr.pz()};
316-
std::array<std::array<float, 3>, 3> pVectorCharmProngs = {candD.pVectorProng0(), candD.pVectorProng1(), candD.pVectorProng2()};
317357
float ptReso = RecoDecay::pt(RecoDecay::sumOfVec(pVecV0Tr, pVecD));
318358

319359
if constexpr (channel == DecayChannel::DstarTrack) {
@@ -323,6 +363,17 @@ struct HfCandidateCreatorCharmResoReduced {
323363
invMassReso = RecoDecay::m(std::array{pVectorCharmProngs[1], pVectorCharmProngs[0], pVectorCharmProngs[2], pVecV0Tr}, std::array{MassPiPlus, MassKPlus, MassPiPlus, MassProton});
324364
}
325365
registry.fill(HIST("hMassDstarTrack"), invMassReso - invMassD, ptReso);
366+
} else if constexpr (channel == DecayChannel::D0Track) {
367+
if (TESTBIT(candD.selFlagD0(), D0SelectionType::SelectedD0)) {
368+
invMassD = candD.invMassD0();
369+
invMassReso = RecoDecay::m(std::array{pVectorCharmProngs[0], pVectorCharmProngs[1], pVecV0Tr}, std::array{MassPiPlus, MassKPlus, MassProton});
370+
registry.fill(HIST("hMassD0Track"), invMassReso - invMassD, ptReso);
371+
}
372+
if (TESTBIT(candD.selFlagD0(), D0SelectionType::SelectedD0Bar)) {
373+
invMassD = candD.invMassD0Bar();
374+
invMassReso = RecoDecay::m(std::array{pVectorCharmProngs[1], pVectorCharmProngs[0], pVecV0Tr}, std::array{MassPiPlus, MassKPlus, MassProton});
375+
registry.fill(HIST("hMassD0BarTrack"), invMassReso - invMassD, ptReso);
376+
}
326377
} else {
327378
switch (channel) {
328379
case DecayChannel::Ds1ToDstarK0s:
@@ -367,6 +418,11 @@ struct HfCandidateCreatorCharmResoReduced {
367418
candV0Tr.px(), candV0Tr.py(), candV0Tr.pz(),
368419
invMassReso,
369420
invMassD - invMassD0);
421+
} else if constexpr (channel == DecayChannel::D0Track) {
422+
rowCandidateResoTrack(pVecD[0], pVecD[1], pVecD[2],
423+
candV0Tr.px(), candV0Tr.py(), candV0Tr.pz(),
424+
invMassReso,
425+
0);
370426
} else {
371427
rowCandidateReso(pVecD[0], pVecD[1], pVecD[2],
372428
pVecV0Tr[0], pVecV0Tr[1], pVecV0Tr[2],
@@ -413,13 +469,14 @@ struct HfCandidateCreatorCharmResoReduced {
413469
// Retrieve D and V0 informations
414470
float invMassD{0.};
415471
float invMassD0{0.};
416-
if (std::abs(bachD.dType()) == 1)
472+
if (std::abs(bachD.dType()) == DType::Dplus) {
417473
invMassD = bachD.invMassDplus();
418-
if (bachD.dType() == 2) {
474+
}
475+
if (bachD.dType() == DType::Dstar) {
419476
invMassD = bachD.invMassDstar();
420477
invMassD0 = bachD.invMassD0();
421478
}
422-
if (bachD.dType() == -2) {
479+
if (bachD.dType() == (-1) * DType::Dstar) {
423480
invMassD = bachD.invMassAntiDstar();
424481
invMassD0 = bachD.invMassD0Bar();
425482
}
@@ -642,6 +699,32 @@ struct HfCandidateCreatorCharmResoReduced {
642699
}
643700
PROCESS_SWITCH(HfCandidateCreatorCharmResoReduced, processDstarTrackWithMl, "Process DStar candidates with Ml info", false);
644701

702+
void processD0Track(aod::HfRedCollisions const& collisions,
703+
aod::HfRed2PrNoTrks const& candsD,
704+
aod::HfRedTrkNoParams const& candidatesTrack)
705+
{
706+
for (const auto& collision : collisions) {
707+
auto thisCollId = collision.globalIndex();
708+
auto candsDThisColl = candsD.sliceBy(candsD0PerCollision, thisCollId);
709+
auto trackThisColl = candidatesTrack.sliceBy(candsTrackPerCollision, thisCollId);
710+
runCandidateCreation<false, DecayChannel::D0Track>(collision, candsDThisColl, trackThisColl);
711+
}
712+
}
713+
PROCESS_SWITCH(HfCandidateCreatorCharmResoReduced, processD0Track, "Process D0 candidates without Ml info", false);
714+
715+
void processD0TrackWithMl(aod::HfRedCollisions const& collisions,
716+
HfRed2PrNoTrksWithMl const& candsD,
717+
aod::HfRedTrkNoParams const& candidatesTrack)
718+
{
719+
for (const auto& collision : collisions) {
720+
auto thisCollId = collision.globalIndex();
721+
auto candsDThisColl = candsD.sliceBy(candsD0PerCollisionWithMl, thisCollId);
722+
auto trackThisColl = candidatesTrack.sliceBy(candsTrackPerCollision, thisCollId);
723+
runCandidateCreation<true, DecayChannel::D0Track>(collision, candsDThisColl, trackThisColl);
724+
}
725+
}
726+
PROCESS_SWITCH(HfCandidateCreatorCharmResoReduced, processD0TrackWithMl, "Process D0 candidates with Ml info", false);
727+
645728
}; // struct HfCandidateCreatorCharmResoReduced
646729

647730
struct HfCandidateCreatorCharmResoReducedExpressions {

0 commit comments

Comments
 (0)