Does anybody know how to save the content of an splot (weightened dataset) in an ntuple?
I have been trying it but the only thing that seemed to work is to save all info (unweightened values and weights) separately in a tree by the tree() method.
Any more straight-forward idea?
thanks in advance
This won’t help you, but using the tree() method is the only way I could find of doing it as well.
Yes, I have seen this, but what I have understood that it does is to simply save the initial variables (not the values from the splots) in an ntuple along with the weights separately. I was just wondering whether there is a way to save the weightened values.
You could also save the TSPlot object itself or your could create ntuple by looping the content of the sweight matrix (by using either void GetSWeights(TMatrixD &weights); or void GetSWeights(Double_t *weights);.
I guess the option with the weights is the left one, since there is no straight-forward.