Description of the Problem
Dear Rooters,
fitting weighted data and enabling Minos as well as SumW2Error(kTRUE) in RooAbsPdf::fitTo(), a warning is given:
[#0] WARNING:InputArguments -- RooAbsPdf::fitTo(pdfExtVggSig) WARNING: sum-of-weights correction does not apply to MINOS errors
This implies, that you can use Minos, but it will not improve the corrected result. However, if I run my fit with and without Minos one parameter error in my example changes by a factor of 10. With Minos enabled the error is smaller and does not agree with the square root of the covariance matrix element.
Here is the result of the fit with and without the Minos flag, taken from my example macro:
----- COMPARE THE FIT RESULTS -----
Have look at the error of vggSigStdDevFit in both cases
WITH MINOS AND SUMW2ERROR ENABLED:
RooFitResult: minimized FCN value: -94226, estimated distance to minimum: 53813.2
covariance matrix quality: Unknown, matrix was externally provided
Status : MINIMIZE=0 HESSE=0 HESSE=0 MINOS=0
Floating Parameter FinalValue +/- Error
-------------------- --------------------------
nSigFit 2.0184e+04 +/- 1.18e+02
vggSigMeanFit 1.2002e+02 +/- 3.37e-02
vggSigStdDevFit 4.9183e+00 +/- 7.96e-03
Covariance for nSigFit: 29052.3 Sqrt(cov): 170.447
Covariance for vggSigMeanFit: 0.00171763 Sqrt(cov): 0.0414443
Covariance for vggSigStdDevFit: 0.00779129 Sqrt(cov): 0.0882683
=> Parameter error and Sqrt of covariance matrix element do NOT agree
WITH MINOS DISABLED AND SUMW2ERROR ENABLED:
RooFitResult: minimized FCN value: -94221.3, estimated distance to minimum: 53718.2
covariance matrix quality: Unknown, matrix was externally provided
Status : MINIMIZE=0 HESSE=0 HESSE=0
Floating Parameter FinalValue +/- Error
-------------------- --------------------------
nSigFit 2.0184e+04 +/- 1.70e+02
vggSigMeanFit 1.2002e+02 +/- 4.14e-02
vggSigStdDevFit 4.9181e+00 +/- 8.83e-02
Covariance for nSigFit: 29052.3 Sqrt(cov): 170.447
Covariance for vggSigMeanFit: 0.00171748 Sqrt(cov): 0.0414425
Covariance for vggSigStdDevFit: 0.00778953 Sqrt(cov): 0.0882583
=> Paramter error and Sqrt of covariance matrix element do agree
If Minos is run, the error is seemingly taken from the modified covariance matrix needed to caclulate the SumW2Error correction. See Line 211 to 228 in the attached log file and compare them to the result in RooFitResPtr (Line 378-380):
log.txt (18.6 KB)
Is this behavior intended? If not could it be fixed, or the user be warned, that he should not use the fit result if SumW2Error and Minos are enabled simultaneously?
On the Example
- 2 Variables:
- Discriminating variable mass (Exponential Background, Gaussian Signal)
- Control variable (Gaussian Background, Gaussian Signal)
- The Configurator class holds the Parameter values. The model is then build via the ModelBuilder class. But only the main macro CheckIfMinosChangesParrErr.C should be of interest.
- To run the macro youself
-
download the 3 files into one directory: CheckIfMinosChangesParrErr.C Config.C ModelBuilder.C
- CheckIfMinosChangesParrErr.C (4.4 KB)
- Config.C (3.9 KB)
- modelBuilder.C (10.8 KB)
-
rund with
root -l -q CheckIfMinosChangesParrErr.C
-
ROOT Version
- ROOT version: 6.16.00 , 6.20.00