Re: [ROOT] GetMaximumBin in given range?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jul 18 2003 - 17:04:22 MEST


Hi Matej,

Assuming TH1* h;

h->GetMaximum(); //returns maximum in full range
h->GetXaxis()->setRange(300,500);
h->GetMaximum(); //returns maximum between bins 300,500
h->GetXaxis()->SetRange(500,900);
h->GetMaximum(); etc

Note that this also works for 2-d and 3-d histograms.

Rene Brun

matej batic wrote:
> 
> Is it possible to get Maximum bin in given range (e.g. searching for
> maximum in interval from bin 300 to 500 and then in interval from 500 to
> 900)?
> Thanks,
> matej



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET