Hello!
I am trying to use the CreateNLL function for RooAbsPDF. There are two versions on the class function page. When I use this function:
nlls[cat_name] = pdftmp.createNLL(datatmp, RF.Constrain(constrainedParams), RF.GlobalObservables(glbObs), RF.Offset(1), RF.NumCPU(4,3), RF.Optimize(2))
I see this error complaining I should use the other constructor:
File “test.py”, line 152, in
TypeError: none of the 2 overloaded methods succeeded. Full details:
RooAbsReal* RooAbsPdf::createNLL(RooAbsData& data, const RooLinkedList& cmdList) =>
takes at most 2 arguments (6 given)
handshake: xferraw read: Broken pipe (C++ exception)
So I tried the other constructor:
cmdList = RooLinkedList()
cmdList.Add(RF.GlobalObservables(glbObs))
cmdList.Add(RF.Offset(1))
cmdList.Add(RF.NumCPU(4,3))
cmdList.Add(RF.Optimize(2))
nlls[cat_name] = pdftmp.createNLL(datatmp, cmdList)
I get errors complaining I should use the fist constructor.
The code marches through these errors but if I call createNLL multiple times I start to see real crashes. What am I doing wrong??
I am relatively new to python so apologies if the solution is obvious.