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

Move python binding to cppyy #277

Closed nsmith- closed 2 years ago

nsmith- commented 2 years ago

By using cppyy instead of boost::python, we can bind simultaneously to python2 and python3 in CMSSW 11_X releases. I tested a few of the scripts in CombineTools/scripts, in particular Example3.py produces the same output as the C++ version. Also, the summer21 prepareComb2021.py was ported to py3 and run with this branch and seems to behave.

There is some concern about runtime, but so far it seems a minor increase: for hww the prepareComb2021.py runs in 11 minutes vs. 8 minutes on my machine. Probably if we could get https://github.com/root-project/root/issues/10680 fixed that would improve the performance because we would have one less cppyy call to do per iteration in the various ForEach* methods.

nsmith- commented 2 years ago

@adewit probably good enough now to merge into 113x dev branch