Error bar not computed in Root with AthAnalysisBase2.4.11

Hi everyone,

Apologies if it is not the correct place to post this.

I am using AthAnalysisBase 2.4.11, with root version ROOT 6.04/16 for my analysis. Using this ROOT version I find out that root is not computing error bars while running over data set. For Monte Carlo samples everything is find. Please find in the attachment


a plot showing Data/MC and you can see no error bars on data points.

I am correctly using histogram Sumw2() method, also I dont see this problem if I use ROOT version 6.02/12

Any suggestions how to fix this.

Thank you,
Babar

Do you have the problem with 6.06 ?

Hello,

As I am using AthAnalysisBase 2.4.11 this is the latest release and it has only ROOT version 6.04.

I dont know if this problem persists with ROOT 6.06 or not.

P.S I use lxplus for analysis.

OK. May be you can try to save you TCanvas as a .C file and post it here ?

I am not sure what you mean by to save TCanvas?

As I wrote before when I use ROOT 6.02 everything is fine and when I use ROOT 6.04 I see this problem.
There is no such bug or issue in my code with plotting or filling the histograms. Its just unexceptional problem with this ROOT version.

I am just wondering if there are major changes in TH1 class happened when going to 6.02 to 6.04?

The graphics window … File -> Save -> yourcnavas.C

[quote=“couet”][quote]
I am not sure what you mean by to save TCanvas?
[/quote]

The graphics window … File -> Save -> yourcnavas.C[/quote]

Here it is Canvas_1.C (2.31 KB)

I am sorry I didnt mentioned it before. I am actually using python script for plotting. So the plot which I posted before was made by using python.

Does it has to do something with pyRoot?

Your macro gives me the attached plot.
No it has nothing to do with Python.


Well If I plot the same histogram using python I get this


So in fact it has to do with python.

Am I missing something here??

I guess It has more to do with the ROOT version : I am using the master. 6.07/07

I will tell Lorenzo.

[quote=“couet”]I guess It has more to do with the ROOT version : I am using the master. 6.07/07

I will tell Lorenzo.[/quote]

Hello,

Any luck of solving this issue??

Is it ok with C++ ?

Yes in C++ its Ok.

But all my scripts are in python. I can’t switch to c++ now.

can you post here the little python script ?

Here is the file . I put some comments in. Please let me know if there is any question.
script.py (2.5 KB)

It seems I am missing some “imports”. Can they be deleted ?

$ python script.py 
Traceback (most recent call last):
  File "script.py", line 15, in <module>
    import PhysicsLight.PhysicsLightXSec    as XSec
  File "/Users/couet/git/roottrunk-bin/lib/ROOT.py", line 303, in _importhook
    return _orig_ihook( name, *args, **kwds )
ImportError: No module named PhysicsLight.PhysicsLightXSec

No they cannot be deleted. From this file PhysicsLightXSec I am using some classes. Basically that class search for root file in a directory and open it. If there are lot of root files, it adds them.

I am sorry I think you cannot run this script. I just posted that you can get the idea what I am doing.

Just wondering, Is there a way that one can forcefully change the root version when importing?

You can give me some hints I can try that for you If you like.

As far as I can see your macro looks fine.
What about if you convert Canvas_1.C into python ? That could be a simpler way to test.

[quote=“couet”]As far as I can see your macro looks fine.
What about if you convert Canvas_1.C into python ? That could be a simpler way to test.[/quote]

I modify the script. It is working for me for ROOT version 6.02

Could you try it for ROOT version 6.04 or higher?

Thanks

script.py (1.95 KB)