Fitting problem with 5.25/02 built from source

Greetings all,

We are currently doing a series of experiments and I noted that I was getting different results for my calculations on my laptop (running Windows XP and using the standard Windows binaries version 5.24/00) compared to the same calculations using exactly the same datafiles and scripts on my home linux system using Root version 5.25/02 built from source (the results generated under Windows are in line with expectations while the results generated under linux appear wildly out of line).

I have tracked the problem down to a script which calls a fit (on my 5.24/00 system the fit uses minuit).

Is there some substantial difference in the way in a fit function should be called between 5.24/00 and 5.25/02?

Is there any known difficult in compiling 5.25/02 under Ubuntu 9.10 (specifically affecting minuit)?

I compiled version 5.25/02 under Ubuntu 9.10 on 31 October and it all seemed to work perfectly and I have been using it without any noticable problems until this fit function problem occurred during our current experiment run.

Anything else I should look for to diagnose what I might be doing wrong?

I apologise that I don’t have the full details of my 5.25/02 build with me but I am currently at my lab nursing an experiment and the linux system is at my home.

Regards

Hello,
there should not be difference between 5.25.02 and 5.24.
I would need more information on how the fit is performed and how is called to understand this problem
Best Regards

Lorenzo

Thank you for your prompt response Lorenzo,

I have attached the smallest set of files that can reproduce the problem. I apologise for the inelegance of the script. I am sending the full script so that you have a set in which I know the problem occurs. Unfortunately if any of the attached files are left out the script will crash without generating the problem.

The fit is called at line 333 of Heliofinal.C

When I run the script under 5.24/00 on Windows (standard Windows binaries) I get the following result

G2 = 0.6714 +/-0.0311   
G4 = 0.3473 +/-0.0188 
Chi-squared / NDF = 57.7928/  18 

This is in line with our expectations.

When I run exactly the same script using exactly the same files on a version of 5.25/02 built from source I get

G2 = 0.5029 +/-0.0753   
G4 = 0.0223 +/-0.0554 
Chi-squared / NDF = 638.9287/  18 

I hope this is a useful set of information. I will be happy to try to answer any more questions if they will help diagnose the issue

Regards
Xk_ge761209_r03.txt (1.02 KB)
ChooseNormalisation.txt (192 Bytes)
Heliofinal.C (17.1 KB)
ge761209_r03_PhiCanvas.root (15.5 KB)
ge761209_r03_AllCanvas.root (14.2 KB)

In case additional information is required the details of my linux build and system are as follows

ROOT 5.25/02 (trunk@30530, Sep 29 2009, 15:28:19 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.17.00, Dec 21, 2008

Ubuntu 9.10 - Kernel Linux 2.6.31-16-generic

gcc4:4.4.1-ubuntu2(karmic)

Hello,

Thank you for the files. I could reproduce the problem. It is due to a change in the TGraph::Eval function (root.cern.ch/viewvc?view=rev&revision=29722 ).
Are your points in the graph sorted or not ?

Best Regards

Lorenzo

Dear Lorenzo,

The points in the graph are in angle order (so not explicitly sorted but following the angular arrangements of the detectors).

Regards

Hello,

I have found the bug in the TGraph::Eval and I have a fix I will commit soon in the ROOT trunk. The problem appears when you call TGraph::Eval(x) exactly at the graph points. In your fitting function you could avoid this either by shifting a bit the x evaluation or by calling directly
TGraph::GetY or TGraph::GetPoint.

Thank you very much for your report

Best Regards

Lorenzo

Dear Lorenzo,

Thank you for helping resolve this really vexing problem.

Please post when the problem has been fixed in the trunk and I will recompile the version used on my desktop at home.

Regards

It is now fixed in the trunk, (revision >= 31907)

Best Regards

Lorenzo

Dear Lorenzo,

Thanks for your help. I’ll recompile and test over the next few hours.

Regards

Dear Lorenzo,

Just to confirm that rebuilding from the trunk (SVN 31942) resolved my issue.

I apologise for the delay in confirmation - I had some other issues related to my home internet connection that I had resolve before I could access the trunk and recompile.

Thank you again for your help in resolving this issue.

Regards