Hi Donal,
I’m not aware of a merge()
method. I had a quick look, and it’s indeed not there. Can you tell me a ROOT version in which this should have existed? I checked 5.20 and 6.10, but they both didn’t have it. Could it be something else that was supporting a merge?
One way to get what you want is to create histograms from each category:
- Set the category to state
A
. - Create a histogram
https://root.cern.ch/doc/master/classRooAbsReal.html#a6659d2c301e5cd65b83ee8c9422c2553 - Set to state
B
, create second histogram. - Add them.
To be able to add the histograms, they need to have the same bins. I assume that the binning will automatically follow whatever the default binning of the observable is, for which you request the histogram. As you see in the documentation, you can also request a custom binning.