Skip to content

Commit d18a4d8

Browse files
committed
Fix access to charm-bachelor track in selector
1 parent 128da52 commit d18a4d8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎PWGHF/TableProducer/candidateSelectorOmegac0ToOmegaPiQa.cxx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,13 @@ struct HfCandidateSelectorToOmegaPiQa {
536536
// Apply cuts with charm baryon & charm bachelor related informations
537537
// returns true if all cuts are passed
538538
template <int svReco, typename T>
539-
bool selectOnHf(const T& candidate, const int& inputPtBin)
539+
bool selectOnHf(const T& candidate, TracksSel const& tracks, const int& inputPtBin)
540540
{
541541
registry.fill(HIST("hSelStatusHf"), 0.0);
542542

543543
// eta selection on charm bayron bachelor
544-
if (std::abs(candidate.template prong1_as<TracksSel>().eta()) > etaTrackCharmBachMax) {
544+
auto trackPiFromCharm = tracks.rawIteratorAt(candidate.prong1Id());
545+
if (std::abs(trackPiFromCharm.eta()) > etaTrackCharmBachMax) {
545546
return false;
546547
}
547548
registry.fill(HIST("hSelStatusHf"), 1.0);
@@ -661,7 +662,7 @@ struct HfCandidateSelectorToOmegaPiQa {
661662

662663
// Topological selection
663664
const bool selectionResOnLF = selectOnLf<svReco>(candidate);
664-
const bool selectionResOnHF = selectOnHf<svReco>(candidate, pTBin);
665+
const bool selectionResOnHF = selectOnHf<svReco>(candidate, tracks, pTBin);
665666
if (!selectionResOnLF || !selectionResOnHF) {
666667
resultSelections = false;
667668
}

0 commit comments

Comments
 (0)