@@ -239,10 +239,10 @@ struct HfTreeCreatorOmegacSt {
239239 Configurable<float > maxNSigmaKaon{" maxNSigmaKaon" , 5 ., " Max Nsigma for kaon to be paired with Omega" };
240240 Configurable<bool > bzOnly{" bzOnly" , true , " Use B_z instead of full field map" };
241241
242- const int minItsNCls = 4 ;
243- const float fractionTpcNclsFindable = 0.8 ;
244- const float maxTpcChi2Ncl = 4 .;
245- const float maxItsChi2Ncl = 36 .;
242+ const int itsNClsMin = 4 ;
243+ const float tpcNclsFindableFraction = 0.8 ;
244+ const float tpcChi2NclMax = 4 .;
245+ const float itsChi2NclMax = 36 .;
246246
247247 SliceCache cache;
248248 Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -417,7 +417,7 @@ struct HfTreeCreatorOmegacSt {
417417 void fillTable (Collisions const & collisions,
418418 aod::AssignedTrackedCascades const & trackedCascades,
419419 aod::TrackAssoc const & trackIndices,
420- std::optional<aod::McParticles> mcParticles = std::nullopt )
420+ std::optional<std::reference_wrapper< aod::McParticles const > > mcParticles = std::nullopt )
421421 {
422422 const auto matCorr = static_cast <o2::base::Propagator::MatCorrType>(materialCorrectionType.value );
423423
@@ -586,12 +586,12 @@ struct HfTreeCreatorOmegacSt {
586586 track.globalIndex () == bachelor.globalIndex ()) {
587587 continue ;
588588 }
589- if ((track.itsNCls () >= minItsNCls ) &&
589+ if ((track.itsNCls () >= itsNClsMin ) &&
590590 (track.tpcNClsFound () >= minNoClsTrackedPionOrKaon) &&
591591 (track.tpcNClsCrossedRows () >= minNoClsTrackedPionOrKaon) &&
592- (track.tpcNClsCrossedRows () >= fractionTpcNclsFindable * track.tpcNClsFindable ()) &&
593- (track.tpcChi2NCl () <= maxTpcChi2Ncl ) &&
594- (track.itsChi2NCl () <= maxItsChi2Ncl ) &&
592+ (track.tpcNClsCrossedRows () >= tpcNclsFindableFraction * track.tpcNClsFindable ()) &&
593+ (track.tpcChi2NCl () <= tpcChi2NclMax ) &&
594+ (track.itsChi2NCl () <= itsChi2NclMax ) &&
595595 (std::abs (track.tpcNSigmaPi ()) < maxNSigmaPion || std::abs (track.tpcNSigmaKa ()) < maxNSigmaKaon)) {
596596 LOGF (debug, " .. combining with pion/kaon candidate %d" , track.globalIndex ());
597597 int trackMotherId = -1 ;
@@ -658,20 +658,20 @@ struct HfTreeCreatorOmegacSt {
658658
659659 if (decayChannel == o2::aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi) {
660660 // Match Omegac0 → Omega- + Pi+
661- indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , false >(mcParticles. value (), arrayDaughters, o2::constants::physics::kOmegaC0 ,
661+ indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , false >(mcParticles-> get (), arrayDaughters, o2::constants::physics::kOmegaC0 ,
662662 std::array{+kPiPlus , +kKMinus , +kProton , +kPiMinus }, true , &sign, 3 , &nPiToMuOmegac0, &nKaToPiOmegac0);
663663 } else if (decayChannel == o2::aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaK) {
664664 // Match Omegac0 → Omega- + K+
665- indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , false >(mcParticles. value (), arrayDaughters, o2::constants::physics::kOmegaC0 ,
665+ indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , false >(mcParticles-> get (), arrayDaughters, o2::constants::physics::kOmegaC0 ,
666666 std::array{+kKPlus , +kKMinus , +kProton , +kPiMinus }, true , &sign, 3 , &nPiToMuOmegac0, &nKaToPiOmegac0);
667667 }
668668 indexRecCharmBaryon = indexRec;
669669 if (indexRec > -1 ) {
670670 // Omega- → K pi p (Cascade match)
671- indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , true >(mcParticles. value (), arrayDaughtersCasc, +kOmegaMinus , std::array{+kKMinus , +kProton , +kPiMinus }, true , &signCasc, 2 , &nPiToMuCasc, &nKaToPiCasc);
671+ indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , true >(mcParticles-> get (), arrayDaughtersCasc, +kOmegaMinus , std::array{+kKMinus , +kProton , +kPiMinus }, true , &signCasc, 2 , &nPiToMuCasc, &nKaToPiCasc);
672672 if (indexRec > -1 ) {
673673 // Lambda → p pi (Lambda match)
674- indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , true >(mcParticles. value (), arrayDaughtersV0, +kLambda0 , std::array{+kProton , +kPiMinus }, true , &signV0, 1 , &nPiToMuV0);
674+ indexRec = RecoDecay::getMatchedMCRec<false , true , false , true , true >(mcParticles-> get (), arrayDaughtersV0, +kLambda0 , std::array{+kProton , +kPiMinus }, true , &signV0, 1 , &nPiToMuV0);
675675 if (decayChannel == o2::aod::hf_cand_casc_lf::DecayType2Prong::OmegaczeroToOmegaPi) {
676676 if (nPiToMuOmegac0 >= 1 && nKaToPiOmegac0 == 0 ) {
677677 isMatched = true ;
@@ -686,8 +686,8 @@ struct HfTreeCreatorOmegacSt {
686686 }
687687 }
688688 if (isMatched) {
689- auto particle = mcParticles. value ().rawIteratorAt (indexRecCharmBaryon);
690- origin = RecoDecay::getCharmHadronOrigin (mcParticles. value (), particle, false , &idxBhadMothers);
689+ auto particle = mcParticles-> get ().rawIteratorAt (indexRecCharmBaryon);
690+ origin = RecoDecay::getCharmHadronOrigin (mcParticles-> get (), particle, false , &idxBhadMothers);
691691 }
692692 }
693693
0 commit comments