@@ -262,7 +262,8 @@ DECLARE_SOA_TABLE(HfCandLcLites, "AOD", "HFCANDLCLITE",
262262 full::MassKPi,
263263 full::MlScoreFirstClass,
264264 full::MlScoreSecondClass,
265- full::MlScoreThirdClass);
265+ full::MlScoreThirdClass,
266+ full::CentFT0C);
266267
267268DECLARE_SOA_TABLE (HfCollIdLCLite, " AOD" , " HFCOLLIDLCLITE" ,
268269 full::CollisionId);
@@ -343,7 +344,8 @@ DECLARE_SOA_TABLE(HfCandLcFulls, "AOD", "HFCANDLCFULL",
343344 full::MassKPi,
344345 full::MlScoreFirstClass,
345346 full::MlScoreSecondClass,
346- full::MlScoreThirdClass);
347+ full::MlScoreThirdClass,
348+ full::CentFT0C);
347349
348350DECLARE_SOA_TABLE (HfCandLcFullEvs, " AOD" , " HFCANDLCFULLEV" ,
349351 full::CollisionId,
@@ -622,8 +624,8 @@ struct HfTreeCreatorLcToPKPi {
622624 // / \param candidate candidate instance
623625 // / \param candidateMlScore instance of handler of vectors with ML scores associated with the current candidate
624626 // / \param candFlag flag indicating if PKPi (0) or PiKP (1) hypothesis is used
625- template <bool IsMc, typename CandType>
626- void fillLiteTable (CandType const & candidate, aod::HfMlLcToPKPi::iterator const & candidateMlScore, int candFlag)
627+ template <bool UseCentrality, bool IsMc, typename CandType, typename CollType >
628+ void fillLiteTable (CandType const & candidate, CollType const & collision, aod::HfMlLcToPKPi::iterator const & candidateMlScore, int candFlag)
627629 {
628630 auto [functionInvMass, functionInvMassKPi] = evaluateInvariantMassesDCAFitter (candidate, candFlag);
629631 const float functionCt = HfHelper::ctLc (candidate);
@@ -649,6 +651,11 @@ struct HfTreeCreatorLcToPKPi {
649651 assignMlScores (candidateMlScore, mlScoreFirstClass, mlScoreSecondClass, mlScoreThirdClass, candFlag);
650652 }
651653
654+ float centFT0C = -1 .f ;
655+ if constexpr (UseCentrality) {
656+ centFT0C = collision.centFT0C ();
657+ }
658+
652659 rowCandidateLite (
653660 candidate.posX (),
654661 candidate.posY (),
@@ -696,7 +703,8 @@ struct HfTreeCreatorLcToPKPi {
696703 functionInvMassKPi,
697704 mlScoreFirstClass,
698705 mlScoreSecondClass,
699- mlScoreThirdClass);
706+ mlScoreThirdClass,
707+ centFT0C);
700708
701709 if (fillCollIdTable) {
702710 // / save also candidate collision indices
@@ -708,8 +716,8 @@ struct HfTreeCreatorLcToPKPi {
708716 // / \param candidate candidate instance
709717 // / \param candidateMlScore instance of handler of vectors with ML scores associated with the current candidate
710718 // / \param candFlag flag indicating if PKPi (0) or PiKP (1) hypothesis is used
711- template <bool IsMc, typename CandType>
712- void fillFullTable (CandType const & candidate, aod::HfMlLcToPKPi::iterator const & candidateMlScore, int candFlag)
719+ template <bool UseCentrality, bool IsMc, typename CandType, typename CollType >
720+ void fillFullTable (CandType const & candidate, CollType const & collision, aod::HfMlLcToPKPi::iterator const & candidateMlScore, int candFlag)
713721 {
714722 auto [functionInvMass, functionInvMassKPi] = evaluateInvariantMassesDCAFitter (candidate, candFlag);
715723 const float functionCt = HfHelper::ctLc (candidate);
@@ -736,6 +744,11 @@ struct HfTreeCreatorLcToPKPi {
736744 assignMlScores (candidateMlScore, mlScoreFirstClass, mlScoreSecondClass, mlScoreThirdClass, candFlag);
737745 }
738746
747+ float centFT0C = -1 .f ;
748+ if constexpr (UseCentrality) {
749+ centFT0C = collision.centFT0C ();
750+ }
751+
739752 rowCandidateFull (
740753 candidate.collisionId (),
741754 candidate.posX (),
@@ -812,7 +825,8 @@ struct HfTreeCreatorLcToPKPi {
812825 functionInvMassKPi,
813826 mlScoreFirstClass,
814827 mlScoreSecondClass,
815- mlScoreThirdClass);
828+ mlScoreThirdClass,
829+ centFT0C);
816830 }
817831
818832 // / \brief function to fill lite table
@@ -960,9 +974,9 @@ struct HfTreeCreatorLcToPKPi {
960974 const bool notSkippedBkg = isMcCandidateSignal || candidate.pt () > downSampleBkgPtMax || pseudoRndm < downSampleBkgFactor;
961975 if (passSelection && notSkippedBkg && (keepAll || (keepSignalMc && isMcCandidateSignal) || (keepBkgMc && !isMcCandidateSignal) || (keepCorrBkgMC && isCorrBkg))) {
962976 if (fillCandidateLiteTable) {
963- fillLiteTable<IsMc>(candidate, candidateMlScore, candFlag);
977+ fillLiteTable<UseCentrality, IsMc>(candidate, collision , candidateMlScore, candFlag);
964978 } else {
965- fillFullTable<IsMc>(candidate, candidateMlScore, candFlag);
979+ fillFullTable<UseCentrality, IsMc>(candidate, collision , candidateMlScore, candFlag);
966980 }
967981
968982 if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) {
@@ -1143,9 +1157,9 @@ struct HfTreeCreatorLcToPKPi {
11431157 const int functionSelection = candFlag == 0 ? candidate.isSelLcToPKPi () : candidate.isSelLcToPiKP ();
11441158 if (functionSelection >= selectionFlagLc && (candidate.pt () > downSampleBkgPtMax || (pseudoRndm < downSampleBkgFactor && candidate.pt () < downSampleBkgPtMax))) {
11451159 if (fillCandidateLiteTable) {
1146- fillLiteTable<IsMc>(candidate, candidateMlScore, candFlag);
1160+ fillLiteTable<UseCentrality, IsMc>(candidate, collision , candidateMlScore, candFlag);
11471161 } else {
1148- fillFullTable<IsMc>(candidate, candidateMlScore, candFlag);
1162+ fillFullTable<UseCentrality, IsMc>(candidate, collision , candidateMlScore, candFlag);
11491163 }
11501164
11511165 if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) {
0 commit comments