Skip to content

Conversation

@pstahlhu
Copy link
Contributor

@lubynets

  • Fix canvas division for the plotting of mass fits and the corresponding residuals
  • Add fit/data histograms to estimate fit quality
  • Add possibility to constrain the relative fraction of the two Gaussians in a Double Gaussian signal function
  • Store second sigma and the relative fraction of double Gaussians to output file, so that they can be analyzed and possibly constrained in a following iteration

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

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

@github-actions github-actions bot changed the title [PWGHF]: Improvements to HFInvMassFitter [PWGHF] Improvements to HFInvMassFitter Sep 16, 2025
@lubynets
Copy link
Contributor

Hi @pstahlhu,
thanks for the development! The PR generally looks fine to me with some comments and a PR which I sent to your branch.

@pstahlhu pstahlhu marked this pull request as draft September 19, 2025 12:59
@pstahlhu pstahlhu requested a review from lubynets September 19, 2025 15:39
@pstahlhu pstahlhu marked this pull request as ready for review September 19, 2025 15:40
Copy link
Contributor

@lubynets lubynets left a comment

Choose a reason for hiding this comment

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

Hi @pstahlhu,
Thanks for the development and addressing my comments! The PR looks fine for me with two comments:

  • can you recover the $S_{\text{count}}$ in the statistics table?
  • if you manage generally to improve the quality of printing of the statistics table on the canvas (both interactive and pdf), such as alignment, relative size of font to sub-canvas size, etc. , that's will be nice. But I understand that it's tough to foreseen different canvas size divisions, so maybe there is no universal solution...

@lubynets
Copy link
Contributor

Hi @pstahlhu, could you maybe resolve conflicts with target branch?
BTW, concerning the $S_{\mathrm{count}}$ value - in case of double Gaus does the algorithm ensure that the greater sigma will be used for its computation?

@vkucera vkucera marked this pull request as draft October 24, 2025 13:36
@lubynets
Copy link
Contributor

lubynets commented Nov 3, 2025

Hi @pstahlhu, could you maybe resolve conflicts with target branch? BTW, concerning the S count value - in case of double Gaus does the algorithm ensure that the greater sigma will be used for its computation?

Hi @pstahlhu, let me gently remind to resolve the conflict. It is basically resolved by me, I hope this PR (or if you prefer an explicit commit) you'll find useful. If you have any questions about it, feel free to ask.

@pstahlhu pstahlhu marked this pull request as ready for review November 7, 2025 12:48
@vkucera
Copy link
Collaborator

vkucera commented Nov 12, 2025

@pstahlhu @lubynets What is the status?

@lubynets
Copy link
Contributor

@pstahlhu @lubynets What is the status?

From my side the PR is fine, although the last force push discards some clang-tidy fixes done by you, @vkucera. I propose one of the three solutions:

  • @pstahlhu to fix the mentioned discarding;
  • I have a branch with the same content as Phil's PR but conflict is resolved via merge, not rebase - I can submit a new PR;
  • leave as is - I have plans to refactor the fitter and enhance its functionality, so I'll be able to revert the discarded clang-tidy fixes later.

@pstahlhu
Copy link
Contributor Author

Hi @vkucera @lubynets, thanks for following up on this.
I made sure that I did not change Vit's clang-tidy fixes from the previous PRs and also comply with them in my new implementation, and I also tried to make some code look better visually.
From my side, the PR is ready to be merged now. Could you please have a look?
Thanks a lot!

@lubynets
Copy link
Contributor

lubynets commented Nov 14, 2025

Hi @vkucera @lubynets, thanks for following up on this. I made sure that I did not change Vit's clang-tidy fixes from the previous PRs and also comply with them in my new implementation, and I also tried to make some code look better visually. From my side, the PR is ready to be merged now. Could you please have a look? Thanks a lot!

Hi @pstahlhu, thanks for updating the PR! For me it is fine. There is one comment, could you please look at it?

setFixedValue(fixMean, fixMeanManual, hMeanToFix, std::bind(&HFInvMassFitter::setFixGaussianMean, massFitter, std::placeholders::_1), "MEAN");
setFixedValue(fixSigma, fixSigmaManual, hSigmaToFix, std::bind(&HFInvMassFitter::setFixGaussianSigma, massFitter, std::placeholders::_1), "SIGMA");
setFixedValue(fixSecondSigma, fixSecondSigmaManual, hSecondSigmaToFix, std::bind(&HFInvMassFitter::setFixSecondGaussianSigma, massFitter, std::placeholders::_1), "SECOND SIGMA");
setFixedValue(fixFracDoubleGaus, fixFracDoubleGausManual, nullptr, std::bind(&HFInvMassFitter::setFixFrac2Gaus, massFitter, std::placeholders::_1), "FRAC DOUBLE GAUS");
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't it crash here due to nullptr as the third argument? The lambda-function does not foresee this case explicitly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, definitely a null pointer dereference there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, I don't understand why there are raw pointers all over the place. They should be replaced with smart pointers or just with normal stack allocations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @lubynets, thanks for spotting this error! I think that it should be fixed now. Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for fix! Yes, now it should be fine.

@pstahlhu
Copy link
Contributor Author

@vkucera Could you please merge this PR if you think that it's ready to merge? Thanks!

@vkucera
Copy link
Collaborator

vkucera commented Nov 17, 2025

@vkucera Could you please merge this PR if you think that it's ready to merge? Thanks!

@zhangbiao-phy @stefanopolitano

Copy link
Collaborator

@zhangbiao-phy zhangbiao-phy left a comment

Choose a reason for hiding this comment

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

@zhangbiao-phy zhangbiao-phy merged commit 68d5234 into AliceO2Group:master Nov 17, 2025
14 of 15 checks passed
lmattei01 pushed a commit to lmattei01/O2Physics that referenced this pull request Dec 5, 2025
Co-authored-by: Oleksii Lubynets <O.Lubynets@gsi.de>
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