Discussion:
[ROOT] Minuit2 ouput level
Bernhard Bittner
2008-03-18 15:05:11 UTC
Permalink
Hi all,

i'm using Minuit2 from ROOT (5.18.00 on linux) to do some fitting. Some =
of =

the fits fail and i get messages like

CombinedMinimumBuilder: migrad method fails, will try with simplex metho=
d =

first.
CombinedMinimumBuilder: both migrad and method fails also at 2nd attempt=
.
CombinedMinimumBuilder: return simplex Minimum
VariableMetricBuilder: matrix not pos.def.
edm < 0

is there a way to sot munuit from telling me all that suff? I found one =
=

option to set the uotput level in ROOT itself (gErrorIgnoreLevel), but =

this does not work on the Minuit2 output.

I'm calling Muniut2 via

FitFcn FCN(data_points); // derived from ROOT::Minuit2::FCNBase
MnUserParameters upar_rpc;
upar_rpc.Add("a", 1 , .1);
/** create minimizer */
MnMinimize migrad_rpc(FCN, upar_rpc);
/** ... and minimize */
FunctionMinimum min_rpc =3D migrad_rpc();

Many Thanks!
Bernhard
-- =

Bernhard Bittner
mailto:***@cern.ch
Lorenzo Moneta
2008-03-18 16:18:22 UTC
Permalink
Hi Bernhard,

the option gErrorIgnoreLevel, should work in the Minuit2 version
5.18 distributed with ROOT.
Try to set it to a value like 1001, before running the minimization.

Best Regards

Lorenzo
Post by Bernhard Bittner
Hi all,
i'm using Minuit2 from ROOT (5.18.00 on linux) to do some fitting.
Some of the fits fail and i get messages like
CombinedMinimumBuilder: migrad method fails, will try with simplex
method first.
CombinedMinimumBuilder: both migrad and method fails also at 2nd
attempt.
CombinedMinimumBuilder: return simplex Minimum
VariableMetricBuilder: matrix not pos.def.
edm < 0
is there a way to sot munuit from telling me all that suff? I found
one option to set the uotput level in ROOT itself
(gErrorIgnoreLevel), but this does not work on the Minuit2 output.
I'm calling Muniut2 via
FitFcn FCN(data_points); // derived from ROOT::Minuit2::FCNBase
MnUserParameters upar_rpc;
upar_rpc.Add("a", 1 , .1);
/** create minimizer */
MnMinimize migrad_rpc(FCN, upar_rpc);
/** ... and minimize */
FunctionMinimum min_rpc = migrad_rpc();
Many Thanks!
Bernhard
--
Bernhard Bittner
Bernhard Bittner
2008-03-18 17:03:30 UTC
Permalink
Hi Lorenzo,

inserting
gErrorIgnoreLevel =3D 1001;
right at the beginning of the function where i call mimuit does not chan=
ge =

anything, I still get the same output.

But I just found out, that since my classes are inside the ATLAS ATHENA =
=

framework and this framework uses ROOT 5.14 I guess i will have only the=
=

old version of ROOT to work with. Is there any other way in 5.14 to turn=
=

this messages of?

Thanks,
Bernhard

On Tue, 18 Mar 2008 17:18:22 +0100, Lorenzo Moneta =
Post by Lorenzo Moneta
Hi Bernhard,
the option gErrorIgnoreLevel, should work in the Minuit2 version 5.1=
8 =
Post by Lorenzo Moneta
distributed with ROOT.
Try to set it to a value like 1001, before running the minimization.
Best Regards
Lorenzo
Post by Bernhard Bittner
Hi all,
i'm using Minuit2 from ROOT (5.18.00 on linux) to do some fitting. So=
me =
Post by Lorenzo Moneta
Post by Bernhard Bittner
of the fits fail and i get messages like
CombinedMinimumBuilder: migrad method fails, will try with simplex =
method first.
CombinedMinimumBuilder: both migrad and method fails also at 2nd =
attempt.
CombinedMinimumBuilder: return simplex Minimum
VariableMetricBuilder: matrix not pos.def.
edm < 0
is there a way to sot munuit from telling me all that suff? I found o=
ne =
Post by Lorenzo Moneta
Post by Bernhard Bittner
option to set the uotput level in ROOT itself (gErrorIgnoreLevel), bu=
t =
Post by Lorenzo Moneta
Post by Bernhard Bittner
this does not work on the Minuit2 output.
I'm calling Muniut2 via
FitFcn FCN(data_points); // derived from ROOT::Minuit2::FCNBase
MnUserParameters upar_rpc;
upar_rpc.Add("a", 1 , .1);
/** create minimizer */
MnMinimize migrad_rpc(FCN, upar_rpc);
/** ... and minimize */
FunctionMinimum min_rpc =3D migrad_rpc();
Many Thanks!
Bernhard
--Bernhard Bittner
-- =

