Skip to content

Commit 3f1d315

Browse files
committed
Fix tree creator output consistency
1 parent 26c07a1 commit 3f1d315

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

PWGHF/TableProducer/treeCreatorD0ToKPi.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ struct HfTreeCreatorD0ToKPi {
289289

290290
template <bool ApplyMl, typename T>
291291
auto fillTable(const T& candidate, int candFlag, double invMass, double topoChi2,
292-
double ct, double y, double e, int8_t flagMc, int8_t flagMcDecay, int8_t origin, int8_t flagBmother)
292+
double ct, double y, double e, int8_t flagMc, int8_t flagMcDecay, int8_t origin, int8_t pdgBmother)
293293
{
294294
if (fillCandidateLiteTable) {
295295
rowCandidateLite(
@@ -329,7 +329,7 @@ struct HfTreeCreatorD0ToKPi {
329329
flagMc,
330330
flagMcDecay,
331331
origin,
332-
flagBmother);
332+
pdgBmother);
333333
} else {
334334
double cosThetaStar = candFlag == 0 ? HfHelper::cosThetaStarD0(candidate) : HfHelper::cosThetaStarD0bar(candidate);
335335
rowCandidateFull(
@@ -393,7 +393,7 @@ struct HfTreeCreatorD0ToKPi {
393393
flagMc,
394394
flagMcDecay,
395395
origin,
396-
flagBmother);
396+
pdgBmother);
397397
}
398398
if constexpr (ApplyMl) {
399399
if (candFlag == 0) {
@@ -453,10 +453,10 @@ struct HfTreeCreatorD0ToKPi {
453453
massD0bar = HfHelper::invMassD0barToKPi(candidate);
454454
}
455455
if (candidate.isSelD0()) {
456-
fillTable<ApplyMl>(candidate, 0, massD0, topolChi2PerNdf, ctD, yD, eD, 0, 0, 0, -1);
456+
fillTable<ApplyMl>(candidate, 0, massD0, topolChi2PerNdf, ctD, yD, eD, 0, 0, 0, 0);
457457
}
458458
if (candidate.isSelD0bar()) {
459-
fillTable<ApplyMl>(candidate, 1, massD0bar, topolChi2PerNdf, ctD, yD, eD, 0, 0, 0, -1);
459+
fillTable<ApplyMl>(candidate, 1, massD0bar, topolChi2PerNdf, ctD, yD, eD, 0, 0, 0, 0);
460460
}
461461
}
462462
}
@@ -554,10 +554,10 @@ struct HfTreeCreatorD0ToKPi {
554554
massD0bar = HfHelper::invMassD0barToKPi(candidate);
555555
}
556556
if (candidate.isSelD0()) {
557-
fillTable<ApplyMl>(candidate, 0, massD0, topolChi2PerNdf, ctD, yD, eD, candidate.flagMcMatchRec(), candidate.flagMcDecayChanRec(), candidate.originMcRec(), o2::analysis::getBHadMotherFlag(candidate.pdgBhadMotherPart()));
557+
fillTable<ApplyMl>(candidate, 0, massD0, topolChi2PerNdf, ctD, yD, eD, candidate.flagMcMatchRec(), candidate.flagMcDecayChanRec(), candidate.originMcRec(), candidate.pdgBhadMotherPart());
558558
}
559559
if (candidate.isSelD0bar()) {
560-
fillTable<ApplyMl>(candidate, 1, massD0bar, topolChi2PerNdf, ctD, yD, eD, candidate.flagMcMatchRec(), candidate.flagMcDecayChanRec(), candidate.originMcRec(), o2::analysis::getBHadMotherFlag(candidate.pdgBhadMotherPart()));
560+
fillTable<ApplyMl>(candidate, 1, massD0bar, topolChi2PerNdf, ctD, yD, eD, candidate.flagMcMatchRec(), candidate.flagMcDecayChanRec(), candidate.originMcRec(), candidate.pdgBhadMotherPart());
561561
}
562562
}
563563

PWGHF/TableProducer/treeCreatorDplusToPiKPi.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ struct HfTreeCreatorDplusToPiKPi {
308308
int8_t flagMc = 0;
309309
int8_t originMc = 0;
310310
int8_t channelMc = 0;
311-
int8_t bMotherFlag = -1;
311+
int8_t bMotherPdg = 0;
312312
if constexpr (DoMc) {
313313
flagMc = candidate.flagMcMatchRec();
314314
originMc = candidate.originMcRec();
315315
channelMc = candidate.flagMcDecayChanRec();
316-
bMotherFlag = o2::analysis::getBHadMotherFlag(candidate.pdgBhadMotherPart());
316+
bMotherPdg = candidate.pdgBhadMotherPart();
317317
}
318318

319319
std::vector<float> outputMl = {-999., -999.};
@@ -380,7 +380,7 @@ struct HfTreeCreatorDplusToPiKPi {
380380
flagMc,
381381
originMc,
382382
channelMc,
383-
bMotherFlag);
383+
bMotherPdg);
384384
} else {
385385
rowCandidateFull(
386386
coll.numContrib(),
@@ -462,7 +462,7 @@ struct HfTreeCreatorDplusToPiKPi {
462462
flagMc,
463463
originMc,
464464
channelMc,
465-
bMotherFlag);
465+
bMotherPdg);
466466
}
467467
}
468468

PWGHF/TableProducer/treeCreatorDsToKKPi.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ struct HfTreeCreatorDsToKKPi {
349349
int8_t flagMc{0};
350350
int8_t originMc{0};
351351
int8_t channelMc{0};
352-
int8_t bMotherFlag{-1};
352+
int8_t bMotherPdg{0};
353353
int8_t isSwapped{MassHypo}; // 0 if KKPi, 1 if PiKK
354354
float eCand{0.f};
355355
float ctCand{0.f};
@@ -359,7 +359,7 @@ struct HfTreeCreatorDsToKKPi {
359359
originMc = candidate.originMcRec();
360360
channelMc = candidate.flagMcDecayChanRec();
361361
isSwapped = candidate.isCandidateSwapped();
362-
bMotherFlag = o2::analysis::getBHadMotherFlag(candidate.pdgBhadMotherPart());
362+
bMotherPdg = candidate.pdgBhadMotherPart();
363363
if (fillDplusMc && candidate.flagMcDecayChanRec() == channelsResonant[Mother::Dplus][decayChannel]) {
364364
eCand = HfHelper::eDplus(candidate);
365365
ctCand = HfHelper::ctDplus(candidate);
@@ -425,7 +425,7 @@ struct HfTreeCreatorDsToKKPi {
425425
flagMc,
426426
originMc,
427427
channelMc,
428-
bMotherFlag,
428+
bMotherPdg,
429429
isSwapped,
430430
prong0.sign() + prong1.sign() + prong2.sign());
431431
} else {
@@ -499,7 +499,7 @@ struct HfTreeCreatorDsToKKPi {
499499
flagMc,
500500
originMc,
501501
channelMc,
502-
bMotherFlag,
502+
bMotherPdg,
503503
isSwapped,
504504
prong0.sign() + prong1.sign() + prong2.sign());
505505
}

0 commit comments

Comments
 (0)