Workbook for SLD Offline Users - Processors Ex.4: Fitting with MINUIT

In this excercise we will use Minuit to fit histograms. In order to save some time we have written an IDA file that will generate a variety of histograms to be fit. The file is located in $SLD_FAC0:[SLDWWW.WORKBOOK]TESTHIST.IDA , to copy it issue:


Now start up an ida sessions, after Ida has loaded type:


Now we must load the command processor. All command processors are loaded with the command CMDPROC (processor name) , we will be using the command processor MFITCMD. So at the IDA prompt issue the command:


Now all commands starting with MFIT will be sent to MINUIT.

Using Online Help

To see the different options available to us there is a fairly complete online help. To activate it type:


We see the three basic mfit commands:

Fortunately we are not limited to just these commands. To see the full list of commands possible type at the prompt MFIT Subtopics?


We see in addition to the above 3 there is:

Please spend a few minutes reading the help on each of these.

Fitting a Gaussian

When we ran the program "TESTHIST" we created a numbe of histograms. The Histogram with ID=1 is basically a gaussian. In the following example we will fit it the simplest way possible. type:
     Ida> HOUT 1 SDDXWDO 
     Ida> MFIT HIST 1
     Ida> MFIT GO
     Ida> MFIT SHOW
     Ida> HOUT 1 SDDXWDO
So we see Minuit was able to fit the function. Issuing the MFIT SHOW command gives us the Chisq, NDF, Range and minimization routine as well as the resultant fit parameterrs and thier errors. Issuing the HOUT command after running the fit overlays the fit onto the original histogram.
Eric Weiss
7 February 1995