Simultaneous fits 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!

Hi,

You’ll probably have much better luck posting this in the statistics forum instead of here.

Cheers,
Charles

Hi @wesmilanes ,
I am having a similar issue, did you find a solution for your problem ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.