Problem with automatic range for histos

From: Vito Di Benedetto <vito.dibenedetto_at_le.infn.it>
Date: Tue, 7 Feb 2012 19:15:32 +0100


  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

Received on Tue Feb 07 2012 - 19:15:28 CET

This archive was generated by hypermail 2.2.0 : Wed Feb 08 2012 - 23:50:01 CET