Till now when I had only one weight, I used to do “hist->Fill(value,weight)”. But now I have a case where a TTree has to be reweighted two times. How should I tackle this issue?
Please provide the following information:
ROOT Version (e.g. 6.06):
Your “hist” is a histogram, not a tree. After you filled your histogram (using tree entry specific weights) you can TH1::Scale it.
Thanks for the reply @Wile_E_Coyote
Sorry, I didn’t get your post.
Yes, hist is histogram. But what I wish to do is that I do not want to fill the histogram when I first do the reweighting. I want to fill the histogram when I do the second reweighting. In this case, is there a way to save the weighted TBranches during the first case so that I could reweight them again and the plot the final result?
So use e.g.:
hist->Fill(value, weight_1 * weight_2);
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.