Bernhard Bittner
mailto:***@cern.ch
Kevin Lynch
2008-03-18 19:00:50 UTC
Permalink
Post by Bernhard Bittner
Hi Lorenzo,
inserting
gErrorIgnoreLevel = 1001;
right at the beginning of the function where i call mimuit does not
change anything, I still get the same output.
You need to set a bigger number to really shut up Minuit2 :-)

If you want it REALLY quiet, try

gErrorIgnoreLevel = kFatal;

Take a look at the logic in the root source where it uses the value of
gErrorIgnoreLevel: base/inc/TError.cxx and base/inc/TError.h

This logic is the same in both 5.14 and 5.18, so I would imagine the
above approach should work in either case.

But you might really want to explore _why_ your minimizations are
failing in the first place, rather than just silencing them ... they're
telling you something is very wrong. I just spent a week doing exactly
that, and it turned out my problems were much bigger than Minuit2 making
lots of noise....
Post by Bernhard Bittner
But I just found out, that since my classes are inside the ATLAS ATHENA
framework and this framework uses ROOT 5.14 I guess i will have only the
old version of ROOT to work with. Is there any other way in 5.14 to turn
this messages of?
Thanks,
Bernhard
--
-------------------------------------------------------------------------------
Kevin Lynch voice: (617) 353-6025
Physics Department Fax: (617) 353-9393
Boston University office: PRB-361
590 Commonwealth Ave. e-mail: ***@bu.edu
Boston, MA 02215 USA http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------
Lorenzo Moneta
2008-03-18 20:21:39 UTC
Permalink
Hi Bernhard,

unfortunatly TError is used for producing error and warning messages
only for versions > 5.14.
I would reccomend too to try to fix the error. Probably Migrad fails
because you are giving wrong initial values

Best Regards

Lorenzo
Post by Kevin Lynch
Post by Bernhard Bittner
Hi Lorenzo,
inserting
gErrorIgnoreLevel = 1001;
right at the beginning of the function where i call mimuit does not
change anything, I still get the same output.
You need to set a bigger number to really shut up Minuit2 :-)
If you want it REALLY quiet, try
gErrorIgnoreLevel = kFatal;
Take a look at the logic in the root source where it uses the value
of gErrorIgnoreLevel: base/inc/TError.cxx and base/inc/TError.h
This logic is the same in both 5.14 and 5.18, so I would imagine the
above approach should work in either case.
But you might really want to explore _why_ your minimizations are
failing in the first place, rather than just silencing them ...
they're telling you something is very wrong. I just spent a week
doing exactly that, and it turned out my problems were much bigger
than Minuit2 making lots of noise....
Post by Bernhard Bittner
But I just found out, that since my classes are inside the ATLAS
ATHENA framework and this framework uses ROOT 5.14 I guess i will
have only the old version of ROOT to work with. Is there any other
way in 5.14 to turn this messages of?
Thanks,
Bernhard
--
-------------------------------------------------------------------------------
Kevin Lynch voice: (617) 353-6025
Physics Department Fax: (617) 353-9393
Boston University office: PRB-361
Boston, MA 02215 USA http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------
Bernhard Bittner
2008-03-18 22:43:30 UTC
Permalink
Hi all,

I'm running my code on some montacarlo data of simulated ATLAS events an=
d =

there are just some non good events. I checked for quite some events whe=
re =

MINUIT is failing, and these events are clearly not usable. Most of the =
=

times all if fine, and all events with some bad fits are discarded. But =
=

the Minuit output is messing put important error messages.

I guess i will just have to live with them ...

Many Thanks!
Bernhard

On Tue, 18 Mar 2008 21:21:39 +0100, Lorenzo Moneta =
Post by Lorenzo Moneta
Hi Bernhard,
unfortunatly TError is used for producing error and warning messages=
=
Post by Lorenzo Moneta
only for versions > 5.14.
I would reccomend too to try to fix the error. Probably Migrad fails =
=
Post by Lorenzo Moneta
because you are giving wrong initial values
Best Regards
Lorenzo
Post by Kevin Lynch
Post by Bernhard Bittner
Hi Lorenzo,
inserting
gErrorIgnoreLevel =3D 1001;
right at the beginning of the function where i call mimuit does not =
=
Post by Lorenzo Moneta
Post by Kevin Lynch
Post by Bernhard Bittner
change anything, I still get the same output.
You need to set a bigger number to really shut up Minuit2 :-)
If you want it REALLY quiet, try
gErrorIgnoreLevel =3D kFatal;
Take a look at the logic in the root source where it uses the value o=
f =
Post by Lorenzo Moneta
Post by Kevin Lynch
gErrorIgnoreLevel: base/inc/TError.cxx and base/inc/TError.h
This logic is the same in both 5.14 and 5.18, so I would imagine the =
=
Post by Lorenzo Moneta
Post by Kevin Lynch
above approach should work in either case.
But you might really want to explore _why_ your minimizations are =
failing in the first place, rather than just silencing them ... they'=
re =
Post by Lorenzo Moneta
Post by Kevin Lynch
telling you something is very wrong. I just spent a week doing exact=
ly =
Post by Lorenzo Moneta
Post by Kevin Lynch
that, and it turned out my problems were much bigger than Minuit2 =
making lots of noise....
Post by Bernhard Bittner
But I just found out, that since my classes are inside the ATLAS =
ATHENA framework and this framework uses ROOT 5.14 I guess i will ha=
ve =
Post by Lorenzo Moneta
Post by Kevin Lynch
Post by Bernhard Bittner
only the old version of ROOT to work with. Is there any other way in=
=
Post by Lorenzo Moneta
Post by Kevin Lynch
Post by Bernhard Bittner
5.14 to turn this messages of?
Thanks,
Bernhard
-- =
---------------------------------------------------------------------=
----------
Post by Lorenzo Moneta
Post by Kevin Lynch
Kevin Lynch voice: (617) 353-6025
Physics Department Fax: (617) 353-9393
Boston University office: PRB-361
Boston, MA 02215 USA http://budoe.bu.edu/~krlynch
---------------------------------------------------------------------=
----------
-- =

Bernhard Bittner
mailto:***@cern.ch
Lorenzo Moneta
2008-03-19 08:50:30 UTC
Permalink
Hi,
I am sorry I cannot solve your problem. I hope ATLAS will move soon
to 5.18, if you cannot easly replace yourself the ROOT version of your
program,

Best Regards

Lorenzo
Post by Bernhard Bittner
Hi all,
I'm running my code on some montacarlo data of simulated ATLAS
events and there are just some non good events. I checked for quite
some events where MINUIT is failing, and these events are clearly
not usable. Most of the times all if fine, and all events with some
bad fits are discarded. But the Minuit output is messing put
important error messages.
I guess i will just have to live with them ...
Many Thanks!
Bernhard
Post by Lorenzo Moneta
Hi Bernhard,
unfortunatly TError is used for producing error and warning
messages only for versions > 5.14.
I would reccomend too to try to fix the error. Probably Migrad
fails because you are giving wrong initial values
Best Regards
Lorenzo
Post by Kevin Lynch
Post by Bernhard Bittner
Hi Lorenzo,
inserting
gErrorIgnoreLevel = 1001;
right at the beginning of the function where i call mimuit does
not change anything, I still get the same output.
You need to set a bigger number to really shut up Minuit2 :-)
If you want it REALLY quiet, try
gErrorIgnoreLevel = kFatal;
Take a look at the logic in the root source where it uses the
value of gErrorIgnoreLevel: base/inc/TError.cxx and base/inc/
TError.h
This logic is the same in both 5.14 and 5.18, so I would imagine
the above approach should work in either case.
But you might really want to explore _why_ your minimizations are
failing in the first place, rather than just silencing them ...
they're telling you something is very wrong. I just spent a week
doing exactly that, and it turned out my problems were much bigger
than Minuit2 making lots of noise....
Post by Bernhard Bittner
But I just found out, that since my classes are inside the ATLAS
ATHENA framework and this framework uses ROOT 5.14 I guess i will
have only the old version of ROOT to work with. Is there any
other way in 5.14 to turn this messages of?
Thanks,
Bernhard
--
-------------------------------------------------------------------------------
Kevin Lynch voice: (617) 353-6025
Physics Department Fax: (617) 353-9393
Boston University office: PRB-361
Boston, MA 02215 USA http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------
--
Bernhard Bittner
Loading...