Hi Experts,
I think that function Import doesn’t work so well.
As I told you I have a weigthed dataset and I wanna use it twice and i can do it simply renaming it in this way:
TFile *fitres = TFile::Open(“file.root”);
RooDataSet dataset_rwLb = (RooDataSet) fitres->Get(“dataset_rwLb”);
RooDataSet rwDataset46 = (RooDataSet) fitres->Get(“dataset_rwLb”);
RooDataSet rwDataset56 = (RooDataSet) fitres->Get(“dataset_rwLb”);
and this is the output
++++dataset_rwLb+++++
DataStore data (RooFitSIG)
Contains 23979 entries
Observables:
- dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
- mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
- mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
- m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
- L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
- nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
- L_nBkg = 4.06221 C L(-INF - +INF) "L_nBkg"
Dataset variable “nLbsig_sw” is interpreted as the event weight
++++rwDataset46+++++
DataStore data (RooFitSIG)
Contains 23979 entries
Observables:
- dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
- mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
- mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
- m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
- L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
- nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
- L_nBkg = 4.06221 C L(-INF - +INF) "L_nBkg"
Dataset variable “nLbsig_sw” is interpreted as the event weight
++++rwDataset56+++++
DataStore data (RooFitSIG)
Contains 23979 entries
Observables:
- dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
- mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
- mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
- m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
- L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
- nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
- L_nBkg = 4.06221 C L(-INF - +INF) "L_nBkg"
Dataset variable “nLbsig_sw” is interpreted as the event weight
Then I wanna combine them to do a Simultaneous fit and I do in this way:
RooCategory sample(“sample”,“sample”) ;
sample.defineType(“physics”) ;
sample.defineType(“control”) ;
// Construct combined dataset in (x,sample)
RooDataSet combData(“combData”,“combined data”,Mass_bum,Index(sample),Import(“physics”,*rwDataset46),Import(“control”,*rwDataset56)) ;
but now the output is this:
++++combData+++++
DataStore combData (RooFitSIG)
Contains 40480 entries
Observables:
- sample = physics “sample”
- mrho_bum = 1.26173 L(0.5 - 2.5) “#pi#pi Mass [GeV/c^{2}]”
and this is not my dataset.
What’s happening?
Thanks