Hi Christian, You can do TAxis *xaxis = profile->GetXaxis(); Int_t bin = xaxis->FindBin(xvalue); //return bin number corresponding to xvalue Float_t bwid = xaxis->getBinWidth(bin); etc.. see TAxis for more info Rene Brun Christian Haeberli wrote: > > Hello! > > I've got data in a TProfile. Now, I want to count the number of events > between two values on the X-Axis scale. I tried TH1::Integral. But the > problem is, that I have to give the limits of the integral in bins an > not in X-Axis values. Is there a method that converts X-Axis values in > Bins? > > I've found TH1:GetBinWidth. This method gives the stepsize between the > bins. How do I find out the shift between the X-Axis scale and the bins? > To have the stepsize AND the shift would solve my problem. > > Thanks > > Christian > -- > ___________________________________________________________________ > Christian Haeberli christian.haeberli@cern.ch > University of Bern > Laboratory for High Energy Physics Phone : ++ 41 31 631 4069 > Sidlerstr. 5 Mobile: ++ 41 76 316 6159 > CH-3012 BERN Fax : ++ 41 31 631 4487
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET