Root version dependent values of RooChi2Var

Dear Roofit developers,

recently i’ve updated my ROOT installation from

ROOT 5.27/06 (trunk@35856, Sep 29 2010, 11:29:35 on linuxx8664gcc) — i.e. RooFit v3.13
to
ROOT 5.34/01 (tags/v5-34-01@45048, Jul 13 2012, 15:31:31 on linuxx8664gcc) — i.e. RooFit v3.54

Besides others the script i’m running contains these lines:


RooDataHist bhisto(“bhisto”,“bhisto”,ptrel,Import(*BG));
RooRealVar bpar0(“bpar0”,“beta one”,2,var0bl,var0bh);
RooRealVar bpar1(“bpar1”,“beta two”,3.,var1bl,var1bh);
RooRealVar bpar2(“bpar2”,“scale for ptrel”,4.001,var2bl,var2bh);
RooGenericPdf bfunc(“bfunc”,“TMath::BetaDist(ptrel/bpar2,bpar0,bpar1)”,RooArgList(ptrel,bpar0,bpar1,bpar2));

bhisto.plotOn(frameB, Binning(40)) ;
RooFitResult* bres = bfunc.fitTo(bhisto, SumW2Error(kFALSE),Save(1));
bfunc.plotOn(frameB) ;
RooChi2Var chi2_b(“chi2_b”,“chi2_b”,bfunc,bhisto) ;
fitcan->cd(i) ; frameB->Draw() ;
TString newchi2;
newchi2 += chi2_b.getVal() / (40. - bres->floatParsFinal().getSize());

With the old version of ROOT/RooFit the variable newchi2 had the value 1.441 (chi2_b.getVal()=53.3226, bres->floatParsFinal().getSize()=3) while in the new version it’s 50.87 (chi2_b.getVal()=1882.55, bres->floatParsFinal().getSize()=3). The input distibutions are the same and the output of the fit is the same as well (same values found by the fit). The only difference in the cout is this line which is only there for the new version:

[#1] INFO:DataHandling – RooDataHist::adjustBinning(bhisto): fit range of variable ptrel expanded to nearest bin boundaries: [0,4] --> [0,4]

I’ve looked at the release notes, but didn’t find sth related. It would be great if you could comment and let me know which of the two values is the more reliable one or if perhaps the meaning changed. If you need further information on my script or setup please let me know as well.

Many thanks in advance for your help,
Jochen