Hi Claire, Before Scaling your histogram, do x3->Sumw2() This will make sure that errors will be correctly computed, otherwise the scaled histogram will have errors = sqrt(contents) Rene Brun On Fri, 19 May 2000, Claire Gwenlan wrote: > > Hi Everybody, > > I've just been normalising some graphs which I've drawn with the > Draw("e1p") option. I've used a couple of methods (which give the same > results but I was just doing a couple of tests to make sure I know how to > do things...I'm a bit new with root!). Anyway, one way was simply using > the method suggested by Rene earlier this year, using the number of > events, and the other was using the following: > > TH1F *x3=new TH1F("x3","X3", 8, 0.65, 1.0); > . > . (some other code) > . > integral=x3->Integral(); > if(integral>0) x3->Scale(1./integral); > else{ > cerr << "Empty Histogram: " << x3->GetName() << endl; > return kError; > } > > Anyway, it seems the result has HUGE error bars, whichever method I use. > Does the above scale the errors properly or not? Or do I have to do > something extra to scale errors down? > > Oh, also, just another quick question. Is there a way to switch off the > statistics box appearing automatically in the code, rather than just doing > it by hand by clicking on the options box on the canvas? > > PS. Thanks Rene and David for answering my last question...enerything > works fine now. > > __________________________________ > Claire Gwenlan > Department of Physics & Astronomy > University College London > Gower Street > LONDON > WC1E 6BT > > Tel: (0171) 419 3454 > _________________________________ > > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET