Hello,
I have some questions about the example macro attached. In few words: in the macro I create 2 histogram with identical shape (exponential) and I add to the first one a gaussian signal to emulate a standard experimental situation where I have a signal sample and a background sample. For the signal I populate a histogram from a gaussian pdf with the chosen number of events. Then I do 3 different test using a ProfileLikelihoodCalculator.

I fit the background histogram with a expo function, create a model using the gaussian histogram and the fitted function and everything is ok. Fit of the expo function, fit of the model and fit for the null hypothesis all give status = 0 and everything looks ok

Next step is to create a model with a generic gaussian PDF with fixed center of the gaussian equal to the signal gaussian but variable width in the range [0.50width,1.50width]. The fit of the model is ok (Status : MINIMIZE=1 MINIMIZE=5 MINIMIZE=1 MINIMIZE=5 MINIMIZE=0) but the fit for the null hypothesis do not converge (Status : MINIMIZE=1 MINIMIZE=5 MINIMIZE=1 MINIMIZE=5 MINIMIZE=4200). I also tried to fix the width of the gaussian to the chosen value but the result don’t change

Last step is scan the full histogram range (assuming I don’t know where the signal is and the width depends on the signal center) and again I get for all the scanned points the same result as in 2. (sometimes the model fit is ok, sometimes not… but the null hypothesis is NEVER ok)
So here is the list of my questions:

Status : MINIMIZE=1 MINIMIZE=5 MINIMIZE=1 MINIMIZE=5 MINIMIZE=0 what’s the meaning of all this steps? Do I care about only the last one or do I need to consider also the others?

Status : MINIMIZE=0 HESSE=0 HESSE=0 why 2 times HESSE? I thought that as in 1, the minimization algo was trying different approach till status 0 is reached… so why doing again HESSE if I have already a 0?

For what concern the 2nd step: why I was not able to have a converging fit for the null hypothesis? The code looks ok to me and I don’t see any specific reason to have a failing situation. I tried to change the width range but I never got a status = 0

Step 3: From my point of view also if I have a lot of not0 STATUS fit everything looks ok… are the significance (and the pvalue) reliable? The final significance plot looks good to me but I’d like to hear from an expert his comments…
Sorry for the long topic but I hope someone will clarify all my doubts.
Best
Attilio
myExample_02.C (9.2 KB)