Automatize Any Rooaddpdf plotting

Hi all
I was wondering if there are already inside the rooaddpdf some way to plot all the subcomponents in a simple way.
I try to explain what I mean.
I do à fit and I have the rooaddpdf with all coefficients defined.
I saw i can get the list of coefficients and the list of pdfs but I have to pass through the rooarglist and the iterator of the clients/server. What I would like to do is given a rooaddpdf to get a vector< pair< rooabs real*, rooabspdf*> where the rooabs real is the yield and the abs pdf the sub component. I think this can ease quite a lot how to plot the components and I was wondering if that kind of functionality is already inside roofit.
I know the question can sound stupid if the fit is done inside a ROOT macro but in the case I am doing a simultaneous fit combining a binned likelihood and a unbinned one in different datasets. Therefore I have not used roosimultaneouspdf and roosimultaneousdata which can be either a simultaneous data hist or simultaneous dataset triggering either a full unbinned fit or binned one. I just do a bare likelihood sum of the pdfs model on different datasets and in a second step all the plotting of the results. The bookkeeping is done through maps of strings and pdfs. I would like to simplify the code to merge datasets and pdfs components bookkeped using the same background type within a Rooaddpdf to build a posteriori à simultaneous pdf to plot on combined datasets. I hope the issue is clear and I thank for any suggestion / help.

Hi all i think I have found a way of doing that in few lines but I am wondering if when one do:
Listpdf= pdf.getpdfs()
Coeflist = pdf.getCoefs()
Tge two lists are sorted in the correct order, i.e.
Coeflist. At(idx) is the coefficient assigned to
If yes then make the vector of pairs becomes trivial but I am not sure of the underlying assumption.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.