-
Notifications
You must be signed in to change notification settings - Fork 613
[PWGHF] Improvements to HFInvMassFitter #13002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
O2 linter results: ❌ 1 errors, |
lubynets
left a comment
There was a problem hiding this 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...
|
Hi @pstahlhu, could you maybe resolve conflicts with target branch? |
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. |
|
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:
|
|
Hi @vkucera @lubynets, thanks for following up on this. |
Hi @pstahlhu, thanks for updating the PR! |
PWGHF/D2H/Macros/runMassFitter.C
Outdated
| 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"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
@vkucera Could you please merge this PR if you think that it's ready to merge? Thanks! |
|
zhangbiao-phy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Oleksii Lubynets <O.Lubynets@gsi.de>
@lubynets