@@ -83,12 +83,12 @@ DECLARE_SOA_COLUMN(Ct, ct, float);
8383DECLARE_SOA_COLUMN (IsEventReject, isEventReject, int ); // ! Event rejection flag
8484DECLARE_SOA_COLUMN (RunNumber, runNumber, int ); // ! Run number
8585// ML scores
86- DECLARE_SOA_COLUMN (MlScore0, mlScore0, float ); // ! ML score of the first configured index
87- DECLARE_SOA_COLUMN (MlScore1, mlScore1, float ); // ! ML score of the second configured index
86+ DECLARE_SOA_COLUMN (MlScore0, mlScore0, float ); // ! ML score of the first configured index
87+ DECLARE_SOA_COLUMN (MlScore1, mlScore1, float ); // ! ML score of the second configured index
8888} // namespace full
8989DECLARE_SOA_TABLE (HfCandDpMls, " AOD" , " HFCANDDPML" ,
90- full::MlScore0,
91- full::MlScore1)
90+ full::MlScore0,
91+ full::MlScore1)
9292
9393DECLARE_SOA_TABLE (HfCandDpLites, " AOD" , " HFCANDDPLITE" ,
9494 hf_cand::Chi2PCA,
@@ -296,22 +296,21 @@ struct HfTreeCreatorDplusToPiKPi {
296296 originMc = candidate.originMcRec ();
297297 channelMc = candidate.flagMcDecayChanRec ();
298298 }
299-
299+
300300 std::vector<float > outputMl = {-999 ., -999 .};
301301 if constexpr (doMl) {
302302 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
303303 outputMl[iclass] = candidate.mlProbDplusToPiKPi ()[classMl->at (iclass)];
304304 }
305305 rowCandidateMl (
306306 outputMl[0 ],
307- outputMl[1 ]
308- );
307+ outputMl[1 ]);
309308 }
310-
309+
311310 auto prong0 = candidate.template prong0_as <TracksWPid>();
312311 auto prong1 = candidate.template prong1_as <TracksWPid>();
313312 auto prong2 = candidate.template prong2_as <TracksWPid>();
314-
313+
315314 if (fillCandidateLiteTable) {
316315 rowCandidateLite (
317316 candidate.chi2PCA (),
@@ -358,7 +357,7 @@ struct HfTreeCreatorDplusToPiKPi {
358357 flagMc,
359358 originMc,
360359 channelMc);
361- } else {
360+ } else {
362361 rowCandidateFull (
363362 candidate.collision ().bcId (),
364363 candidate.collision ().numContrib (),
@@ -439,102 +438,102 @@ struct HfTreeCreatorDplusToPiKPi {
439438 flagMc,
440439 originMc,
441440 channelMc);
442- }
443441 }
444-
445- void processData (aod::Collisions const & collisions,
446- soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>> const & candidates,
447- TracksWPid const &)
448- {
449- // Filling event properties
450- rowCandidateFullEvents.reserve (collisions.size ());
451- for (const auto & collision : collisions) {
452- fillEvent (collision, 0 , 1 );
453442 }
454-
455- // Filling candidate properties
456- if (fillCandidateLiteTable) {
457- rowCandidateLite.reserve (candidates.size ());
458- } else {
459- rowCandidateFull.reserve (candidates.size ());
460- }
461- for (const auto & candidate : candidates) {
462- if (downSampleBkgFactor < 1 .) {
463- float pseudoRndm = candidate.ptProng0 () * 1000 . - static_cast <int64_t >(candidate.ptProng0 () * 1000 );
464- if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
465- continue ;
443+
444+ void processData (aod::Collisions const & collisions,
445+ soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>> const & candidates,
446+ TracksWPid const &)
447+ {
448+ // Filling event properties
449+ rowCandidateFullEvents.reserve (collisions.size ());
450+ for (const auto & collision : collisions) {
451+ fillEvent (collision, 0 , 1 );
452+ }
453+
454+ // Filling candidate properties
455+ if (fillCandidateLiteTable) {
456+ rowCandidateLite.reserve (candidates.size ());
457+ } else {
458+ rowCandidateFull.reserve (candidates.size ());
459+ }
460+ for (const auto & candidate : candidates) {
461+ if (downSampleBkgFactor < 1 .) {
462+ float pseudoRndm = candidate.ptProng0 () * 1000 . - static_cast <int64_t >(candidate.ptProng0 () * 1000 );
463+ if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
464+ continue ;
465+ }
466466 }
467+ fillCandidateTable (candidate);
467468 }
468- fillCandidateTable (candidate);
469- }
470469 }
471-
470+
472471 PROCESS_SWITCH (HfTreeCreatorDplusToPiKPi, processData, " Process data" , true );
473-
472+
474473 void processMc (aod::Collisions const & collisions,
475474 aod::McCollisions const & mccollisions,
476475 SelectedCandidatesMc const & candidates,
477476 MatchedGenCandidatesMc const & particles,
478477 SelectedCandidatesMcWithMl const & candidateswithml,
479478 TracksWPid const &)
480- {
481- // Filling event properties
482- rowCandidateFullEvents.reserve (collisions.size ());
483- for (const auto & collision : collisions) {
484- fillEvent (collision, 0 , 1 );
485- }
486-
487- // Filling candidate properties
488- if (fillOnlySignal) {
489- if (fillCandidateLiteTable) {
490- rowCandidateLite.reserve (reconstructedCandSig.size ());
491- } else {
492- rowCandidateFull.reserve (reconstructedCandSig.size ());
493- }
494- for (const auto & candidate : reconstructedCandSig) {
495- fillCandidateTable<true >(candidate);
496- }
497- } else if (fillOnlySignalMl) {
498- rowCandidateMl.reserve (reconstructedCandSigMl.size ());
499- if (fillCandidateLiteTable) {
500- rowCandidateLite.reserve (reconstructedCandSigMl.size ());
501- } else {
502- rowCandidateFull.reserve (reconstructedCandSigMl.size ());
503- }
504- for (const auto & candidate : reconstructedCandSigMl) {
505- if (downSampleBkgFactor < 1 .) {
506- float pseudoRndm = candidate.ptProng0 () * 1000 . - (int64_t )(candidate.ptProng0 () * 1000 );
507- if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
508- continue ;
509- }
479+ {
480+ // Filling event properties
481+ rowCandidateFullEvents.reserve (collisions.size ());
482+ for (const auto & collision : collisions) {
483+ fillEvent (collision, 0 , 1 );
484+ }
485+
486+ // Filling candidate properties
487+ if (fillOnlySignal) {
488+ if (fillCandidateLiteTable) {
489+ rowCandidateLite.reserve (reconstructedCandSig.size ());
490+ } else {
491+ rowCandidateFull.reserve (reconstructedCandSig.size ());
492+ }
493+ for (const auto & candidate : reconstructedCandSig) {
494+ fillCandidateTable<true >(candidate);
495+ }
496+ } else if (fillOnlySignalMl) {
497+ rowCandidateMl.reserve (reconstructedCandSigMl.size ());
498+ if (fillCandidateLiteTable) {
499+ rowCandidateLite.reserve (reconstructedCandSigMl.size ());
500+ } else {
501+ rowCandidateFull.reserve (reconstructedCandSigMl.size ());
502+ }
503+ for (const auto & candidate : reconstructedCandSigMl) {
504+ if (downSampleBkgFactor < 1 .) {
505+ float pseudoRndm = candidate.ptProng0 () * 1000 . - (int64_t )(candidate.ptProng0 () * 1000 );
506+ if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
507+ continue ;
510508 }
511- fillCandidateTable<true , true >(candidate);
512- }
513- } else if (fillOnlyBackground) {
514- if (fillCandidateLiteTable) {
515- rowCandidateLite.reserve (reconstructedCandBkg.size ());
516- } else {
517- rowCandidateFull.reserve (reconstructedCandBkg.size ());
518509 }
519- for (const auto & candidate : reconstructedCandBkg) {
520- if (downSampleBkgFactor < 1 .) {
521- float pseudoRndm = candidate.ptProng0 () * 1000 . - static_cast <int64_t >(candidate.ptProng0 () * 1000 );
522- if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
523- continue ;
524- }
510+ fillCandidateTable<true , true >(candidate);
511+ }
512+ } else if (fillOnlyBackground) {
513+ if (fillCandidateLiteTable) {
514+ rowCandidateLite.reserve (reconstructedCandBkg.size ());
515+ } else {
516+ rowCandidateFull.reserve (reconstructedCandBkg.size ());
517+ }
518+ for (const auto & candidate : reconstructedCandBkg) {
519+ if (downSampleBkgFactor < 1 .) {
520+ float pseudoRndm = candidate.ptProng0 () * 1000 . - static_cast <int64_t >(candidate.ptProng0 () * 1000 );
521+ if (candidate.pt () < ptMaxForDownSample && pseudoRndm >= downSampleBkgFactor) {
522+ continue ;
525523 }
526- fillCandidateTable<true >(candidate);
527524 }
525+ fillCandidateTable<true >(candidate);
526+ }
527+ } else {
528+ if (fillCandidateLiteTable) {
529+ rowCandidateLite.reserve (candidates.size ());
528530 } else {
529- if (fillCandidateLiteTable) {
530- rowCandidateLite.reserve (candidates.size ());
531- } else {
532- rowCandidateFull.reserve (candidates.size ());
533- }
534- for (const auto & candidate : candidates) {
535- fillCandidateTable<true >(candidate);
536- }
531+ rowCandidateFull.reserve (candidates.size ());
532+ }
533+ for (const auto & candidate : candidates) {
534+ fillCandidateTable<true >(candidate);
537535 }
536+ }
538537
539538 // Filling particle properties
540539 rowCandidateFullParticles.reserve (particles.size ());
0 commit comments