Hi all,
I’m doing a 2D extended maximum likelihood fit on D0 mass, with the joint distribution
M(K^+pi^-) vs M(K^-pi^+). I’m using double Gaussian as
signals and 3rd-order Chebychev polynomials as backgrounds for both dimensions.
Most events contain a D and Dbar, but there can be more than 2 D’s in an event.
I am fitting on every D-Dbar pairs.
In addition, my model includes what I call a swap component (as a Gaussian), coming from the
recombined D with its daughter K track misidentified as pi and pi track as K.
I’m mainly interested in the number of DDbar pairs (the signal D-signal Dbar component),
but the number of other components, the mean of the signal, and all the background shape parameters
are also determined by my fit.
On the other hand, the widths of the signal and the swap are predetermined by another fit to MC.
The number of the swap components is set to equal that of the signal, since there should be a misidentified
K pi pair for every correctly identified D0.
There are 4 (2x2) components in the 2D joint PDF without swaps, and 9 (3x3) components with swaps. The
number of signal DDbar pairs on both dimensions is labeled as Nss (number of signal-signal), so on and so forth.
In summary, I have at least 11 parameters in my fitter
(4 numbers of events in the extended PDF, 6 background shapes, 1signal mean).
A working example is here:
In the script, an ensemble of 200 toy MC samples by default are generated, and while most
finish without issues, some produce errors with RooFit.
The error messages roughly fall into 2 categories.
- The covariance matrix is forced positive-definite:
RooFitResult: minimized FCN value: -66389.3, estimated distance to minimum: 0.000133435
covariance matrix quality: Full matrix, but forced positive-definite
Status : MINIMIZE=-1 HESSE=4
This is usually accompanied with some variables highly correlated with others. For example,
a2 (background shape), number of background-background and number of signal-background
are highly anti-correlated.
name NO. GLOBAL 1 2 3 4 5 6 7 8 9 10 11
a1 1 0.51253 1.000 -0.255 0.320 -0.001 0.004 -0.001 0.011 0.246 0.072 -0.253 -0.087
a2 2 0.97544 -0.255 1.000 0.337 0.003 -0.016 -0.004 0.020 -0.937 -0.273 0.964 0.332
a3 3 0.56394 0.320 0.337 1.000 0.001 -0.007 0.005 -0.060 -0.344 -0.106 0.353 0.129
b1 4 0.48608 -0.001 0.003 0.001 1.000 -0.118 0.471 0.009 0.008 -0.052 0.004 -0.003
b2 5 0.40104 0.004 -0.016 -0.007 -0.118 1.000 -0.069 0.011 -0.040 0.260 -0.021 0.023
b3 6 0.48887 -0.001 -0.004 0.005 0.471 -0.069 1.000 -0.090 -0.002 0.025 -0.005 0.008
mean 7 0.16943 0.011 0.020 -0.060 0.009 0.011 -0.090 1.000 -0.031 0.061 0.032 -0.083
nbb 8 0.97878 0.246 -0.937 -0.344 0.008 -0.040 -0.002 -0.031 1.000 0.079 -0.969 -0.195
nbs 9 0.82844 0.072 -0.273 -0.106 -0.052 0.260 0.025 0.061 0.079 1.000 -0.176 -0.700
nsb 10 0.98754 -0.253 0.964 0.353 0.004 -0.021 -0.005 0.032 -0.969 -0.176 1.000 0.191
nss 11 0.82314 -0.087 0.332 0.129 -0.003 0.023 0.008 -0.083 -0.195 -0.700 0.191 1.000
- The covariance matrix is accurate
covariance matrix quality: Full, accurate covariance
Status : MINIMIZE=-1 HESSE=4
And the global correlations seems normal.
My script includes a switch =fix_sig= to decide whether to also float the signal shapes parameters, increasing the
number of parameters to 17 (without swap) or 19 (with swap).
The switch =use_swap= determines whether to include the swap component.
Is there a better way to formulate the model? And are there other issues in my code that is causing problems?
I’m using ROOT v6-24-02 with c++ (GCC) 11.1.0 on Linux