Walerter Opaska wrote: > > Hello > > I was wondering if someone could explain to me the best way fit a curve in > Root. I have a 1D histrogram with a non-gaussian or non-exponential > distribution ( actually a Breit-Wigner distribution) and need to do a > maximun likelihood fit on the curve. Could someone please give me a hint > on the easiest way to fit this curve? > You can find an example how to fit with a user-defined function in the Root tutorial http://root.cern.ch/root/html/examples/myfit.C.html Simply replace the expression in the function fitf by the Breit-Wigner formula (a good candidate to be moved into the list of standard functions!). The option to use the "Maximum likelihood fit" is currently not active in TH1::Fit. Rene Brun
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET