Using Minuit in ROOT without global variables

From: Hermann Fuchs <>
Date: Tue, 12 Jul 2011 11:26:42 +0200


I am trying to use TMinuit in order to optimize some functions. It seems there is no real tutorial using TMinuit (I found plenty of code for the old standalone Minuit,though).

It seems to me, in order to calculate chisquare or simply a difference between the optimized function and a reference function, the reference data has to be in a global variable.
Is there a way around that?

The Minuit optimization is only a very small part of my program so I would like to avoid having a lot of data in global variables. I have attached my current source file to provide a basis for the discussion.


DI Hermann Fuchs
Div. Medical Radiation Physics
Department of Radiotherapy
Med. Univ. Vienna / AKH Vienna
Währinger Gürtel 18-20
A-1090 Wien

Tel.  + 43 / 1 / 40 400 7271

Received on Tue Jul 12 2011 - 11:26:54 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 12 2011 - 17:50:01 CEST