SumW2Error gives unexpected results with unweighted datasets, BatchMode

Hi,

  1. I agree this should be probably documented better. However it is important to understand what is happening. When SumW2Error is enable a first minimization is performed of the weighted likelihood followed by a second one where the likelihood is minimized using the square of the weights. This is for obtained the matrix C, used for the correction for the Covariance matrix as documented here.
  2. It should not make a difference, because in that case the matrix C = V, where C is the covariance matrix obtained from the weight square likelihood and V from the weighted likelihood. If all the weights are 1 it is clear then that C must be equal to V.
    However, if the fit is unstable, it is possible that calling again Hesse, you get a different matrix. This is something to check for that particular problem.
  3. It should not, I suspect it is something caused by the instability of that fit
  4. Also in Batch mode, if the fit is not stable you might expect to get a different result, since the computation is performed differently, causing a different result within the numerical error

Cheers

Lorenzo