Getting different plots in two different computers

Hi all,

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.

Thanks in advance.

with regards,
Ramkrishna
Offset_Run060_laptop.pdf (18.3 KB)
Offset_Run060_pc.pdf (18.2 KB)

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).

I did not check with the two different versions of root on same computer. I will check and let you know.

Hello couet,

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).

with regards,
Ram
Offset_Run060_test_5_34_18.pdf (22.5 KB)
Offset_Run060_test_5_34_09.pdf (22.9 KB)

Hi Ramkrishna,

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.

Cheers
Otto

Thanks Otto,

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.

Dear Ramkrishna,

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.

Regards,
Hans