Difference between the model with HistFactory and HistPDF, fit fails with HistFactory

Dear experts,

I am testing the model creation using both HistPdfs and HistFactory (thinking of using only the last at the end), as a first step, I am fitting a simple model sS+bB in RooFit, creating the models using the two methods mentioned above, I am using the same templates and same pseudo data, I tested 50 different pseudo data experiments and I made the fit in each case, I found that 27 of the cases the status of the fit is different from 0 for the case of HistFactory model creation (only 1 failed in Histpdf model creation).

For this, I compare the results of the yield between the HistFactory and Histpdf models, I found that the yields are the same in the case that the status is 0 for HistFactory, for the 27 cases of status different from 0, in 10 cases the yields are the same and 17 not.
This gives me the idea that I am really working with the same models in both cases, but I do not understand the differences that HistFactory is bringing to my model, I hope someone can help me with this.

  • Why do I have different statues 70, 140, and 144?
  • In the model creation with HistFactory there are other constant terms, for example, binWidth, in my case, the output says 25 but this doesn’t make much sense to me, could you please explain more who is this term affecting the model?
    Constant Parameter    Value     
  --------------------  ------------
                  Lumi    1.0000e+00
  binWidth_obs_x_channel1_obs_y_channel1_0    2.5000e+01
  binWidth_obs_x_channel1_obs_y_channel1_1    2.5000e+01
           nominalLumi    1.0000e+00

    Floating Parameter  InitialValue    FinalValue (+HiError,-LoError)    GblCorr.
  --------------------  ------------  ----------------------------------  --------
                 n_bkg    2.1000e+01    2.1269e+01 (+0.00e+00,-5.47e+00)  <none>
                 n_sig    0.0000e+00   -2.6654e-01 (+4.05e+00,--0.00e+00)  <none>

For one case, I attached the two models, the histograms and the fit outputs. For the 50 cases the tables analyzing the status results and differences.

Thank you in advance :pray:.
templates_histograms_29.root (10.6 KB)
Histpdf_workspace_29.root (25.9 KB)
HistFactory_workspace_29.root (29.7 KB)
tables_statuses_diff_HistFactory.txt (4.1 KB)
Histpdf_fit_29.txt (8.6 KB)
HistFactory_fit_29.txt (1.2 MB)

By the way I am using 6.22/00 maybe the release have something to do? :frowning:

Hi @Marcgh04 ,

sorry for the high latency, we need @jonas 's help here, let’s ping him.


Hi @Marcgh04 ,

just a keepalive ping. As @jonas will be on leave for a while I asked @moneta to help out here.



Apologies for the delay in looking into this. Can you please post also the fitting code in the two cases, to reproduce it and to be sure I am looking at the same problem.



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