Closed IzaakWN closed 5 years ago
Hi Izaak, thanks for the PR - I think it's ok but will make a couple of small checks before merging. Btw, did you look at using the CardWriter class to write your datacards? It works in the python interface and can be used to create multiple txt cards + 1 ROOT file output.
cheers, Andrew
Hi Andrew, thanks for the consideration! I was using the CardWriter
class before in python, but the CombineHarvester.WriteDatacard
method was more advertised in the documentation (e.g. Examples Part II), and it is more convenient for me to loop over different combination of channels and/or bins.
Add a method to overload
for use in python. I noticed this was not possible yet, so I took inspiration from
CombineHarvester/CombinePdfs/src/Python.cc::BuildRooMorphingPy
.You might want to double-check the use of pointers/references, as I am not an C++ expert, but these changes allowed me to do
Where in the end, you have one datacard for each mass point, and one single root file with one directory per bin containing all common background histograms, as well as the signal histograms for each mass point.