Hi Cozmin, likely you want to use: TProfile::Approximate(kTRUE); to get a more useful estimate of the errors in pathological cases. For detailed info see: http://root.cern.ch/root/html/TProfile.html#TProfile:GetBinError Cheers Otto On Thu, 25 Nov 2004, Timis CN Dr (Physics) wrote: > G'day rooters, > > I'm concerned about TProfile treatments of the bins with just one event. According to the TProfile source the default computation of errors is: > > " " SQRT(Y)/SQRT(N) for Spread.eq.0,N.gt.0 > > In my case it seems like the error for the 1 event bins is set to 0 which might create problems for the subsequent fits. > I attached a small program ( similar to the one given as example) that shows a similar problem. It seems that in hprof the one event bins are ignored. In hprof1 they are present and the error associated is zero. The same thing occurs when I use the menu ("righth click" "ProfileX") to produce a ProfileX from the hprof_bidim 2D histogram. When fitted with a pol2 the two profile histograms (hprof, and hprof1) give completely different results. > > I'm using root 4.01/02 on an RedHat Linux release 7.3 (Valhalla) kernel 2.4.20-18.7 > > Is there an option to remove the 1 event channels , or compute a reasonable error ? > > Cheers, > Cozmin > > ____________________________________________________________________ > C. N. Timis > Department of Physics | Email: C.Timis@surrey.ac.uk > University of Surrey | tel: +44 (0)1483 68 69 05 > Guildford GU2 7XH | fax: +44 (0)1483 68 67 81 > UK | > _____________________________________________________________ > > { > TCanvas *c1 = new TCanvas("c1","Profile histogram example",200,10,700,500); > hprof = new TProfile("hprof","Profile of pz versus px",100,-4,4,0,20); > hprof1 = new TProfile("hprof1","Profile of pz versus px",100,-4,4,0,20); > TH2F *hprof_bidim = new TH2F("hprof_bidim","",100,-4,4,100,0,20); > Float_t px, py, pz; > for ( Int_t i=0; i<1000; i++) { > gRandom->Rannor(px,py); > pz = px*px + py*py; > hprof->Fill(px,pz,1); > hprof_bidim->Fill(px,pz); > } > hprof->Draw(); > hprof1=hprof_bidim->ProfileX(); > TCanvas *my = new TCanvas; > hprof_bidim->Draw(); > TCanvas *my2 = new TCanvas; > hprof1->Draw(); > } > > > -- Dr. Otto Schaile Department f"ur Physik, LMU M"unchen Phone: +49 89 289 14070 Am Coulombwall 1, D-85748 Garching, Germany Mobil: +49 160 1553598 FAX: +49 89 289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET