- #1
ChrisVer
Gold Member
- 3,378
- 465
Suppose I have a programme. In there I have the creation of histograms:
signal:
histo_s_Pt
histo_s_v1
histo_s_v2
background:
histo_b_Pt,
histo_b_v1
histo_b_v2
iteration to fill signal/bckg from events j.
So at this point I'm having the 6 above histograms filled. Now if I wanted to compare the variables v1,v2 between signal/background with the reweight of the momenta Pt s or b, I have to make a new histogram that will contain the weights :
histo_weight = Divide( signal Pt , background Pt).
My problem is that this can happen only at the end of the program, and then I cannot call these weights back in order to reweight the histos of variables v1, v2 .
I was told I can save the histo_weight in some root file and then recall it. However I am not sure that this can work.
Suppose I save it in a TFile weight.root
How can I open the weight.root in the first place? since it again is saved in the end.
Any ideas?
signal:
histo_s_Pt
histo_s_v1
histo_s_v2
background:
histo_b_Pt,
histo_b_v1
histo_b_v2
iteration to fill signal/bckg from events j.
So at this point I'm having the 6 above histograms filled. Now if I wanted to compare the variables v1,v2 between signal/background with the reweight of the momenta Pt s or b, I have to make a new histogram that will contain the weights :
histo_weight = Divide( signal Pt , background Pt).
My problem is that this can happen only at the end of the program, and then I cannot call these weights back in order to reweight the histos of variables v1, v2 .
I was told I can save the histo_weight in some root file and then recall it. However I am not sure that this can work.
Suppose I save it in a TFile weight.root
How can I open the weight.root in the first place? since it again is saved in the end.
Any ideas?