Hi Kostas,
On 08/02/12 14:33, Konstantinos Karakostas wrote:
> Hi,
>
> TH1D *hped = new TH1D("hped","hped",500,0.,0.); =
> use 500 bins to range 0. up to 0. !!!!!
When xmin = xmax = 0.
0 is not the real value for the range edges. This is a special behaviour that allow the histogram to take an adequate range depending on the values of the entries.
Cheers,
Vito
>
>
> Cheers,
> Kostas
>
>
> On 02/07/2012 07:15 PM, Vito Di Benedetto wrote:
>> Dear ROOT experts, >> >> I'm trying to fit an histogram that I define with automatic range >> >> TH1D *hped = new TH1D("hped","hped",500,0.,0.); >> >> if I fill it with only 500 entries, when I try to fit it, it seems to be >> empty. I get the error message: >> >> Warning in <ROOT::Fit::FillData>: fit range is outside histogram range, >> no fit data for xaxis >> Warning in <Fit>: Fit data is empty >> >> >> If I fill an identical histogram with 5000 entries the fit works fine. >> >> How can I avoid the problem in the case I have only 500 or less entries >> in my histogram? >> >> In attach there is a macro reproducing this issue. >> I'm using ROOT v5.32.00 on 32 bit GNU/Linux >> >> Cheers, >> Vito >>
This archive was generated by hypermail 2.2.0 : Wed Feb 08 2012 - 23:50:01 CET