ROOT fail to correctly recognize the usage of DataStore after import and reloading of the RooDataSet object

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, 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:


Thank you for reporting this problem. @StephanH might know the answer to your question



Hello @RongkunWang,

I replied on the Jira ticket - could you have a look?

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