cms-analysis / CombineHarvester

CMSSW package for the creation, editing and analysis of combine datacards and workspaces
cms-analysis.github.io/CombineHarvester/
15 stars 180 forks source link

Double no longer an attribute of ROOT for root version 6.22 #305

Closed 7quantumphysics closed 11 months ago

7quantumphysics commented 11 months ago

When trying to make "brazilian" limit plots with CombineTools, python /my/eos/space/CMSSW_11_3_4/src/CombineHarvester/CombineTools/scripts/plotLimits.py limits_RSGluon.json --show exp --logy I get an error where ROOT.Double is not an attribute that can be used. The traceback is included below for details: Traceback (most recent call last): File "/my/eos/space/CMSSW_11_3_4/src/CombineHarvester/CombineTools/scripts/plotLimits.py", line 112, in <module> axis = plot.CreateAxisHists(len(pads), list(graph_sets[-1].values())[0], True) File "/my/eos/space/CMSSW_11_3_4/python/CombineHarvester/CombineTools/plotting.py", line 487, in CreateAxisHists h = CreateAxisHist(src, at_limits) File "/my/eos/space/CMSSW_11_3_4/python/CombineHarvester/CombineTools/plotting.py", line 469, in CreateAxisHist x = R.Double(0.) File "/cvmfs/cms.cern.ch/slc7_amd64_gcc900/lcg/root/6.22.08-ljfedo/lib/ROOT/_facade.py", line 163, in _fallback_getattr raise AttributeError("Failed to get attribute {} from ROOT".format(name)) AttributeError: Failed to get attribute Double from ROOT

For more details, I have installed the recommended version of Combine (v9), followed by version 2.0.0 of CombineHarvester, and a clone of auxiliaries directory as recommended here

Following a forum discussion, it seems that this is because of the root version 6.22 (that I think comes with CMSSW 11-3-4).

adewit commented 11 months ago

Hi, thanks for getting in touch! It turns out we already fixed this on the main branch, and did not yet create a new release. We'll create a new CombineHarvester tag soon, but in the meantime you can check out the main branch instead of v2.0.0. In case you run into further issues, do let us know!

7quantumphysics commented 11 months ago

Hmm...I still run into the same problem on the main branch.

`[acwillia@lxplus758 CombineHarvester]$ git branch

I'm a bit perplexed

7quantumphysics commented 11 months ago

Actually, I had two pulled versions of CombineHarvester in different directories from a previous install attempt. I had to remove that older instance that was still on version 2.0.0

I successfully ran the script now python /eos/user/a/acwillia/ttbar_res_FH/CMSSW_11_3_4/src/CombineHarvester/CombineTools/scripts/plotLimits.py limits_RSGluon.json --show exp --logy Info in <TCanvas::Print>: pdf file ./limit.pdf has been created Info in <TCanvas::Print>: png file ./limit.png has been created

Thank you!