1818#include " PWGHF/Core/HfMlResponseOmegacToOmegaPiQa.h"
1919#include " PWGHF/Core/SelectorCuts.h"
2020#include " PWGHF/DataModel/AliasTables.h"
21- #include " PWGHF/DataModel/CandidateReconstructionTables .h"
21+ #include " PWGHF/DataModel/CandidateReconstructionTablesQa .h"
2222#include " PWGHF/DataModel/CandidateSelectionTables.h"
2323#include " PWGHF/Utils/utilsAnalysis.h"
2424
7070// / Struct for applying Omegac0 -> Omega pi selection cuts
7171struct HfCandidateSelectorToOmegaPiQa {
7272 // DCAFitter and KFParticle
73- Produces<aod:: HfSelToOmegaPi> hfSelToOmegaPi;
73+ Produces<HfSelToOmegaPi> hfSelToOmegaPi;
7474 // ML selection - filled for both DCAFitter and KFParticle
75- Produces<aod:: HfMlSelOmegacToOmegaPi> hfMlSelToOmegaPi;
75+ Produces<HfMlSelOmegacToOmegaPi> hfMlSelToOmegaPi;
7676
7777 // cuts from SelectorCuts.h - pT dependent cuts
7878 Configurable<std::vector<double >> binsPt{" binsPt" , std::vector<double >{hf_cuts_omegac_to_omega_pi::vecBinsPt}, " pT bin limits" };
@@ -376,13 +376,12 @@ struct HfCandidateSelectorToOmegaPiQa {
376376 template <int svReco, typename T>
377377 bool selectOnLf (const T& candidate)
378378 {
379-
380379 registry.fill (HIST (" hSelStatusLf" ), 0.0 );
381380
382381 // Eta selection of V0, Cascade daughters
383- double etaV0PosDau = candidate.etaV0PosDau ();
384- double etaV0NegDau = candidate.etaV0NegDau ();
385- double etaKaFromCasc = candidate.etaBachFromCasc ();
382+ double etaV0PosDau = candidate.posTrack_as <TracksSelLf>(). eta ();
383+ double etaV0NegDau = candidate.negTrack_as <TracksSelLf>(). eta ();
384+ double etaKaFromCasc = candidate.bachelor_as <TracksSelLf>(). eta ();
386385
387386 if (std::abs (etaV0PosDau) > etaTrackLFDauMax) {
388387 return false ;
@@ -400,8 +399,8 @@ struct HfCandidateSelectorToOmegaPiQa {
400399 registry.fill (HIST (" hSelStatusLf" ), 3.0 );
401400
402401 // Minimum radius cut
403- double radiusV0 = RecoDecay::sqrtSumOfSquares (candidate.xDecayVtxV0 (), candidate.yDecayVtxV0 ());
404- double radiusCasc = RecoDecay::sqrtSumOfSquares (candidate.xDecayVtxCascade (), candidate.yDecayVtxCascade ());
402+ double radiusV0 = RecoDecay::sqrtSumOfSquares (candidate.xV0Vertex (), candidate.yV0Vertex ());
403+ double radiusCasc = RecoDecay::sqrtSumOfSquares (candidate.xCascadeVertex (), candidate.yCascadeVertex ());
405404
406405 if (radiusV0 < radiusV0Min) {
407406 return false ;
@@ -413,43 +412,43 @@ struct HfCandidateSelectorToOmegaPiQa {
413412 registry.fill (HIST (" hSelStatusLf" ), 5.0 );
414413
415414 // Cosine of pointing angle
416- if (candidate.cosPAV0 () < cosPAV0Min) {
415+ if (candidate.cpaV0 () < cosPAV0Min) {
417416 return false ;
418417 }
419418 registry.fill (HIST (" hSelStatusLf" ), 6.0 );
420- if (candidate.cosPACasc () < cosPACascMin) {
419+ if (candidate.cpaCasc () < cosPACascMin) {
421420 return false ;
422421 }
423422 registry.fill (HIST (" hSelStatusLf" ), 7.0 );
424423
425424 // Distance of Closest Approach(DCA)
426- if (candidate.dcaV0Dau () > dcaV0DauMax) {
425+ if (candidate.dcaV0Daughters () > dcaV0DauMax) {
427426 return false ;
428427 }
429428 registry.fill (HIST (" hSelStatusLf" ), 8.0 );
430429
431- if (candidate.dcaCascDau () > dcaCascDauMax) {
430+ if (candidate.dcaCascadeDaughters () > dcaCascDauMax) {
432431 return false ;
433432 }
434433 registry.fill (HIST (" hSelStatusLf" ), 9.0 );
435434
436- if (std::abs (candidate.dcaXYToPvV0Dau0 ()) < dcaPosToPvMin) {
435+ if (std::abs (candidate.impactParameterXYV0PosDau ()) < dcaPosToPvMin) {
437436 return false ;
438437 }
439438 registry.fill (HIST (" hSelStatusLf" ), 10.0 );
440439
441- if (std::abs (candidate.dcaXYToPvV0Dau1 ()) < dcaNegToPvMin) {
440+ if (std::abs (candidate.impactParameterXYV0NegDau ()) < dcaNegToPvMin) {
442441 return false ;
443442 }
444443 registry.fill (HIST (" hSelStatusLf" ), 11.0 );
445444
446- if (std::abs (candidate.dcaXYToPvCascDau ()) < dcaBachToPvMin) {
445+ if (std::abs (candidate.impactParameterXYCascadeBach ()) < dcaBachToPvMin) {
447446 return false ;
448447 }
449448 registry.fill (HIST (" hSelStatusLf" ), 12.0 );
450449
451450 // pT: Bachelor
452- double ptKaFromCasc = RecoDecay::sqrtSumOfSquares ( candidate.pxBachFromCasc (), candidate. pyBachFromCasc () );
451+ double ptKaFromCasc = candidate.bachelor_as <TracksSelLf>(). pt ( );
453452 if (std::abs (ptKaFromCasc) < ptKaFromCascMin) {
454453 return false ;
455454 }
@@ -459,69 +458,71 @@ struct HfCandidateSelectorToOmegaPiQa {
459458 if constexpr (svReco == doKfParticle) {
460459 if (kfConfigurableGroup.applyKFpreselections ) {
461460 // Cosine of Pointing angle
462- if (candidate.cosPaV0ToCasc () < kfConfigurableGroup.cosPaV0ToCascMin ) {
461+ if (candidate.cpaV0ToCascade () < kfConfigurableGroup.cosPaV0ToCascMin ) {
463462 return false ;
464463 }
465464 registry.fill (HIST (" hSelStatusLf" ), 14.0 );
466465
467466 // Chi2
468- if (candidate.v0Chi2OverNdf () < 0 || candidate.v0Chi2OverNdf () > kfConfigurableGroup.v0Chi2OverNdfMax ) {
467+ if (candidate.chi2GeoOverNdfV0 () < 0 || candidate.chi2GeoOverNdfV0 () > kfConfigurableGroup.v0Chi2OverNdfMax ) {
469468 return false ;
470469 }
471470 registry.fill (HIST (" hSelStatusLf" ), 15.0 );
472- if (candidate.cascChi2OverNdf () < 0 || candidate.cascChi2OverNdf () > kfConfigurableGroup.cascChi2OverNdfMax ) {
471+ if (candidate.chi2GeoOverNdfCascade () < 0 || candidate.chi2GeoOverNdfCascade () > kfConfigurableGroup.cascChi2OverNdfMax ) {
473472 return false ;
474473 }
475474 registry.fill (HIST (" hSelStatusLf" ), 16.0 );
476- if (candidate.chi2TopoCascToPv () < 0 || candidate.chi2TopoCascToPv () > kfConfigurableGroup.chi2TopoCascToPvMax ) {
475+ if (candidate.chi2TopoCascadeToPv () < 0 || candidate.chi2TopoCascadeToPv () > kfConfigurableGroup.chi2TopoCascToPvMax ) {
477476 return false ;
478477 }
479478 registry.fill (HIST (" hSelStatusLf" ), 17.0 );
480- if (candidate.chi2TopoV0ToCasc () < 0 || candidate.chi2TopoV0ToCasc () > kfConfigurableGroup.chi2TopoV0ToCascMax ) {
479+ if (candidate.chi2TopoV0ToCascade () < 0 || candidate.chi2TopoV0ToCascade () > kfConfigurableGroup.chi2TopoV0ToCascMax ) {
481480 return false ;
482481 }
483482 registry.fill (HIST (" hSelStatusLf" ), 18.0 );
484483
485484 // ldl
486- if (candidate.v0ldl () < kfConfigurableGroup.v0LdlMin ) {
485+ if (candidate.decayLengthNormKfV0 () < kfConfigurableGroup.v0LdlMin ) {
487486 return false ;
488487 }
489488 registry.fill (HIST (" hSelStatusLf" ), 19.0 );
490- if (candidate.cascldl () < kfConfigurableGroup.cascLdlMin ) {
489+ if (candidate.decayLengthNormKfCascade () < kfConfigurableGroup.cascLdlMin ) {
491490 return false ;
492491 }
493492 registry.fill (HIST (" hSelStatusLf" ), 20.0 );
494493
495494 // Decay length
496- if (std::abs (candidate.decayLenXYLambda ()) < kfConfigurableGroup.decayLenXYLambdaMin ) {
495+ if (std::abs (candidate.decayLengthXYV0 ()) < kfConfigurableGroup.decayLenXYLambdaMin ) {
497496 return false ;
498497 }
499498 registry.fill (HIST (" hSelStatusLf" ), 21.0 );
500- if (std::abs (candidate.decayLenXYCasc ()) < kfConfigurableGroup.decayLenXYCascMin ) {
499+ if (std::abs (candidate.decayLengthXYCascade ()) < kfConfigurableGroup.decayLenXYCascMin ) {
501500 return false ;
502501 }
503502 registry.fill (HIST (" hSelStatusLf" ), 22.0 );
504503
505- // Competing Xi rejection
506- if (kfConfigurableGroup.applyCompetingCascRejection ) {
507- const auto invMassXiHypothesis = candidate.cascRejectInvmass ();
508-
509- if (std::abs (invMassXiHypothesis - o2::constants::physics::MassXiMinus) < kfConfigurableGroup.cascadeRejMassWindow ) {
510- registry.fill (HIST (" hSelCompetingCasc" ), 0.0 );
511- return false ;
512- }
504+ // TODO: fix cascRejectInvmass variable needed not available in the current table
513505
514- registry.fill (HIST (" hSelCompetingCasc" ), 1.0 );
515- registry.fill (HIST (" hInvMassXiMinus_rej_cut" ), invMassXiHypothesis);
516- }
506+ // Competing Xi rejection
507+ // if (kfConfigurableGroup.applyCompetingCascRejection) {
508+ // const auto invMassXiHypothesis = candidate.cascRejectInvmass();
509+ //
510+ // if (std::abs(invMassXiHypothesis - o2::constants::physics::MassXiMinus) < kfConfigurableGroup.cascadeRejMassWindow) {
511+ // registry.fill(HIST("hSelCompetingCasc"), 0.0);
512+ // return false;
513+ // }
514+ //
515+ // registry.fill(HIST("hSelCompetingCasc"), 1.0);
516+ // registry.fill(HIST("hInvMassXiMinus_rej_cut"), invMassXiHypothesis);
517+ // }
517518 }
518519 } else {
519520 // Impact parameter
520- if (std::abs (candidate.impactParCascXY ()) < impactParameterXYCascMin || std::abs (candidate.impactParCascXY ()) > impactParameterXYCascMax) {
521+ if (std::abs (candidate.impactParameter0 ()) < impactParameterXYCascMin || std::abs (candidate.impactParameter0 ()) > impactParameterXYCascMax) {
521522 return false ;
522523 }
523524 registry.fill (HIST (" hSelStatusLf" ), 14.0 );
524- if (std::abs (candidate.impactParCascZ ()) < impactParameterZCascMin || std::abs (candidate.impactParCascZ ()) > impactParameterZCascMax) {
525+ if (std::abs (candidate.impactParameterZ0 ()) < impactParameterZCascMin || std::abs (candidate.impactParameterZ0 ()) > impactParameterZCascMax) {
525526 return false ;
526527 }
527528 registry.fill (HIST (" hSelStatusLf" ), 15.0 );
@@ -540,19 +541,18 @@ struct HfCandidateSelectorToOmegaPiQa {
540541 registry.fill (HIST (" hSelStatusHf" ), 0.0 );
541542
542543 // eta selection on charm bayron bachelor
543- if (std::abs (candidate.etaBachFromCharmBaryon ()) > etaTrackCharmBachMax) {
544+ if (std::abs (candidate.prong1_as <TracksSel>(). eta ()) > etaTrackCharmBachMax) {
544545 return false ;
545546 }
546547 registry.fill (HIST (" hSelStatusHf" ), 1.0 );
547548 // Distance of Closest Approach(DCA)
548- if (candidate.dcaCharmBaryonDau () > dcaCharmBaryonDauMax) {
549+ if (candidate.dcaDaughters () > dcaCharmBaryonDauMax) {
549550 return false ;
550551 }
551552 registry.fill (HIST (" hSelStatusHf" ), 2.0 );
552553
553554 // pT: Charm Bachelor
554- double ptPiFromCharmBaryon = RecoDecay::sqrtSumOfSquares (candidate.pxBachFromCharmBaryon (), candidate.pyBachFromCharmBaryon ());
555- if (inputPtBin < 0 || ptPiFromCharmBaryon < cuts->get (inputPtBin, " pT pi from Omegac" )) {
555+ if (inputPtBin < 0 || candidate.pt () < cuts->get (inputPtBin, " pT pi from Omegac" )) {
556556 return false ;
557557 }
558558 registry.fill (HIST (" hSelStatusHf" ), 3.0 );
@@ -561,56 +561,56 @@ struct HfCandidateSelectorToOmegaPiQa {
561561 if constexpr (svReco == doKfParticle) {
562562 if (kfConfigurableGroup.applyKFpreselections ) {
563563 // Omegac Pt selection
564- if (std::abs (candidate.kfptOmegac ()) <= ptCandMin || std::abs (candidate.kfptOmegac ()) >= ptCandMax) {
564+ if (std::abs (candidate.pt ()) <= ptCandMin || std::abs (candidate.pt ()) >= ptCandMax) {
565565 return false ;
566566 }
567567 registry.fill (HIST (" hSelStatusHf" ), 4.0 );
568568
569569 // Cosine of pointing angle
570- if (candidate.cosPaCascToOmegac () < kfConfigurableGroup.cosPaCascToOmegacMin ) {
570+ if (candidate.cpaCascadeToCharmHadron () < kfConfigurableGroup.cosPaCascToOmegacMin ) {
571571 return false ;
572572 }
573573 registry.fill (HIST (" hSelStatusHf" ), 5.0 );
574574
575575 // Chi2
576- if (candidate.omegacChi2OverNdf () < 0 || candidate.omegacChi2OverNdf () > kfConfigurableGroup.omegacChi2OverNdfMax ) {
576+ if (candidate.chi2GeoOverNdfCascade () < 0 || candidate.chi2GeoOverNdfCascade () > kfConfigurableGroup.omegacChi2OverNdfMax ) {
577577 return false ;
578578 }
579579 registry.fill (HIST (" hSelStatusHf" ), 6.0 );
580- if (candidate.chi2TopoOmegacToPv () < 0 || candidate.chi2TopoOmegacToPv () > kfConfigurableGroup.chi2TopoOmegacToPvMax ) {
580+ if (candidate.chi2TopoCascadeToPv () < 0 || candidate.chi2TopoCascadeToPv () > kfConfigurableGroup.chi2TopoOmegacToPvMax ) {
581581 return false ;
582582 }
583583 registry.fill (HIST (" hSelStatusHf" ), 7.0 );
584- if (candidate.chi2TopoCascToOmegac () < 0 || candidate.chi2TopoCascToOmegac () > kfConfigurableGroup.chi2TopoCascToOmegacMax ) {
584+ if (candidate.chi2TopoCascadeToCharmHadron () < 0 || candidate.chi2TopoCascadeToCharmHadron () > kfConfigurableGroup.chi2TopoCascToOmegacMax ) {
585585 return false ;
586586 }
587587 registry.fill (HIST (" hSelStatusHf" ), 8.0 );
588588
589589 // Decay Length
590- if (std::abs (candidate.decayLenXYOmegac ()) > kfConfigurableGroup.decayLenXYOmegacMax ) {
590+ if (std::abs (candidate.decayLengthXY ()) > kfConfigurableGroup.decayLenXYOmegacMax ) {
591591 return false ;
592592 }
593593 registry.fill (HIST (" hSelStatusHf" ), 9.0 );
594594
595595 // ctau
596- if (std::abs (candidate. cTauOmegac ( )) > kfConfigurableGroup.cTauOmegacMax ) {
596+ if (std::abs (HfHelperQa::ctOmegaczero (candidate )) > kfConfigurableGroup.cTauOmegacMax ) {
597597 return false ;
598598 }
599599 registry.fill (HIST (" hSelStatusHf" ), 10.0 );
600600
601601 // Omegac l/dl
602- if (candidate.omegacldl () > kfConfigurableGroup.omegacLdlMax ) {
602+ if (candidate.decayLengthNormKf () > kfConfigurableGroup.omegacLdlMax ) {
603603 return false ;
604604 }
605605 registry.fill (HIST (" hSelStatusHf" ), 11.0 );
606606 }
607607 } else {
608608 // Impact parameter
609- if ((std::abs (candidate.impactParBachFromCharmBaryonXY ()) < impactParameterXYPiFromCharmBaryonMin) || (std::abs (candidate.impactParBachFromCharmBaryonXY ()) > impactParameterXYPiFromCharmBaryonMax)) {
609+ if ((std::abs (candidate.impactParameter1 ()) < impactParameterXYPiFromCharmBaryonMin) || (std::abs (candidate.impactParameter1 ()) > impactParameterXYPiFromCharmBaryonMax)) {
610610 return false ;
611611 }
612612 registry.fill (HIST (" hSelStatusHf" ), 4.0 );
613- if ((std::abs (candidate.impactParBachFromCharmBaryonZ ()) < impactParameterZPiFromCharmBaryonMin) || (std::abs (candidate.impactParBachFromCharmBaryonZ ()) > impactParameterZPiFromCharmBaryonMax)) {
613+ if ((std::abs (candidate.impactParameterz1 ()) < impactParameterZPiFromCharmBaryonMin) || (std::abs (candidate.impactParameterz1 ()) > impactParameterZPiFromCharmBaryonMax)) {
614614 return false ;
615615 }
616616 registry.fill (HIST (" hSelStatusHf" ), 5.0 );
@@ -634,14 +634,12 @@ struct HfCandidateSelectorToOmegaPiQa {
634634 auto trackV0PosDau = lfTracks.rawIteratorAt (candidate.posTrackId ());
635635 auto trackV0NegDau = lfTracks.rawIteratorAt (candidate.negTrackId ());
636636 auto trackKaFromCasc = lfTracks.rawIteratorAt (candidate.bachelorId ());
637- auto trackPiFromCharm = tracks.rawIteratorAt (candidate.bachelorFromCharmBaryonId ());
637+ auto trackPiFromCharm = tracks.rawIteratorAt (candidate.prong1Id ());
638638
639639 auto trackPiFromLam = trackV0NegDau;
640640 auto trackPrFromLam = trackV0PosDau;
641641
642- int8_t const signDecay = candidate.signDecay (); // sign of pi <- cascade
643-
644- if (signDecay > 0 ) {
642+ if (trackPiFromCharm.sign () < 0 ) {
645643 trackPiFromLam = trackV0PosDau;
646644 trackPrFromLam = trackV0NegDau;
647645 registry.fill (HIST (" hSelSignDec" ), 1 ); // anti-particle decay
@@ -650,7 +648,7 @@ struct HfCandidateSelectorToOmegaPiQa {
650648 }
651649
652650 // pT selection
653- auto ptCandOmegac = RecoDecay::pt ( candidate.pxCharmBaryon (), candidate. pyCharmBaryon () );
651+ auto ptCandOmegac = candidate.pt ( );
654652
655653 if (ptCandOmegac < ptCandMin || ptCandOmegac > ptCandMax) {
656654 resultSelections = false ;
@@ -786,9 +784,9 @@ struct HfCandidateSelectorToOmegaPiQa {
786784 bool statusInvMassCascade = false ;
787785 bool statusInvMassCharmBaryon = false ;
788786
789- double const invMassLambda = candidate.invMassLambda ();
790- double const invMassCascade = candidate.invMassCascade ();
791- double const invMassCharmBaryon = candidate. invMassCharmBaryon ( );
787+ double const invMassLambda = candidate.massLambda ();
788+ double const invMassCascade = candidate.massCascade ();
789+ double const invMassCharmBaryon = HFHelperQa::invMassOmegaczeroToOmegaPi (candidate );
792790
793791 if (std::abs (invMassLambda - o2::constants::physics::MassLambda0) < v0MassWindow) {
794792 statusInvMassLambda = true ;
@@ -847,7 +845,7 @@ struct HfCandidateSelectorToOmegaPiQa {
847845 if (statusPidLambda && statusPidCascade && statusPidCharmBaryon && statusInvMassLambda && statusInvMassCascade && statusInvMassCharmBaryon && resultSelections) {
848846 registry.fill (HIST (" hInvMassCharmBaryon" ), invMassCharmBaryon);
849847 if constexpr (svReco == doKfParticle) {
850- registry.fill (HIST (" hPtCharmBaryon" ), candidate.kfptOmegac ());
848+ registry.fill (HIST (" hPtCharmBaryon" ), candidate.pt ());
851849 } else {
852850 registry.fill (HIST (" hPtCharmBaryon" ), ptCandOmegac);
853851 }
@@ -859,7 +857,7 @@ struct HfCandidateSelectorToOmegaPiQa {
859857 // /////////////////////////////////
860858 // / Process with DCAFitter //
861859 // /////////////////////////////////
862- void processOmegac0SelectorWithDCAFitter (aod::HfCandToOmegaPi const & candidates,
860+ void processOmegac0SelectorWithDCAFitter (HfCandCascBachQa const & candidates,
863861 TracksSel const & tracks,
864862 TracksSelLf const & lfTracks)
865863 {
@@ -870,7 +868,7 @@ struct HfCandidateSelectorToOmegaPiQa {
870868 // //////////////////////////////////
871869 // / Process with KFParticle //
872870 // //////////////////////////////////
873- void processOmegac0SelectorWithKFParticle (soa::Join<aod::HfCandToOmegaPi, aod::HfOmegacKf > const & candidates,
871+ void processOmegac0SelectorWithKFParticle (soa::Join<HfCandCascBachQa, HfCandCascBachKfQa > const & candidates,
874872 TracksSel const & tracks,
875873 TracksSelLf const & lfTracks)
876874 {
0 commit comments