Re: Problem in macro file

From: Sébastien Gadrat <gadrat_at_clermont.in2p3.fr>
Date: Wed, 30 Mar 2005 01:51:14 +0200


Hi Olivier,

Thank you very much for your quick answer. Actually, in my case the problem was elsewhere... It has been solved when I add My_fit->SetNDF(109);

Indeed, it seems that the TPaveStats was not used but the information put via the TF1 methods was use instead. Cheers,

Sebastien

Olivier Couet wrote:

> Hello,
> 
> I don't see this problem. See the attached PS file. I am using ROOT 
> 4.03/03 on linux.
> 
> Cheers,    Olivier
> 
> On Mon, 28 Mar 2005, Sébastien Gadrat wrote:
> 

>>Hi rooters,
>>
>>I saved some plots in macro files (.C). On some of these plots, there is some
>>fits. The fit results, in the macro file, is hardly written via a TPaveStats.
>>Each parameter and its corresponding error is then added with an AddText
>>method. Everything looks fine until now but when I run this macro, I get some
>>strange Chi2/ndf value, actually, only the Chi2 is ok. Usually, the ndf is a
>>negative number.
>>
>>As an example, I have this TPaveStats in one macro:
>>
>>TPaveStats *ptstats = new TPaveStats(0.62,0.47,0.98,0.995,"brNDC");
>>TText *text = ptstats->AddText("Entries = 40375 ");
>>text = ptstats->AddText("Mean = 3.028");
>>text = ptstats->AddText("RMS = 1.634");
>>text = ptstats->AddText("Integral = 4e+04");
>>text = ptstats->AddText("#chi^{2} / ndf = 114.6 / 109");
>>text = ptstats->AddText("Prob = 0.3374");
>>
>>When I run the macro, the Chi2/ndf become 114.6/-2 !!!! Why do I have this
>>minus 2 instead of 109 ???
>>
>>Thanks in advance,
>>
>>Sebastien
>>
>>

> Received on Wed Mar 30 2005 - 01:53:56 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET