Simultaneous fit in roofit

Dear all,

I have a question regarding simultaneous fits using RooFIt.

I have 3 data samples, A, B and C built from 3 histograms. These are 1-dimensional samples each one spanned in a different variable varA, varB and varC, with different ranges, binning and the histograms with different total weight, ie number of entries. I want to perform a simultaneous fit on this 3 samples since it share some parameters, then:

RooRealVar varA, varB, varC;
RooDataHist A(“A”, “A”, varA, histoA);
RooDataHist B(“B”, “B”, varB, histoB);
RooDataHist C(“C”, “C”, varC, histoC);

//to later assign the right pdf to each sample it is necessary to define a category
RooCategory cat(“cat”,“cat”);
cat.defineType(“sampleA”);
cat.defineType(“sampleB”);
cat.defineType(“sampleC”);

map<string,RooDataHist> mapping;
mapping[ “sampleA” ] = A;
mapping[ “sampleB” ] = B;
mapping[ “sampleC” ] = C;

//then I proceed to make the combined dataset
RooDataHist dataset( “dataset” ,“dataset” , RooArgSet(varA,varB,varC), cat, mapping );

This creates a 3D binned dataset!!! (why?). If each of the initial histograms have for instance 100bins, then it creates a dataset with 100100100*3(the 3 comes from the 3 types defined in the category) bins… but I’m dealing with ~300bins each histo!!! and it saves each bin in memory causing a large CPU overhead. It cannot be possible that from 3 simple histos I fill the full cpu of my laptop, thus I’m dong something wrong but I cannot find a different way of doing this.

Do you know which is the correct way of doing this??

thanks in advance!
wesmilanes

Posts: 1
Joined: Fri May 18, 2012 18:10

Hi, wesmilanes

Have you found correct way to sovle this problem?
I meet similar problem now.
Could you reply to me if you have any solution.

Thank you very much!
Yinghui