Skip to content

Conversation

@zhangbiao-phy
Copy link
Collaborator

@zhangbiao-phy zhangbiao-phy commented Oct 5, 2025

The issue is It will always use the default value when the int configurable caste to int8_t in Filter or Partition

@github-actions github-actions bot changed the title [PWGHF, PWGCF] fix the bug of configurable caste int8_t [PWGHF,PWGCF] fix the bug of configurable caste int8_t Oct 5, 2025
@github-actions
Copy link

github-actions bot commented Oct 5, 2025

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

@zhangbiao-phy zhangbiao-phy changed the title [PWGHF,PWGCF] fix the bug of configurable caste int8_t [PWGHF,PWGCF] fix the bug of int configurable caste to int8_t Oct 5, 2025
@zhangbiao-phy zhangbiao-phy changed the title [PWGHF,PWGCF] fix the bug of int configurable caste to int8_t [PWGHF,PWGCF] fix the issue of int configurable caste to int8_t Oct 5, 2025
@zhangbiao-phy zhangbiao-phy changed the title [PWGHF,PWGCF] fix the issue of int configurable caste to int8_t [PWGHF,PWGCF] fix the issue of int configurable caste to int8_t and add QA plot of charm mass vs pt in MC rec Oct 5, 2025
@zhangbiao-phy zhangbiao-phy marked this pull request as ready for review October 5, 2025 12:48
DECLARE_SOA_COLUMN(Prong1Phi, prong1Phi, float); //! Track phi of charm hadron prong1
DECLARE_SOA_COLUMN(Prong2Phi, prong2Phi, float); //! Track phi of charm hadron prong2
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int8_t); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe that int8_t is the only integral type affected by this issue. Why not use int16_t?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for the suggestion! Using int16_t would indeed be more memory-efficient, but I kept it as int for consistency with other columns and to avoid additional casting in the task code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, but I couldn't find a line where additional casting would be needed. Can you refer them?

Copy link
Collaborator Author

@zhangbiao-phy zhangbiao-phy Oct 5, 2025

Choose a reason for hiding this comment

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

here:

Filter hfMcSelFilter = (nabs(aod::fdhf::flagMc) == charmHadMcSel);

I will get the error if I didn't caste it to int16_t: Reason: Failed to create filter: ExpressionValidationError: Function bool greater_than_or_equal_to(int16, int32) not supported yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see why charmHadMcSel has to be int.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Your solution is to promote all concerned variables to int. I am proposing to make them the smallest working integral type, which AFAIK is int16_t .

I agree with your point and I also want to improve it with this point. However as I mentioned above, I already tried int16_t. It doesn't work (seems not support). So could you please approve it with current version?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you are referring to the error

Function bool greater_than_or_equal_to(int16, int32) not supported yet.

I believe that one is irrelevant to my proposal.
I assume that in that case flagMc was int16 and charmHadMcSel was int.
What I am proposing is to have both of them int16 which should be supported.

Copy link
Collaborator Author

@zhangbiao-phy zhangbiao-phy Oct 5, 2025

Choose a reason for hiding this comment

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

I already tried both case (flagMc was int16 and charmHadMcSel was int16). it is not the case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you mean? What is not the case? What is the error then?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will try to investigate locally. Go ahead.

@shouqiye shouqiye enabled auto-merge (squash) October 5, 2025 13:48
@zhangbiao-phy zhangbiao-phy disabled auto-merge October 5, 2025 17:10
@zhangbiao-phy zhangbiao-phy enabled auto-merge (squash) October 5, 2025 17:10
Copy link
Collaborator

@alibuild alibuild left a comment

Choose a reason for hiding this comment

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

Auto-approving on behalf of @zhangbiao-phy.

@zhangbiao-phy zhangbiao-phy merged commit 716ee17 into AliceO2Group:master Oct 5, 2025
28 of 29 checks passed
@victor-gonzalez
Copy link
Collaborator

@zhangbiao-phy @shouqiye @ariedel-cern @lauraser Are we sure this does not break backward compatibility with already produced derived data?

@zhangbiao-phy
Copy link
Collaborator Author

zhangbiao-phy commented Oct 6, 2025

@zhangbiao-phy @shouqiye @ariedel-cern @lauraser Are we sure this does not break backward compatibility with already produced derived data?

Hi @victor-gonzalez, sorry for confused you again! I think the changes only related to the HF part, we don't produce derived data for common used, since there are only two analysis (pLc and pDplus) used such tables for the moment.

@lauraser
Copy link
Collaborator

lauraser commented Oct 6, 2025

@victor-gonzalez thanks a lot for tagging me, I can confirm the statement by Biao, that these are tables used by HF exclusively and affect only their derived data. So everything should be fine for LF analyses.

jinhyunni pushed a commit to jinhyunni/O2Physics that referenced this pull request Oct 11, 2025
ArkaprabhaSaha001 pushed a commit to ArkaprabhaSaha001/O2Physics that referenced this pull request Oct 21, 2025
ThePhDane pushed a commit to ThePhDane/O2Physics that referenced this pull request Nov 3, 2025
jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
lmattei01 pushed a commit to lmattei01/O2Physics that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants