Hello RooFit experts,
we’ve encountered an interesting bug when doing combination of workspace that uses RooTreeDataStore to store RooDataSet. This dataset is used for fitting with a RooSimultaneous. In the TTree, we can inspect that the indexCategory is filled correctly.
We first read the dataset and import it to a new workspace. Then we read this dataset in the new workspace, and read the indexCat() for each of the element in the RooDataSet, all the element return the same label when called getLabel(), and the fitting fails as some of the channel now returns 0 observed.
It can however be solved by calling convertToTreeStore() explicitly after re-loading this kind of RooDataSet. Then the dataset can correctly read the label from the TTree.
It’s a little strange that in this case ROOT didn’t throw an error during reading the channel label. I have naively checked the code https://root.cern.ch/doc/master/RooDataSet_8cxx_source.html, since convertToTreeStore() change the behavior, it seems storageType is not set to Tree correctly. This probably happens at the stage of “import”, since fitting of the original workspace works fine.
And I also have an unrelated question: is RooTreeData related to this?
Thank you in advance for your time! I’ve also submitted this JIRA ticket here:
https://sft.its.cern.ch/jira/browse/ROOT-10875
Rongkun
Cheers,