Chi2Fit error

Hi,

I would like to perform a chi2 fit to a 2d distribution of events.
I’m using RooFit.

When using RooFit v2.31 everything works fine and the fit is OK;
porting the code to RooFit v2.95 the fit crashes.

These are the first lines of output for the different RooFit versions:

[quote=“RooFit v2.31”]

[code]
RooFit v2.31 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2008 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt

root [0] .L fit2d.cc
(class RooMyPdf)163078400
[#1] INFO:Optimization – RooAbsOptTestStatistic::ctor(chi2) optimizing internal clone of p.d.f for likelihood evaluation.Lazy evaluation and associated change tracking will disabled for all nodes that depend on observables
[#1] INFO:Optimization – RooAbsArg::optimizeCacheMode(model) nodes (model,signal,s1,sign2,s2,sign3,s3,s4,g4,cb4,BkgDpeak,CombDeltaM,DpeakBkg,g1,DpeakBkg2,DpeakBkg3,BkgComb,CombDz) depend on observables, changing cache operation mode from change tracking to unconditional evaluation
MINUIT WARNING IN PARAMETR
============== VARIABLE4 IS AT ITS LOWER ALLOWED LIMIT.


** 13 **MIGRAD 1.4e+04 1


FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
MINUIT WARNING IN MIGrad
============== VARIABLE4 IS AT ITS LOWER ALLOWED LIMIT.
START MIGRAD MINIMIZATION. STRATEGY 1. CONVERGENCE WHEN EDM .LT. 1.00e-03
FCN=5363.9 FROM MIGRAD STATUS=INITIATE 264 CALLS 265 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 alphaCB4 -1.71783e+00 8.00000e-01 0.00000e+00 -7.32917e+02

[/code][/quote]

With RooFit v2.95 no fit is done.

The call to chi2fit is done with:

  /* Chi2 */
  RooChi2Var chi2("chi2","chi2",model,data);
  RooMinuit m(chi2);
  m.migrad();
  m.hesse();
  int migradStatus = m.migrad();//minimization
  int hesseStatus = m.hesse();//covariance matrix

Does anybody can give me any hint to solve the problem?

Maurizio

I would like to add this note:
downgrading ROOT from v5.22 to v5.21 the code didn’t work too (still RooFit 2.95);
downgrading to v5.18 the code now works (RooFit 2.31).