Skip to content

[PWGHF] [xic0omegac0] Updated candidate creator & candidate selector#16042

Open
jinhyunni wants to merge 6 commits intoAliceO2Group:masterfrom
jinhyunni:dev
Open

[PWGHF] [xic0omegac0] Updated candidate creator & candidate selector#16042
jinhyunni wants to merge 6 commits intoAliceO2Group:masterfrom
jinhyunni:dev

Conversation

@jinhyunni
Copy link
Copy Markdown
Contributor

@jinhyunni jinhyunni commented Apr 30, 2026

candidateCreatorXic0Omegac0Qa:

  • Removed unused configurables massOfBach, massOfCharmBaryon
  • Removed unnecessary configurables for storing pdg Id of final state hadrons in case of anti-Xic0

candidateSelectorToXiPiQa:

  • Removed continue statement inside candidate loop

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

O2 linter results: ❌ 0 errors, ⚠️ 2 warnings, 🔕 1 disabled

@github-actions github-actions Bot changed the title [xic0omegac0] Updated candidate creator & candidate selector [PWGHF] [xic0omegac0] Updated candidate creator & candidate selector Apr 30, 2026
Comment on lines +261 to +269
int pdgIdOfV0DauPos, pdgIdOfV0DauNeg, pdgIdOfBach, pdgIdOfCharmBach;
int pdgIdOfAntiV0DauPos, pdgIdOfAntiV0DauNeg, pdgIdOfAntiBach, pdgIdOfAntiCharmBach;
int pdgIdOfV0, pdgIdOfCascade, pdgIdOfCharmBaryon;

// Track PID - Used in DCAFitter
int trackPidOfCascade;

// Mass of daughter tracks & V0s & cascades & charm baryons;
float massOfV0DauPos, massOfV0DauNeg, massOfBach, massOfCharmBach;
float massOfV0, massOfCascade, massOfCharmBaryon;
float massOfV0DauPos, massOfV0DauNeg, massOfCharmBach;
float massOfV0, massOfCascade;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always initialise in declaration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vkucera,
They are set to be initialized within init function.
Do they still needed to be initialized at the moment of declaration?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it can be just with {}, but it should always be there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of that issue.
Thanks for letting me know!
I've added commit to incorporate your comment.

@zhangbiao-phy
Copy link
Copy Markdown
Collaborator

candidateCreatorXic0Omegac0Qa:

  • Removed unused configurables massOfBach, massOfCharmBaryon
  • Removed unnecessary configurables for storing pdg Id of final state hadrons in case of anti-Xic0

candidateSelectorToXiPiQa:

  • Removed continue statement inside candidate loop

Hi @jinhyunni, why you remove continue? then which means you can't filter the candidates based on BDT preselection, this is really you want to do?

@jinhyunni
Copy link
Copy Markdown
Contributor Author

candidateCreatorXic0Omegac0Qa:

  • Removed unused configurables massOfBach, massOfCharmBaryon
  • Removed unnecessary configurables for storing pdg Id of final state hadrons in case of anti-Xic0

candidateSelectorToXiPiQa:

  • Removed continue statement inside candidate loop

Hi @jinhyunni, why you remove continue? then which means you can't filter the candidates based on BDT preselection, this is really you want to do?

Hi @zhangbiao-phy.
This action was done to prevent the possible error we've dicussed in the mattermost.
I though if I leave continue statement within in the candidate loop, than the output of candidate selection table might have different rows with candidate table.
That's why I removed them.

@zhangbiao-phy
Copy link
Copy Markdown
Collaborator

candidateCreatorXic0Omegac0Qa:

  • Removed unused configurables massOfBach, massOfCharmBaryon
  • Removed unnecessary configurables for storing pdg Id of final state hadrons in case of anti-Xic0

candidateSelectorToXiPiQa:

  • Removed continue statement inside candidate loop

Hi @jinhyunni, why you remove continue? then which means you can't filter the candidates based on BDT preselection, this is really you want to do?

Hi @zhangbiao-phy. This action was done to prevent the possible error we've dicussed in the mattermost. I though if I leave continue statement within in the candidate loop, than the output of candidate selection table might have different rows with candidate table. That's why I removed them.

Hi @jinhyunni, I see your point. maybe we can try to address this at a later stage, when you subscribe to the table. You can refer to the solution used for the 3-prong case here:

soa::Join<aod::HfCand3ProngWPidPiKaPr, aod::HfSelLc> const& candidates,
aod::HfMlLcToPKPi const& candidateMlScores,
. If you remove the continue here, the final tree will become very large. This issue will be even more pronounced in Pb–Pb analyses.

@jinhyunni
Copy link
Copy Markdown
Contributor Author

jinhyunni commented Apr 30, 2026

candidateCreatorXic0Omegac0Qa:

  • Removed unused configurables massOfBach, massOfCharmBaryon
  • Removed unnecessary configurables for storing pdg Id of final state hadrons in case of anti-Xic0

candidateSelectorToXiPiQa:

  • Removed continue statement inside candidate loop

Hi @jinhyunni, why you remove continue? then which means you can't filter the candidates based on BDT preselection, this is really you want to do?

Hi @zhangbiao-phy. This action was done to prevent the possible error we've dicussed in the mattermost. I though if I leave continue statement within in the candidate loop, than the output of candidate selection table might have different rows with candidate table. That's why I removed them.

Hi @jinhyunni, I see your point. maybe we can try to address this at a later stage, when you subscribe to the table. You can refer to the solution used for the 3-prong case here:

soa::Join<aod::HfCand3ProngWPidPiKaPr, aod::HfSelLc> const& candidates,
aod::HfMlLcToPKPi const& candidateMlScores,

. If you remove the continue here, the final tree will become very large. This issue will be even more pronounced in Pb–Pb analyses.

Thanks for your thoughtful comment on this update.
I'm not sure if it's the best way to mitigate this issue, but for now, I've swaped the order of filling candidate selection table.

@jinhyunni jinhyunni closed this Apr 30, 2026
@jinhyunni jinhyunni reopened this Apr 30, 2026
@jinhyunni
Copy link
Copy Markdown
Contributor Author

And sorry for accidentaly closing this PR without appropriate consultion.
I wanted to push the comment button, but accidently pushed close this comment button 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

4 participants