TH1 Basic (and old) questions

Laurent Aphecetche (aphecetche@ganil.fr)
Tue, 04 Nov 1997 11:34:17 +0100


Hi,

1) What's the equivalent of PAW H/PLOT ID(xmin:xmax) ?

By now, I just found this (heavy) way to do it :

TH1F* h = ...
.
.
Int_t i1 = h->GetXaxis()->FindBin(xmin) ;
Int_t i2 = h->GetXaxis()->FindBin(xmax) ;

h->GetXaxis()->SetRange(i1,i2) ;

Why about a TH1::SetRange(xmin,xmax) function ? or maybe
TH1::Draw(xmin,xmax) ?

2) What about a TH1::GetIntegral(xmin,xmax) function to have to sum of
weights between xmin and xmax ?

Thanks.

-- 
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