Re: TH1 Basic (and old) questions

From: Laurent Aphecetche (aphecetche@ganil.fr)
Date: Tue Nov 04 1997 - 18:52:52 MET


Rene Brun wrote:
> This could be implemented. However, to be consistent, one would haveto
> also implement
>   TH1::SetRange(xmin,xmax,ymin,ymax)
>   TH1::setRange(xmin,xmax,ymin,ymax,zmin,zmax)
>   TH1::SetRange(binx1,binx2)
>   TH1::SetRange(binx1,binx2,biny1,biny2),etc
>   TH1::SetRange(binx1,xmax,...)  and all possible combinations
> 
>   If we implement TH1::Draw(xmin,xmax), we should also support
> all the above combinations.
>  and what about TH1::Fit
>  and what about the function you are proposing below as well.

Of course, this seems to be some work...
But zooming a histo. is a very common action of users, I guess, and
interactive
zoom with the slider is not precise at all, so there should be an easy
way to do it.  

Is someone sharing this point of view ?

> > 2) What about a TH1::GetIntegral(xmin,xmax) function to have to sum of
> > weights between xmin and xmax ?
> 
> I would prefer TH1::GetIntegral(binx1,binx2) and same for 2-D.
> Otherwise if xmin,xmax do not coincide with the lower/upper limits
> of a bin, do you expect this function to compute an approximation
> for the integral in the bins at the edge, or do you simply want
> to compute the bin number where xmin and xmax  (bin1,bin2)correspond
> and return the integral as the suim of bin contents from bin1 to bin2
> included?

Agree. TH1::GetIntegral(bin1,bin2) would be nice enough.

-- 
APHECETCHE Laurent (mailto:aphecetche@ganil.fr)       
GANIL, B.P. 5027, 14076, Caen Cedex 5, France 
Vox: +33 (0)2 31 45 45 85 - Fax: +33 (0)2 31 45 46 65         
WWW: http://ganp03.in2p3.fr/nof/ & (perso.)
http://www.mygale.org/~p0mp0n



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET