[ROOT] Using TH1 Fit method within TMinuit

From: Greg Landsberg (landsberg@hep.brown.edu)
Date: Mon Mar 03 2003 - 23:57:51 MET


Dear Rooters,

I have faced the following problem when trying to use TMinuit or
TVirtualFitter class to do a complicated minimization. My minimization
function, fcn, which is passed to TMinuit/TVirtualFitter via the SetFCN
method fills a histogram that it further fits to a certain function via
standard TH1F Fit() method. The results of this 'internal' fit are used
in order to estimate the return value of fcn.

However, as soon as the first instance of the TH1F Fit() is called, the
Minuit is switched to optimize the histogram, not the function fcn! This
is as if there were just a single copy of the TMinuit object that exists
in memory, and is superceded with whatever the latest initialization
setting that took place (i.e. via TH1F Fit).

This sounds like a bug to me, rather than a designed behavior. I wonder
if anyone faced a similar problem and knows a workaround.

Please, CC: your reply directly to me, as I don't always read the
roottalk.

Many thanks,

Greg Landsberg



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET