Changes in root5.24 and roofit 3.00

Dear RooFiters, I am trying to update to the new root5.24, but there must be some changes I missed, and my code although compiles it doesn’t execute. The problem appears to be when the code is trying to build a RooSimultaneous.
Also, I am not quite follow the new changes when data is imported from TTree. In my case I use something like this (in a very simplified version):
RooDataSet* dataset;
TTree* tree;
RooArgSet* Vars = new RooArgSet;
dataset = new RooDataSet(Name,Name,tree,Vars);
Is this general form still valid for root5.24?

Please note that I had no problems using previous root versions. For example in root5.22 all is working fine.
Thanks.

Gio

Hi,

Your dataset constructor should still work (and will continue to work), although the preferred
new form is

 RooDataSet data(name,name,vars,Import(tree)) ;

Concerning your RooSimultaneous problem, can you send some details?

Wouter

Hi Wouter, thanks for the quick reply. It’s quite complicated to give an analytic example of what exactly I am doing, but I will try very briefly to explain. The idea is to create and store a number of pdfs in a RooArgList. Then loop over the pdfs in the RooArgList and use the usual way by defining a RooCategory and the defineType for each of the pdfs. Up to here all is working fine. The problem now arises when I am trying to construct the RooSimultaneous by doing something like
RooSimultaneous simPdf = new RooSimultaneous
(Name(),Title(),
(Pdfs()),*cat);
From the seg fault I get there must a kind of problem either when the initial pdfs are created either when the RooSimultaneous is created. Is it possible that this is not a roofit problem, but a general ROOT issue(something for example that root allowed me to do in the previous versions but doesn’t allow me to do in 5.24)?
Thanks.

Gio

Hi Gio,

That form is still supported, although a new constructor has been added

RooSimultaneous(const char *name, const char *title, std::mapstd::string,RooAbsPdf* pdfMap, RooAbsCategoryLValue& inIndexCat) ;

that allows you to specify the mapping with a map<string,RooAbsPdf*> which doesn’t make the implicit assumptions the constructor uses that you use.

Nevertheless both forms should work. If you send me the stack trace from the crash I might be able to say more on what going wrong.

Wouter

Hi Wooter, I will try to track and post the crash as soon as possible.
Meanwhile, I have another question considering the fit quality and how to improve it, in a very general way.
For example, in the case that the dataset does not have a sufficient entries (as it may happen when dealing with rear processes etc) how do we trust that the pdf is constructed properly?
Other cases where the pdf have the correct shape but does not match exactly the data and the edm(estimated distace to minimum from the minuit output) is not quite small, is there any step, inside the roofit capability, that can help to understand why the fit seems that it doesn’t perform normally?
Thanks again for all the help.

Gio

[quote=“Wouter Verkerke”]Hi Gio,

That form is still supported, although a new constructor has been added

RooSimultaneous(const char *name, const char *title, std::mapstd::string,RooAbsPdf* pdfMap, RooAbsCategoryLValue& inIndexCat) ;

that allows you to specify the mapping with a map<string,RooAbsPdf*> which doesn’t make the implicit assumptions the constructor uses that you use.

Nevertheless both forms should work. If you send me the stack trace from the crash I might be able to say more on what going wrong.

Wouter[/quote]

Hi, coming back to this again, it seems that for some reason root 5.24 does not support the RooSimultaneous construction I mentioned before.
I temporarily manage to overcome this problem by using a different construction; something like
RooSimultaneous *simPdf = new RooSimultaneous(Name,Title,*Category);
simPdf->addPdf(*pdf,name);
Still need to investigate if the result from this construction will be different than before.
Cheers.

Gio