@@ -40,7 +40,6 @@ struct HfTaskLc {
4040 Configurable<std::vector<double >> binsPt{" binsPt" , std::vector<double >{hf_cuts_lc_to_p_k_pi::vecBinsPt}, " pT bin limits" };
4141 // ThnSparse for ML outputScores and Vars
4242 Configurable<bool > enableTHn{" enableTHn" , false , " enable THn for Lc" };
43- Configurable<bool > applyMl{" applyMl" , false , " Flag to apply ML selections" };
4443 ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {72 , 0 , 36 }, " " };
4544 ConfigurableAxis thnConfigAxisMass{" thnConfigAxisMass" , {300 , 1.98 , 2.58 }, " " };
4645 ConfigurableAxis thnConfigAxisPtProng{" thnConfigAxisPtProng" , {100 , 0 , 20 }, " " };
@@ -53,18 +52,13 @@ struct HfTaskLc {
5352 ConfigurableAxis thnConfigAxisCanType{" thnConfigAxisCanType" , {5 , 0 ., 5 .}, " " };
5453
5554 HfHelper hfHelper;
55+ Filter filterSelectCandidates = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc;
5656
57- using LcCandidates = soa::Join<aod::HfCand3Prong, aod::HfSelLc>;
58- using LcCandidatesMl = soa::Join<LcCandidates , aod::HfMlLcToPKPi>;
57+ using LcCandidates = soa::Filtered<soa:: Join<aod::HfCand3Prong, aod::HfSelLc> >;
58+ using LcCandidatesMl = soa::Filtered<soa:: Join<aod::HfCand3Prong , aod::HfSelLc, aod:: HfMlLcToPKPi> >;
5959
60- using LcCandidatesMc = soa::Join<LcCandidates, aod::HfCand3ProngMcRec>;
61- using LcCandidatesMlMc = soa::Join<LcCandidatesMl, aod::HfCand3ProngMcRec>;
62-
63- Partition<LcCandidates> selectedLcCandidates = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc;
64- Partition<LcCandidatesMl> selectedLcCandidatesMl = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc;
65-
66- Partition<LcCandidatesMc> selectedLcCandidatesMc = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc;
67- Partition<LcCandidatesMlMc> selectedLcCandidatesMcMl = aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc;
60+ using LcCandidatesMc = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc, aod::HfCand3ProngMcRec>>;
61+ using LcCandidatesMlMc = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc, aod::HfMlLcToPKPi, aod::HfCand3ProngMcRec>>;
6862
6963 HistogramRegistry registry{
7064 " registry" ,
@@ -280,7 +274,7 @@ struct HfTaskLc {
280274 const AxisSpec thnAxisBdtScoreLcNonPrompt{thnConfigAxisBdtScoreSignal, " BDT non-prompt score (Lc)" };
281275 const AxisSpec thnAxisCanType{thnConfigAxisCanType, " candidates type" };
282276
283- if (applyMl ) {
277+ if (doprocessDataWithMl || doprocessMcWithMl ) {
284278 registry.add (" hnLcVarsWithBdt" , " THn for Lambdac candidates with BDT scores" , HistType::kTHnSparseF , {thnAxisMass, thnAxisPt, thnAxisMultiplicity, thnAxisBdtScoreLcBkg, thnAxisBdtScoreLcPrompt, thnAxisBdtScoreLcNonPrompt, thnAxisCanType});
285279 } else {
286280 registry.add (" hnLcVars" , " THn for Lambdac candidates" , HistType::kTHnSparseF , {thnAxisMass, thnAxisPt, thnAxisMultiplicity, thnAxisPtProng0, thnAxisPtProng1, thnAxisPtProng2, thnAxisChi2PCA, thnAxisDecLength, thnAxisCPA, thnAxisCanType});
@@ -409,15 +403,15 @@ struct HfTaskLc {
409403 }
410404
411405 void processDataStd (aod::Collision const & collision,
412- LcCandidates const &,
406+ LcCandidates const & selectedLcCandidates ,
413407 aod::TracksWDca const & tracks)
414408 {
415409 processData<false >(collision, selectedLcCandidates, tracks);
416410 }
417411 PROCESS_SWITCH (HfTaskLc, processDataStd, " Process Data with the standard method" , true );
418412
419413 void processDataWithMl (aod::Collision const & collision,
420- LcCandidatesMl const &,
414+ LcCandidatesMl const & selectedLcCandidatesMl ,
421415 aod::TracksWDca const & tracks)
422416 {
423417 processData<true >(collision, selectedLcCandidatesMl, tracks);
@@ -658,15 +652,15 @@ struct HfTaskLc {
658652 }
659653 }
660654
661- void processMcStd (LcCandidatesMc const &,
655+ void processMcStd (LcCandidatesMc const & selectedLcCandidatesMc ,
662656 soa::Join<aod::McParticles, aod::HfCand3ProngMcGen> const & mcParticles,
663657 aod::TracksWMc const & tracksWithMc)
664658 {
665659 processMc<false >(selectedLcCandidatesMc, mcParticles, tracksWithMc);
666660 }
667661 PROCESS_SWITCH (HfTaskLc, processMcStd, " Process MC with the standard method" , false );
668662
669- void processMcWithMl (LcCandidatesMlMc const &,
663+ void processMcWithMl (LcCandidatesMlMc const & selectedLcCandidatesMcMl ,
670664 soa::Join<aod::McParticles, aod::HfCand3ProngMcGen> const & mcParticles,
671665 aod::TracksWMc const & tracksWithMc)
672666 {
0 commit comments