@@ -224,20 +224,22 @@ struct HfCandidateSelectorLc {
224224 }
225225 }
226226
227- if (reconstructionType == aod::hf_cand::VertexerType::KfParticle && applyKfCuts) {
228- // candidate chi2geo of the triplet of prongs
229- if (candidate.kfChi2Geo () > kfCuts->get (pTBin, " kfChi2Geo" )) {
230- return false ;
231- }
227+ if constexpr (reconstructionType == aod::hf_cand::VertexerType::KfParticle) {
228+ if (applyKfCuts) {
229+ // candidate chi2geo of the triplet of prongs
230+ if (candidate.kfChi2Geo () > kfCuts->get (pTBin, " kfChi2Geo" )) {
231+ return false ;
232+ }
232233
233- // candidate's decay point separation from the PV in terms of its error
234- if (candidate.kfDecayLength () / candidate.kfDecayLengthError () < kfCuts->get (pTBin, " kfLdL" )) {
235- return false ;
236- }
234+ // candidate's decay point separation from the PV in terms of its error
235+ if (candidate.kfDecayLength () / candidate.kfDecayLengthError () < kfCuts->get (pTBin, " kfLdL" )) {
236+ return false ;
237+ }
237238
238- // candidate's chi2 to the PV
239- if (candidate.kfChi2Topo () > kfCuts->get (pTBin, " kfChi2Topo" )) {
240- return false ;
239+ // candidate's chi2 to the PV
240+ if (candidate.kfChi2Topo () > kfCuts->get (pTBin, " kfChi2Topo" )) {
241+ return false ;
242+ }
241243 }
242244 }
243245
@@ -301,77 +303,78 @@ struct HfCandidateSelectorLc {
301303 }
302304 }
303305
304- if (reconstructionType == aod::hf_cand::VertexerType::KfParticle && applyKfCuts ) {
305-
306- const float chi2PrimProng0 = candidate.kfChi2PrimProng0 ();
307- const float chi2PrimProng1 = candidate.kfChi2PrimProng1 ();
308- const float chi2PrimProng2 = candidate.kfChi2PrimProng2 ();
306+ if constexpr (reconstructionType == aod::hf_cand::VertexerType::KfParticle) {
307+ if (applyKfCuts) {
308+ const float chi2PrimProng0 = candidate.kfChi2PrimProng0 ();
309+ const float chi2PrimProng1 = candidate.kfChi2PrimProng1 ();
310+ const float chi2PrimProng2 = candidate.kfChi2PrimProng2 ();
309311
310- const float chi2GeoProng1Prong2 = candidate.kfGeoProng1Prong2 ();
311- const float chi2GeoProng0Prong2 = candidate.kfGeoProng0Prong2 ();
312- const float chi2GeoProng0Prong1 = candidate.kfGeoProng0Prong1 ();
312+ const float chi2GeoProng1Prong2 = candidate.kfChi2GeoProng1Prong2 ();
313+ const float chi2GeoProng0Prong2 = candidate.kfChi2GeoProng0Prong2 ();
314+ const float chi2GeoProng0Prong1 = candidate.kfChi2GeoProng0Prong1 ();
313315
314- const float dcaProng1Prong2 = candidate.kfDcaProng1Prong2 ();
315- const float dcaProng0Prong2 = candidate.kfDcaProng0Prong2 ();
316- const float dcaProng0Prong1 = candidate.kfDcaProng0Prong1 ();
316+ const float dcaProng1Prong2 = candidate.kfDcaProng1Prong2 ();
317+ const float dcaProng0Prong2 = candidate.kfDcaProng0Prong2 ();
318+ const float dcaProng0Prong1 = candidate.kfDcaProng0Prong1 ();
317319
318- const double cutChi2PrimPr = kfCuts->get (pTBin, " kfChi2PrimPr" );
319- const double cutChi2PrimKa = kfCuts->get (pTBin, " kfChi2PrimKa" );
320- const double cutChi2PrimPi = kfCuts->get (pTBin, " kfChi2PrimPi" );
320+ const double cutChi2PrimPr = kfCuts->get (pTBin, " kfChi2PrimPr" );
321+ const double cutChi2PrimKa = kfCuts->get (pTBin, " kfChi2PrimKa" );
322+ const double cutChi2PrimPi = kfCuts->get (pTBin, " kfChi2PrimPi" );
321323
322- const double cutChi2GeoKaPi = kfCuts->get (pTBin, " kfChi2GeoKaPi" );
323- const double cutChi2GeoPrPi = kfCuts->get (pTBin, " kfChi2GeoPrPi" );
324- const double cutChi2GeoPrKa = kfCuts->get (pTBin, " kfChi2GeoPrKa" );
324+ const double cutChi2GeoKaPi = kfCuts->get (pTBin, " kfChi2GeoKaPi" );
325+ const double cutChi2GeoPrPi = kfCuts->get (pTBin, " kfChi2GeoPrPi" );
326+ const double cutChi2GeoPrKa = kfCuts->get (pTBin, " kfChi2GeoPrKa" );
325327
326- const double cutDcaKaPi = kfCuts->get (pTBin, " kfDcaKaPi" );
327- const double cutDcaPrPi = kfCuts->get (pTBin, " kfDcaPrPi" );
328- const double cutDcaPrKa = kfCuts->get (pTBin, " kfDcaPrKa" );
328+ const double cutDcaKaPi = kfCuts->get (pTBin, " kfDcaKaPi" );
329+ const double cutDcaPrPi = kfCuts->get (pTBin, " kfDcaPrPi" );
330+ const double cutDcaPrKa = kfCuts->get (pTBin, " kfDcaPrKa" );
329331
330- // kaon's chi2 to the PV
331- if (chi2PrimProng1 < cutChi2PrimKa) {
332- return false ;
333- }
332+ // kaon's chi2 to the PV
333+ if (chi2PrimProng1 < cutChi2PrimKa) {
334+ return false ;
335+ }
334336
335- // chi2geo between proton and pion
336- if (chi2GeoProng0Prong2 > cutChi2GeoPrPi) {
337- return false ;
338- }
337+ // chi2geo between proton and pion
338+ if (chi2GeoProng0Prong2 > cutChi2GeoPrPi) {
339+ return false ;
340+ }
339341
340- // dca between proton and pion
341- if (dcaProng0Prong2 > cutDcaPrPi) {
342- return false ;
343- }
342+ // dca between proton and pion
343+ if (dcaProng0Prong2 > cutDcaPrPi) {
344+ return false ;
345+ }
344346
345- const bool isPKPi = trackProton.globalIndex () == candidate.prong0Id ();
347+ const bool isPKPi = trackProton.globalIndex () == candidate.prong0Id ();
346348
347- // 0-th prong chi2 to the PV
348- if (chi2PrimProng0 < (isPKPi ? cutChi2PrimPr : cutChi2PrimPi)) {
349- return false ;
350- }
349+ // 0-th prong chi2 to the PV
350+ if (chi2PrimProng0 < (isPKPi ? cutChi2PrimPr : cutChi2PrimPi)) {
351+ return false ;
352+ }
351353
352- // 2-nd prong chi2 to the PV
353- if (chi2PrimProng2 < (isPKPi ? cutChi2PrimPi : cutChi2PrimPr)) {
354- return false ;
355- }
354+ // 2-nd prong chi2 to the PV
355+ if (chi2PrimProng2 < (isPKPi ? cutChi2PrimPi : cutChi2PrimPr)) {
356+ return false ;
357+ }
356358
357- // chi2geo between 1-st and 2-nd prongs
358- if (chi2GeoProng1Prong2 > (isPKPi ? cutChi2GeoKaPi : cutChi2GeoPrKa)) {
359- return false ;
360- }
359+ // chi2geo between 1-st and 2-nd prongs
360+ if (chi2GeoProng1Prong2 > (isPKPi ? cutChi2GeoKaPi : cutChi2GeoPrKa)) {
361+ return false ;
362+ }
361363
362- // chi2geo between 0-th and 1-st prongs
363- if (chi2GeoProng0Prong1 > (isPKPi ? cutChi2GeoPrKa : cutChi2GeoKaPi)) {
364- return false ;
365- }
364+ // chi2geo between 0-th and 1-st prongs
365+ if (chi2GeoProng0Prong1 > (isPKPi ? cutChi2GeoPrKa : cutChi2GeoKaPi)) {
366+ return false ;
367+ }
366368
367- // dca between 1-st and 2-nd prongs
368- if (dcaProng1Prong2 > (isPKPi ? cutDcaKaPi : cutDcaPrKa)) {
369- return false ;
370- }
369+ // dca between 1-st and 2-nd prongs
370+ if (dcaProng1Prong2 > (isPKPi ? cutDcaKaPi : cutDcaPrKa)) {
371+ return false ;
372+ }
371373
372- // dca between 0-th and 1-st prongs
373- if (dcaProng0Prong1 > (isPKPi ? cutDcaPrKa : cutDcaKaPi)) {
374- return false ;
374+ // dca between 0-th and 1-st prongs
375+ if (dcaProng0Prong1 > (isPKPi ? cutDcaPrKa : cutDcaKaPi)) {
376+ return false ;
377+ }
375378 }
376379 }
377380
@@ -455,7 +458,7 @@ struct HfCandidateSelectorLc {
455458 }
456459
457460 // conjugate-independent topological selection
458- if (!selectionTopol (candidate)) {
461+ if (!selectionTopol<reconstructionType> (candidate)) {
459462 hfSelLcCandidate (statusLcToPKPi, statusLcToPiKP);
460463 if (applyMl) {
461464 hfMlLcToPKPiCandidate (outputMlLcToPKPi, outputMlLcToPiKP);
0 commit comments