@@ -590,7 +590,7 @@ struct HfCandidateCreator3Prong {
590590 uint8_t bitmapProngsContributorsPV = 0 ;
591591 if (indexCollision == track0.collisionId () && track0.isPVContributor ()) {
592592 SETBIT (bitmapProngsContributorsPV, 0 );
593- }
593+ }
594594 if (indexCollision == track1.collisionId () && track1.isPVContributor ()) {
595595 SETBIT (bitmapProngsContributorsPV, 1 );
596596 }
@@ -957,7 +957,7 @@ struct HfCandidateCreator3ProngExpressions {
957957 auto finalStates = getDecayChannel3Prong (pdg);
958958 for (const auto & [chn, finalState] : finalStates) {
959959 std::array<int , 3 > finalStateParts3Prong = std::array{finalState[0 ], finalState[1 ], finalState[2 ]};
960- if (finalState.size () > 3 ) { // Partly Reco 3 -prong decays
960+ if (finalState.size () > 3 ) { // Partly Reco 4 -prong decays
961961 if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
962962 indexRec = RecoDecay::getMatchedMCRec<false , false , true , true , true >(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true , &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
963963 } else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
@@ -968,11 +968,10 @@ struct HfCandidateCreator3ProngExpressions {
968968 indexRec = RecoDecay::getMatchedMCRec<false , false , true , false , false >(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true , &sign, depth);
969969 }
970970
971- if (indexRec != -1 ) {
971+ if (indexRec > -1 ) {
972972 auto motherParticle = mcParticles.rawIteratorAt (indexRec);
973973 if (finalState.size () == 4 ) { // Check if the final state has 4 particles
974974 std::array<int , 4 > finalStateParts3ProngAll = std::array{finalState[0 ], finalState[1 ], finalState[2 ], finalState[3 ]};
975- // std::array<int, 4> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], sign*finalState[3]};
976975 if (sign < 0 ) {
977976 for (auto & part : finalStateParts3ProngAll) {
978977 if (part == kPi0 ) {
@@ -983,8 +982,7 @@ struct HfCandidateCreator3ProngExpressions {
983982 if (!RecoDecay::isMatchedMCGen (mcParticles, motherParticle, pdg, finalStateParts3ProngAll, false , &sign, depth)) {
984983 indexRec = -1 ; // Reset indexRec if the generated decay does not match the reconstructed one is not matched
985984 }
986- } else if (finalState.size () == 5 ) { // Check if the final state has 3 particles
987- // std::array<int, 5> finalStateParts3ProngAll = std::array{finalState[0], finalState[1], finalState[2], sign*finalState[3], sign*finalState[4]};
985+ } else if (finalState.size () == 5 ) { // Check if the final state has 5 particles
988986 std::array<int , 5 > finalStateParts3ProngAll = std::array{finalState[0 ], finalState[1 ], finalState[2 ], finalState[3 ], finalState[4 ]};
989987 if (sign < 0 ) {
990988 for (auto & part : finalStateParts3ProngAll) {
@@ -993,7 +991,7 @@ struct HfCandidateCreator3ProngExpressions {
993991 }
994992 }
995993 }
996- if (!RecoDecay::isMatchedMCGen (mcParticles, motherParticle, pdg, finalStateParts3ProngAll, false , &sign, depth)) {
994+ if (!RecoDecay::isMatchedMCGen (mcParticles, motherParticle, pdg, finalStateParts3ProngAll, true , &sign, depth)) {
997995 indexRec = -1 ; // Reset indexRec if the generated decay does not match the reconstructed one is not matched
998996 }
999997 }
@@ -1013,7 +1011,6 @@ struct HfCandidateCreator3ProngExpressions {
10131011 continue ; // Skip unsupported final states
10141012 }
10151013 if (indexRec > -1 ) {
1016- // std::cout << "Matched final state: " << chn << " with PDG code: " << pdg << std::endl;
10171014 flag = sign * chn;
10181015
10191016 // Flag the resonant decay channel
@@ -1031,8 +1028,6 @@ struct HfCandidateCreator3ProngExpressions {
10311028 arrPDGDaugh[iProng] = daughI.pdgCode ();
10321029 }
10331030 flagResonantDecay<true >(pdg, &channel, arrPDGDaugh);
1034- LOG (info) << " [matchFinalStateCorrBkgs] Matched final state: " << chn << " with PDG code: " << static_cast <int >(pdg) << " , flag: " << static_cast <int >(flag) << " , &sign: " << static_cast <int >(sign);
1035- LOG (info) << " [matchFinalStateCorrBkgs] Flag set to: " << static_cast <int >(flag) << " sign: " << static_cast <int >(sign) << " for channel: " << static_cast <int >(channel);
10361031 }
10371032 break ; // Exit loop if a match is found
10381033 }
@@ -1041,7 +1036,6 @@ struct HfCandidateCreator3ProngExpressions {
10411036 break ; // Exit loop if a match is found
10421037 }
10431038 }
1044- // LOG(info) << "Corr Bkg matching ended with flag " << static_cast<int>(flag) << " and indexRec " << static_cast<int>(indexRec) << ", &sign " << static_cast<int>(sign) << ", channel " << static_cast<int>(channel);
10451039 } else {
10461040 // D± → π± K∓ π±
10471041 if (flag == 0 ) {
0 commit comments