Skip to content

Commit d8e2be3

Browse files
mfagginMattia Faggin
andauthored
[PWGHF] Fix matching to MC for generated Sc(2455). (#10766)
Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent c76357a commit d8e2be3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ struct HfCandidateSigmac0plusplusMc {
515515
if (std::abs(daughter.pdgCode()) != Pdg::kLambdaCPlus)
516516
continue;
517517
// if (std::abs(daughter.flagMcMatchGen()) == (1 << aod::hf_cand_3prong::DecayType::LcToPKPi)) {
518-
if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kLambdaCPlus, std::array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2)) {
518+
if (RecoDecay::isMatchedMCGen(mcParticles, daughter, Pdg::kLambdaCPlus, std::array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2)) {
519519
/// Λc+ daughter decaying in pK-π+ found!
520520
flag = sign * (1 << aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi);
521521
break;
@@ -529,7 +529,7 @@ struct HfCandidateSigmac0plusplusMc {
529529
if (std::abs(daughter.pdgCode()) != Pdg::kLambdaCPlus)
530530
continue;
531531
// if (std::abs(daughter.flagMcMatchGen()) == (1 << aod::hf_cand_3prong::DecayType::LcToPKPi)) {
532-
if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kLambdaCPlus, std::array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2)) {
532+
if (RecoDecay::isMatchedMCGen(mcParticles, daughter, Pdg::kLambdaCPlus, std::array{+kProton, -kKPlus, +kPiPlus}, true, &sign, 2)) {
533533
/// Λc+ daughter decaying in pK-π+ found!
534534
flag = sign * (1 << aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi);
535535
break;
@@ -539,7 +539,6 @@ struct HfCandidateSigmac0plusplusMc {
539539

540540
/// check the origin (prompt vs. non-prompt)
541541
if (flag != 0) {
542-
auto particle = mcParticles.rawIteratorAt(indexRec);
543542
origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers);
544543
}
545544
/// fill the table with results of generation level MC matching

0 commit comments

Comments
 (0)