A Mathematica based Version of the CKMfitter Package
A Mathematica based Version of the CKMfitter Package
A Mathematica based Version of the CKMfitter Package
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.4. The Minimization Routine 21<br />
4.4 The Minimization Routine<br />
Since FORTRAN is more optimized for numerical calculations, a FORTRAN <strong>based</strong><br />
minimization routine is used instead <strong>of</strong> a <strong>Ma<strong>the</strong>matica</strong> intrinsic function. The main<br />
file is minimir.f, which calls a set <strong>of</strong> subroutines and functions from <strong>the</strong> files fit.f,<br />
dmnfg.f and specialfunctions.f. The minimized quantity χ 2 and its partial derivatives<br />
with respect to all fit parameters are located in <strong>the</strong> file minimirChi2.f, which<br />
is also linked to <strong>the</strong> executable minimir after <strong>the</strong> compilation process. The subroutine,<br />
which manages <strong>the</strong> minimization process is called POINTFIT. It sets <strong>the</strong><br />
fit environment, e. g. <strong>the</strong> starting point and calls <strong>the</strong> real minimization subroutine<br />
DMNG, which proceeds <strong>the</strong> unconstrained minimization <strong>of</strong> <strong>the</strong> χ 2 -function using <strong>the</strong>ir<br />
exact analytic gradients. The subroutine DMNG was coded by David M. Gay using<br />
a quasi-Newton method and is publicly available at NetLib.org [23]. Fur<strong>the</strong>r informations<br />
can be found in Ref. [24].<br />
Non-standard FORTRAN functions and subroutines, which belong to <strong>the</strong> analytic<br />
part, e. g. contributions to <strong>the</strong> χ 2 -function, are <strong>the</strong> content <strong>of</strong> <strong>the</strong> file specialfunctions.f.<br />
Fur<strong>the</strong>rmore, it contains <strong>the</strong> function TABLEAU, which allows <strong>the</strong> usage <strong>of</strong><br />
look-up tables (LUT) as input files, and <strong>the</strong> function DDILOG from <strong>the</strong> CERN Library<br />
<strong>Package</strong> [18] to calculate di-logarithmic functions.<br />
minimirChi2.f<br />
minimir.f<br />
minimir.input<br />
minimir.aux<br />
fit.f Compile minimir<br />
dmnfg.f<br />
specialfunctions.f minimir.output<br />
Figure 4.2: The minimization routine file system<br />
A schema <strong>of</strong> <strong>the</strong> file system <strong>of</strong> <strong>the</strong> FORTRAN <strong>based</strong> minimization routine is shown in<br />
Figure 4.4. The FORTRAN files are compiled and linked toge<strong>the</strong>r to <strong>the</strong> executable<br />
minimir. The input information for <strong>the</strong> fit routine is provided by two files in ASCII<br />
format, which are created by <strong>the</strong> analysis notebook. The file minimir.input contains<br />
<strong>the</strong> numerical input <strong>of</strong> <strong>the</strong> fit variables and minimir.aux provides <strong>the</strong> fit options,<br />
e. g. <strong>the</strong> scan direction. The fit result is finally written to <strong>the</strong> file minimir.output,<br />
which is read from <strong>the</strong> analysis notebook.