Hi Ludyvine, When you fill your histograms with weights, you should call myhist->Sumw2(); before filling the histograms, such that Root can compute/store the sum of squares of weights for each bin. Once you have called Sumw2(), the errors will be correctly computed and automatically used by the Fit functions. Rene Brun Ludyvine Morand wrote: > > Dear ROOTers, > > I am doing histograms fitting with the Fit() method from TH1 class. As > far as I understand the error used to do the fitting is the statistical > error sqrt(N). True ? > Actually my histograms were filled with events weighted (y=N*w), so I > want the Fit() method to use another error than sqrt(y) that I believe > it is using. Does anybody know how I should do this ? > > Thanks ! > Ludyvine. > > -- > Ludyvine Morand > DAPNIA/SPhN - Bat 703 Piece 156 - Orme des Merisiers > CEA Saclay - 91191 Gif-sur-Yvette cedex - FRANCE > Tel : (33-1)01 69 08 87 19
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET