@@ -214,6 +214,23 @@ struct HfCandidateCreator3Prong {
214214 setLabelHistoCands (hCandidates);
215215 }
216216
217+ template <typename TRK, typename TAB0PI, typename TAB0KA, typename TAB0PR, typename TAB1PI, typename TAB1KA, typename TAB1PR, typename TAB2PI, typename TAB2KA, typename TAB2PR>
218+ void fillProngsPid (TRK const & track0, TRK const & track1, TRK const & track2,
219+ TAB0PI& rowProng0PidPi, TAB0KA& rowProng0PidKa, TAB0PR& rowProng0PidPr,
220+ TAB1PI& rowProng1PidPi, TAB1KA& rowProng1PidKa, TAB1PR& rowProng1PidPr,
221+ TAB2PI& rowProng2PidPi, TAB2KA& rowProng2PidKa, TAB2PR& rowProng2PidPr)
222+ {
223+ fillProngPid<HfProngSpecies::Pion>(track0, rowProng0PidPi);
224+ fillProngPid<HfProngSpecies::Kaon>(track0, rowProng0PidKa);
225+ fillProngPid<HfProngSpecies::Proton>(track0, rowProng0PidPr);
226+ fillProngPid<HfProngSpecies::Pion>(track1, rowProng1PidPi);
227+ fillProngPid<HfProngSpecies::Kaon>(track1, rowProng1PidKa);
228+ fillProngPid<HfProngSpecies::Proton>(track1, rowProng1PidPr);
229+ fillProngPid<HfProngSpecies::Pion>(track2, rowProng2PidPi);
230+ fillProngPid<HfProngSpecies::Kaon>(track2, rowProng2PidKa);
231+ fillProngPid<HfProngSpecies::Proton>(track2, rowProng2PidPr);
232+ }
233+
217234 template <bool doPvRefit = false , o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename Cand>
218235 void runCreator3ProngWithDCAFitterN (Coll const &,
219236 Cand const & rowsTrackIndexProng3,
@@ -358,15 +375,10 @@ struct HfCandidateCreator3Prong {
358375 rowTrackIndexProng3.hfflag ());
359376
360377 // fill candidate prong PID rows
361- fillProngPid<HfProngSpecies::Pion>(track0, rowProng0PidPi);
362- fillProngPid<HfProngSpecies::Kaon>(track0, rowProng0PidKa);
363- fillProngPid<HfProngSpecies::Proton>(track0, rowProng0PidPr);
364- fillProngPid<HfProngSpecies::Pion>(track1, rowProng1PidPi);
365- fillProngPid<HfProngSpecies::Kaon>(track1, rowProng1PidKa);
366- fillProngPid<HfProngSpecies::Proton>(track1, rowProng1PidPr);
367- fillProngPid<HfProngSpecies::Pion>(track2, rowProng2PidPi);
368- fillProngPid<HfProngSpecies::Kaon>(track2, rowProng2PidKa);
369- fillProngPid<HfProngSpecies::Proton>(track2, rowProng2PidPr);
378+ fillProngsPid (track0, track1, track2,
379+ rowProng0PidPi, rowProng0PidKa, rowProng0PidPr,
380+ rowProng1PidPi, rowProng1PidKa, rowProng1PidPr,
381+ rowProng2PidPi, rowProng2PidKa, rowProng2PidPr);
370382
371383 // fill histograms
372384 if (fillHistograms) {
@@ -613,15 +625,10 @@ struct HfCandidateCreator3Prong {
613625 chi2geo, ldl.first , ldl.second , chi2topo);
614626
615627 // fill candidate prong PID rows
616- fillProngPid<HfProngSpecies::Pion>(track0, rowProng0PidPi);
617- fillProngPid<HfProngSpecies::Kaon>(track0, rowProng0PidKa);
618- fillProngPid<HfProngSpecies::Proton>(track0, rowProng0PidPr);
619- fillProngPid<HfProngSpecies::Pion>(track1, rowProng1PidPi);
620- fillProngPid<HfProngSpecies::Kaon>(track1, rowProng1PidKa);
621- fillProngPid<HfProngSpecies::Proton>(track1, rowProng1PidPr);
622- fillProngPid<HfProngSpecies::Pion>(track2, rowProng2PidPi);
623- fillProngPid<HfProngSpecies::Kaon>(track2, rowProng2PidKa);
624- fillProngPid<HfProngSpecies::Proton>(track2, rowProng2PidPr);
628+ fillProngsPid (track0, track1, track2,
629+ rowProng0PidPi, rowProng0PidKa, rowProng0PidPr,
630+ rowProng1PidPi, rowProng1PidKa, rowProng1PidPr,
631+ rowProng2PidPi, rowProng2PidKa, rowProng2PidPr);
625632
626633 // fill histograms
627634 if (fillHistograms) {
0 commit comments