I am plotting some quantity after reading some branches of tree in two different computers and getting different plots (attached), even though the macro and root files were same for both of them.
The root version in one computer is 5.34/18 while in other is 5.34/09. Is this difference is due to different versions of root or something else may be?
Please suggest what may be the problem and how can I fix this.
Do you get different plots also if you run the 2 different versions on the same computer (just to know if it comes from the different version or from the different computer).
Now I install the 2 different versions on the same computer and I got the different plots. What could be the reason for this and how I will be sure which one is correct?
Please find the attached plots to view plots (name of file contains root versions).
seems you have for root 5.34.18 (laptop) a few hundred extra entries at x=0.
You should check the number of entries for the two cases which are unfortunately
not shown in your plots.
Then check where these extra entries at x=0 come from.
I suspect a bug in your program (e.g. comparing double values for equality)
giving different (wrong) results in a different environment.
I will try your suggestion once again but as I remember the number of entries are same.
Also, please have a look at my previous comment; In which I added the two plots made on same pc using same code but with different root versions. So, after looking these plots we may say that there is some difference in the two root versions as far as I thought.
As Otto, I’d suspect a bug in your code. You could access elements past the array size like
int a[5]={0}; hist.Fill(a[5]); // access past array size
which gives undefined behavior. What is at a[5] might be different in v5-34-18 and v5-34-09. To find such mistakes, compile the script if you have not yet done so and see whether your compiler gives you warnings and errors that you can fix. Run
root -l myScript.C++
instead of
root -l myScript.C
Post a simplified version of your code if this doesn’t help.