Re: fitting problem

From: Arthur E. Snyder <snyder_at_slac.stanford.edu>
Date: Fri, 9 Feb 2007 10:44:21 -0800 (PST)


This is likely not ROOT problem but I fitting problem. If you have 4 well separated bumps you should be able to fit by tweaking the starting values to be near each bump. If one the 4th bump is weak you might want to restrict the range of the mean to be near it so it doesn't run off

If you're fitting 4 Gaussians to a single bump you may just be running into the intrinsic ambiguity because the Gaussians are not orthogonal functions when there near each other.

You might try constraining some of the parameters. For example if your 4th Gaussian is to account for a tail you might fix it's width. Without knowing what you're fitting it's hard to say just what's going wrong, but it's unlikely to be a ROOT problem --

I've fit up to 5 Gaussians to a wide peak with tails, but I had to nurse the fit in by fixing parameters, then I could get a fit with out fixing any parameters by starting near the values, I'd nursed to interactively.

You'll find in these case the correlations are very large, sometimes to the point where you get into numerical trouble.

One possible ROOT problem is if you forget to increase the number parameters you asked TMinuit to allow.

fitter=new TMinuit(npar)

if npar was 6 for 3 Gaussians, you need to make 9 for 4. If you don't fitter overwrites memory or something like that. I believe you can always set it too big (more parameter than expect to ever use), so that you don't have to worry about this -- though you shouldn't go crazy setting 1000 or something huge like that.

Your problem however looks more like a fitting problem. I usually get somekind of crash if I npar too small.

-Art S.

A.E. Snyder, Group EC                        \!c*p?/
SLAC Mail Stop #95                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder_at_slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:650-926-2657                          Collaboration



On Fri, 9 Feb 2007, Roger Mason wrote:

> Hello rooters,
>
> I'm trying to fit a TGraph of 2775 points generated by combination of 4 gaussians +
> noise. The fit does not converge:
>
> root [1] **********
> ** 5 **MIGRAD 5000 0.002775
> **********
> CALL LIMIT EXCEEDED IN MIGRAD.
> MIGRAD TERMINATED WITHOUT CONVERGENCE.
> FCN=1328.43 FROM MIGRAD STATUS=CALL LIMIT 11189 CALLS 11190 TOTAL
> EDM= unknown STRATEGY= 1 NO ERROR MATRIX
>
>
>
> A fit to a similar spectrum with only 3 gaussians converges OK.
>
> What do I need to tweak to get this to work?
>
> Thanks,
> Roger
>
>
Received on Fri Feb 09 2007 - 19:46:08 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 09 2007 - 23:50:01 CET