Skip to content
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

Same histograms and same code but different fit results plotted in timelines #14

Open
hauenst opened this issue Oct 15, 2022 · 7 comments

Comments

@hauenst
Copy link
Contributor

hauenst commented Oct 15, 2022

During RGB pass0 timelines an interesting bug/feature/issue was observed. The two timelines https://clas12mon.jlab.org/rgb/pass0/v28.21_sqlite/dc/timeline/ and https://clas12mon.jlab.org/rgb/pass0/v28.21_mini/dc/timeline/ have the same histogram inputs but some of the DC timelines are different (dc_residuals_sec_sl mean/sigma, dc_residuals_sec mean/sigma). This is due to a different fit result stored in the files. However, the same monitoring/timeline code was used by Zhiwen and the underlying histograms are identical.

@drewkenjo
Copy link
Collaborator

This is related to the fitting stabilities of groot. I think @Sangbaek did the best he could with guessing starting parameters, and performing fits multiple times to choose best chi2 result.
If you have any suggestions how to improve it we can discuss it.

@hauenst
Copy link
Contributor Author

hauenst commented Oct 17, 2022

We do perform the fit multiple times in DCfitter for the single Gaussian distribution with the same set of starting parameters. The best chi2 result is chosen. I am still surprised that this doesnt work in the same way twice on the same histogram.
But if it is a problem of groot then we cannot do anything besides documenting it so that no-one else is surprised in the future

@drewkenjo
Copy link
Collaborator

I would even argue it's a problem of Minuit implementation in Java.
@raffaelladevita what do you think?

@baltzell
Copy link
Contributor

I remember with HPS thinking I found using jminuit directly to be always reproducible given the same starting conditions, but maybe not.

If we have a minimal test case people can easily run, doing a fit multiple times with the same initial parmaeters and getting different results, that might be helpful.

@raffaelladevita
Copy link
Contributor

My experience with groot and jminuit is also that results are reproducible. Yes, we need an easy way to run this fit and do some debugging

@drewkenjo
Copy link
Collaborator

@hauenst could you provide such an example for people to test?

@hauenst
Copy link
Contributor Author

hauenst commented Oct 18, 2022

well my groovy knowledge is rather poor. I am not sure where to start to also include the reading of the monitoring histograms. I think dc_residuals_sec_sl.groovy should be a simple example. One can just replace the storing of sigma and means in a list to storing it in a text file or printing them out and probably need to add a string of the input file name.

Like Nathan and Raffaella wrote, I would think jminuit itself is reproducible on the same histogram but the interplay between reading histograms for multiple sec/sl, fitting them and storing it might cause the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants