Skip to content

Commit ac16c80

Browse files
authored
[PWGLF] nonPromptCascade task: fixed check on cascades from HF (#8944)
1 parent 9df5dc2 commit ac16c80

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PWGLF/Tasks/Strangeness/nonPromptCascade.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,11 @@ struct NonPromptCascadeTask {
597597

598598
int pdgCodeMom = 0;
599599
std::tuple<bool, bool> fromHF{false, false};
600-
if (isGoodCascade && isGoodMatch) {
600+
if (isGoodCascade) {
601601
fromHF = isFromHF(track.mcParticle());
602-
pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().mothers_as<aod::McParticles>()[0].pdgCode() : 0;
602+
if (isGoodMatch) {
603+
pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().mothers_as<aod::McParticles>()[0].pdgCode() : 0;
604+
}
603605
}
604606
int itsTrackPDG = ITStrack.has_mcParticle() ? ITStrack.mcParticle().pdgCode() : 0;
605607
float deltaPtITSCascade = std::hypot(cascadeMomentum[0], cascadeMomentum[1]) - ITStrack.pt();

0 commit comments

Comments
 (0)