Import dataset strange behaviour

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:

  1. dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
  2. mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
  3. mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
  4. m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
  5. L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
  6. nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
  7. 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:

  1. dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
  2. mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
  3. mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
  4. m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
  5. L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
  6. nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
  7. 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:

  1. dmfit = 3.11486 L(3.1 - 3.55) // [GeV/c^{2}] “Lb-Lc”
  2. mrho2 = 1.26173 L(0 - 3.5) // [GeV/c^{2}] “#rho_{46}”
  3. mrho3 = 0.960138 L(0 - 3.5) // [GeV/c^{2}] “#rho_{56}”
  4. m3pi = 1.68436 L(0 - 3.5) // [GeV/c^{2}] “m3#pi”
  5. L_nLbsig = 3.14021e-23 C L(-INF - +INF) “L_nLbsig”
  6. nBkg_sw = 1.17678 C L(-INF - +INF) “nBkg_sw”
  7. 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:

  1. sample = physics “sample”
  2. 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

Hi,

Please avoid duplicate post and/or make sure to reference them. This is duplicate of the post Import dataset.

Cheers,
Philippe.