Hi All,
this is my framework:
-> ROOT version 5.22 (including RooFit 2.91) - on 32bit machine
I am using the RooFFTConvPdf class in RooFit to convolve one variable
with a gaussian resolution in a multi-variable function of the form:
f(t,angle_1,angle_2) = exp(-par_0t)(1-cos^2angle_1)*cos^2(angle_2)
I implement this as class (RooDecayRateFullModel) and solve the
integral analytically.
I implemented the function first without convolution and generated
toys and fitted them, successfully. In a second step I convolve the
variable t with a gaussian g(0.,0.1) using RooFFTConvPdf as below:
// theoretical model
RooDecayRateFullModel decay(“RooDecayRateFullModel”," full decay rate model",
*dectime,*angle_1,*angle_2,*par_0);
// resolution model
m = new RooRealVar(“m”,"",0.);
s = new RooRealVar(“s”,"",0.1);
RooGaussian resolution(“resolution”,“resolution”,*dectime,*m,*s);
// numerical convolution RooFFTConvPdf
dectime->setBins(10000,“cache”);
RooFFTConvPdf modelC(“modelC”," theory (x) resolution",*dectime,decay,resolution);
// toy generation
RooDataSet* sig = modelC.generate(RooArgSet(*dectime,*angle_1,*angle_2),1000);
The generation of toys crashes. I diagnosed the problem further,
but I should mention already, that with only two variables the
procedure works.
For diagnosis I copied the relevant RooFit classes (RooFFTConvPdf) and
recompiled them with some cout statements. I follow the sequence of
methods called:
For two variables RooFit runs through
1- genContext
2- ceateCache
3- actualObservables
4- inputBaseName
5- actualObservables
6- inputBaseName
7- actualParameters
8- FFTCacheElem
9- fillCacheObject -> otherObs.siz() = 1
10- fillCacheSlice
11- scanPdf
12- scanPdf
(…)
INFO: Caching – RooAbsCachePdf:getCache(modelC) creating new cache XYZ
with PDF RooDecayRateFullModel_CONV_resolution …
Now, with 3 variables it crashes after 4-
Error: Symbol G__exception is not defined in current scope.
To debug, I hooked the GDB debugger.
This is the cout output with the error analysis of the GDB:
Output:
Inside genContext
—> number of variables besides the dectime = 2
Inside createCache
Inside actualObservables
—> total number of variables = 3
Inside inputBaseName
—> _pdf1.arg().GetName() = RooDecayRateFullModel
—> _pdf2.arg().GetName() = resolution
—> full name = RooDecayRateFullModel_CONV_resolution
terminate called after throwing an instance of 'std::bad_alloc’
what(): std::bad_alloc
Aborted
I also tried with
-> ROOT version 5.22.00_x64 (including RooFit 2.91) - on 64bit machine
but the machine freezes right after the statement
—> full name = RooDecayRateFullModel_CONV_resolution
instead of terminating with ‘std::bad_alloc’
Do you know how to solve this problem to be able to use more than
two variables in my model (I actually depend on 4 right now).
Thanks
ciao
giordano