102 #include "Riostream.h" 103 #include "TGraphAsymmErrors.h" 110 #include "TVirtualFitter.h" 113 extern void H1FitChisquareFumili(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
162 for (
int i = 0; i<5; ++i)
fINDFLG[i] = 0;
166 gROOT->GetListOfSpecials()->Add(gFumili);
191 fZ0 =
new Double_t[zSize];
192 fZ =
new Double_t[zSize];
214 if (gROOT && !gROOT->TestBit(TObject::kInvalidObject))
215 gROOT->GetListOfSpecials()->Remove(
this);
216 if (gFumili ==
this) gFumili = 0;
243 for (Int_t i=0;i<
fNpar;i++) {
294 Double_t ff,ai,hi,
y,pi;
296 for (Int_t i=0;i<
fNpar;i++) {
301 pi =
fRP*TMath::Abs(ai);
311 if (
fAMN[i]-ai+hi<0) {
352 Int_t
TFumili::Eval(Int_t& npar, Double_t *grad, Double_t &fval, Double_t *par, Int_t flag)
354 if (fFCN) (*fFCN)(npar,grad,fval,par,flag);
371 TF1 *f1 = (TF1*)fUserFunc;
372 return f1->EvalPar(X,
fA);
395 TString comand = command;
396 static TString clower =
"abcdefghijklmnopqrstuvwxyz";
397 static TString cupper =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
398 const Int_t nntot = 40;
399 const char *cname[nntot] = {
444 if (nargs<=0)
fCmPar[0] = 0;
447 if(i<nargs)
fCmPar[i] = args[i];
457 TString ctemp =
fCword(0,3);
459 for (ind = 0; ind < nntot; ++ind) {
460 if (strncmp(ctemp.Data(),cname[ind],3) == 0)
break;
462 if (ind==nntot)
return -3;
463 if (
fCword(0,4) ==
"MINO") ind=3;
465 case 0:
case 3:
case 2:
case 28:
487 if (nargs<1)
return -1;
488 for (i=0;i<nargs;i++) {
489 Int_t parnum = Int_t(
fCmPar[i])-1;
494 if (nargs<1)
return 0;
496 for (i=0;i<
fNpar;i++)
505 if (nargs<1)
return -1;
506 for (i=0;i<nargs;i++) {
507 Int_t parnum = Int_t(
fCmPar[i])-1;
519 Printf(
"SAVe command is obsolete");
524 {
if(nargs<1)
return -1;
525 Int_t flag = Int_t(
fCmPar[0]);
545 case 26:
case 27:
case 29:
case 30:
case 31:
case 32:
547 case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
549 Printf(
"Obsolete command. Use corresponding SET command instead");
566 static Int_t nntot = 30;
567 static const char *cname[30] = {
599 TString cfname, cmode, ckind, cwarn, copt, ctemp, ctemp2;
601 Bool_t setCommand=kFALSE;
602 for (ind = 0; ind < nntot; ++ind) {
606 if (strstr(ctemp2.Data(),ckind.Data()))
break;
609 if(ctemp2.Contains(
"SET")) setCommand=
true;
610 if(ctemp2.Contains(
"HEL") || ctemp2.Contains(
"SHO")) setCommand=
false;
612 if (ind>=nntot)
return -3;
616 if(!setCommand) Printf(
"FCN=%f",
fS);
620 if (nargs<2 && setCommand)
return -1;
624 parnum = Int_t(
fCmPar[0])-1;
626 if(parnum<0 || parnum>=
fNpar)
return -2;
630 parnum = Int_t(
fCmPar[0])-1;
631 if(parnum<0 || parnum>=
fNpar)
return -2;
632 Printf(
"Parameter %s = %E",
fANames[parnum].Data(),
fA[parnum]);
634 for (i=0;i<
fNpar;i++)
635 Printf(
"Parameter %s = %E",
fANames[i].Data(),
fA[i]);
643 Double_t lolim,uplim;
650 Printf(
"Limits for param %s: Low=%E, High=%E",
653 parnum = Int_t(
fCmPar[0])-1;
654 if(parnum<0 || parnum>=
fNpar)
return -1;
659 if(uplim==lolim)
return -1;
661 Double_t tmp = lolim;
669 fAMN[parnum] = lolim;
670 fAMX[parnum] = uplim;
672 Printf(
"Limits for param %s Low=%E, High=%E",
679 if(setCommand)
return 0;
680 Printf(
"\nCovariant matrix ");
681 Int_t l = 0,nn=0,nnn=0;
682 for (i=0;i<fNpar;i++) if(fPL0[i]>0.) nn++;
684 for(;
fPL0[nnn]<=0.;nnn++) { }
685 printf(
"%5s: ",
fANames[nnn++].Data());
686 for (Int_t j=0;j<=i;j++)
687 printf(
"%11.2E",
fZ[l++]);
688 std::cout<<std::endl;
690 std::cout<<std::endl;
694 if(setCommand)
return 0;
695 Printf(
"\nGlobal correlation factors (maximum correlation of the parameter\n with arbitrary linear combination of other parameters)");
696 for(i=0;i<
fNpar;i++) {
697 printf(
"%5s: ",
fANames[i].Data());
700 std::cout<<std::endl;
705 if(!setCommand)
return 0;
709 if(!setCommand)
return 0;
721 if(!setCommand)
return 0;
725 if(!setCommand)
return 0;
742 Printf(
"Relative floating point presicion RP=%E",
fRP);
746 if (pres<1e-5 && pres>1
e-34)
fRP=pres;
756 if(setCommand)
return 0;
757 Printf(
"FUMILI-ROOT version 0.1");
762 if(!setCommand)
return 0;
766 if(!setCommand)
return 0;
782 if(ipar>=0 && ipar<
fNpar &&
fPL0[ipar]>0.) {
803 if (i < 0 || i >=
fNpar || j < 0 || j >=
fNpar) {
804 Error(
"GetCovarianceMatrixElement",
"Illegal arguments i=%d, j=%d",i,j);
825 for (Int_t i=0;i<
fNpar;i++) {
836 if (ipar<0 || ipar>=
fNpar)
return 0;
845 if (ipar<0 || ipar>=
fNpar)
return 0;
846 else return fA[ipar];
860 Int_t
TFumili::GetParameter(Int_t ipar,
char *cname,Double_t &value,Double_t &verr,Double_t &vlow, Double_t &vhigh)
const 862 if (ipar<0 || ipar>=
fNpar) {
869 strcpy(cname,
fANames[ipar].Data());
882 if (ipar < 0 || ipar >
fNpar)
return "";
890 Int_t
TFumili::GetErrors(Int_t ipar,Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc)
const 894 if (ipar<0 || ipar>=
fNpar) {
912 Int_t
TFumili::GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx)
const 919 for(Int_t ii=0; ii<
fNpar; ii++) {
920 if(
fPL0[ii]>0.) nvpar++;
939 for (Int_t j=0;j<=
fNlog;j++) {
960 static Double_t am = 3.4e138;
961 static Double_t rp = 5.0e-14;
962 Double_t ap, aps, c, d;
966 Int_t i, k, l, ii, ki, li, kk, ni, ll, nk, nl, ir, lk;
975 ap = 1.0e0 / (aps * aps);
977 for (i = 1; i <= n; ++i) {
980 if (pl_1[ir] <= 0.0e0)
goto L1;
983 ni = i * (i - 1) / 2;
986 if (z_1[ii] <= rp * TMath::Abs(r_1[ir]) || z_1[ii] <= ap) {
989 z_1[ii] = 1.0e0 /
sqrt(z_1[ii]);
992 if (nl - ni <= 0)
goto L5;
996 if (TMath::Abs(z_1[nl]) >= aps) {
1002 if (i - n >= 0)
goto L12;
1006 nk = k * (k - 1) / 2;
1009 d = z_1[kk] * z_1[ii];
1015 z_1[ll] -= z_1[li] * c;
1018 if (l - i <= 0)
goto L9;
1023 z_1[ll] -= z_1[li] * d;
1026 if (l <= 0)
goto L10;
1030 if (k - i - 1 <= 0)
goto L11;
1036 for (i = 1; i <= n; ++i) {
1037 for (k = i; k <= n; ++k) {
1038 nl = k * (k - 1) / 2;
1041 for (l = k; l <= n; ++l) {
1044 d += z_1[li] * z_1[lk];
1047 ki = k * (k - 1) / 2 + i;
1056 for (i = 1; i <= k; ++i) {
1059 if (pl_1[ir] <= 0.0e0) {
1078 if(ipar < 0 || ipar >=
fNpar) {
1079 Warning(
"IsFixed",
"Illegal parameter number :%d",ipar);
1082 if (
fPL0[ipar] < 0)
return kTRUE;
1123 for( i = 0; i <
fNpar; i++) {
1128 Int_t nn2, n, fixFLG, ifix1, fi, nn3, nn1, n0;
1130 Double_t sp, t, olds=0;
1131 Double_t bi, aiMAX=0, amb;
1132 Double_t afix, sigi, akap;
1133 Double_t alambd, al,
bm, abi, abm;
1152 for( i=0; i < n; i++) {
1169 for( i = 0; i < n; i++) {
1182 for( i=0; i < nn0; i++)
fZ[i]=0.;
1194 if(!ijkl)
return 10;
1198 sp=
fRP*TMath::Abs(
fS);
1201 for( i=0; i < nn0; i++)
fZ0[i] =
fZ[i];
1206 if (TMath::Abs(
fS-olds) <= sp && -
fGT <= sp)
goto L19;
1207 if( 0.59*t < -fGT)
goto L19;
1209 if (t < 0.25 ) t = 0.25;
1215 for( i = 0; i < n; i++) {
1232 printf(
"trying to execute an illegal junp at L85\n");
1237 Int_t k1, k2, i1, j, l;
1243 for( i = 0; i < n; i++) {
1250 if ((
fA[i] >=
fAMX[i] &&
fGr[i] < 0.) ||
1257 for( j=0; j <= i; j++) {
1262 fZ[k2 -1] =
fZ0[k1 -1];
1278 for( i = 0; i < n; i++) {
1294 fixFLG = fixFLG + 1;
1301 for( i = 0; i < n; i++) {
1305 for( l = 0; l < n; l++) {
1309 if (i1 <= l1 ) k=l1*(l1-1)/2+i1;
1310 else k=i1*(i1-1)/2+l1;
1325 for( i = 0; i < n; i++)
1334 akap = TMath::Abs(
fDA[i]/sigi);
1349 fixFLG = fixFLG + 1;
1363 for( i = 0; i < n; i++) {
1366 abi = fA[i] +
fPL[i];
1369 bm = fA[i] -
fAMN[i];
1370 abi = fA[i] - fPL[i];
1381 if ( TMath::Abs(
fDA[i]) > bi) {
1383 al = TMath::Abs(bi/
fDA[i]);
1399 if (alambd > .0) amb = 0.25/alambd;
1400 for( i = 0; i < n; i++) {
1403 if (TMath::Abs(
fDA[i]/
fPL[i]) > amb ) {
1418 if (-
fGT <= sp && t1 < 1. && alambd < 1.)
fENDFLG = -1;
1472 for ( i = 0; i < n; i++)
fA[i] =
fA[i] +
fDA[i];
1473 if (imax >= 0)
fA[imax] = aiMAX;
1482 for( Int_t ip = 0; ip <
fNpar; ip++) {
1483 if(
fPL0[ip] > .0) {
1484 for( Int_t jp = 0; jp <= ip; jp++) {
1511 TString exitStatus=
"";
1513 TString colhdu[3],colhdl[3],cx2,cx3;
1516 exitStatus=
"CONVERGED";
1519 exitStatus=
"CONST FCN";
1520 xsexpl=
"****\n* FUNCTION IS NOT DECREASING OR BAD DERIVATIVES\n****";
1523 exitStatus=
"ERRORS INF";
1524 xsexpl=
"****\n* ESTIMATED ERRORS ARE INfiNITE\n****";
1527 exitStatus=
"MAX ITER.";
1528 xsexpl=
"****\n* MAXIMUM NUMBER OF ITERATIONS IS EXCEEDED\n****";
1531 exitStatus=
"ZERO PROBAB";
1532 xsexpl=
"****\n* PROBABILITY OF LIKLIHOOD FUNCTION IS NEGATIVE OR ZERO\n****";
1535 exitStatus=
"UNDEfiNED";
1536 xsexpl=
"****\n* fiT IS IN PROGRESS\n****";
1541 colhdl[0] =
" ERROR ";
1542 colhdu[1] =
" PHYSICAL";
1543 colhdu[2] =
" LIMITS ";
1544 colhdl[1] =
" NEGATIVE ";
1545 colhdl[2] =
" POSITIVE ";
1549 colhdl[0] =
" ERROR ";
1550 colhdu[1] =
" INTERNAL ";
1551 colhdl[1] =
" STEP SIZE ";
1552 colhdu[2] =
" INTERNAL ";
1553 colhdl[2] =
" VALUE ";
1557 colhdl[0] =
" ERROR ";
1558 colhdu[1] =
" STEP ";
1559 colhdl[1] =
" SIZE ";
1560 colhdu[2] =
" fiRST ";
1561 colhdl[2] =
" DERIVATIVE";
1564 colhdu[0] =
" PARABOLIC ";
1565 colhdl[0] =
" ERROR ";
1566 colhdu[1] =
" MINOS ";
1567 colhdu[2] =
"ERRORS ";
1568 colhdl[1] =
" NEGATIVE ";
1569 colhdl[2] =
" POSITIVE ";
1571 if(
fENDFLG<1)Printf(
"%s", xsexpl.Data());
1572 Printf(
" FCN=%g FROM FUMILI STATUS=%-10s %9d CALLS OF FCN",
1573 p,exitStatus.Data(),
fNfcn);
1574 Printf(
" EDM=%g ",-
fGT);
1575 Printf(
" EXT PARAMETER %-14s%-14s%-14s",
1576 (
const char*)colhdu[0].Data()
1577 ,(
const char*)colhdu[1].Data()
1578 ,(
const char*)colhdu[2].Data());
1579 Printf(
" NO. NAME VALUE %-14s%-14s%-14s",
1580 (
const char*)colhdl[0].Data()
1581 ,(
const char*)colhdl[1].Data()
1582 ,(
const char*)colhdl[2].Data());
1584 for (Int_t i=0;i<
fNpar;i++) {
1586 cx2 = Form(
"%14.5e",
fDA[i]);
1587 cx3 = Form(
"%14.5e",
fGr[i]);
1591 cx2 = Form(
"%14.5e",
fAMN[i]);
1592 cx3 = Form(
"%14.5e",
fAMX[i]);
1595 cx2 = Form(
"%14.5e",
fDA[i]);
1596 cx3 = Form(
"%14.5e",
fA[i]);
1599 cx2 =
" *undefined* ";
1600 cx3 =
" *undefined* ";
1602 if(
fPL0[i]<=0.) { cx2=
" *fixed* ";cx3=
""; }
1603 Printf(
"%4d %-11s%14.5e%14.5e%-14s%-14s",i+1
1605 ,cx2.Data(),cx3.Data());
1614 if(ipar>=0 && ipar<
fNpar &&
fPL0[ipar]<=0.) {
1672 Int_t
TFumili::SetParameter(Int_t ipar,
const char *parname,Double_t value,Double_t verr,Double_t vlow, Double_t vhigh) {
1673 if (ipar<0 || ipar>=
fNpar)
return -1;
1705 Int_t i,j,l,k2=1,k1,ki=0;
1706 Double_t *
x =
new Double_t[
fNED2];
1707 Double_t *df =
new Double_t[
fNpar];
1709 for (l=0;l<
fNED1;l++) {
1738 y = y -
fEXDA[k1-1];
1739 fS =
fS + (y*y/(sig*sig))*.5;
1742 for (i=0;i<
fNpar;i++) {
1745 fGr[i] += df[n]*(y/sig);
1752 fZ[l++] += df[i]*df[j];
1772 Foption_t fitOption = GetFitOption();
1773 if (fitOption.Integral) {
1777 Double_t cu,
eu,fu,fsum;
1782 TH1 *hfit = (TH1*)GetObjectFit();
1783 TF1 *f1 = (TF1*)GetUserFunc();
1784 Int_t nd = hfit->GetDimension();
1787 npar = f1->GetNpar();
1789 if(flag == 9)
return;
1793 Double_t *df =
new Double_t[npar];
1798 Double_t *cache = fCache;
1799 for (Int_t i=0;i<fNpoints;i++) {
1800 if (nd > 2) x[2] = cache[4];
1801 if (nd > 1) x[1] = cache[3];
1804 TF1::RejectPoint(kFALSE);
1805 fu = f1->EvalPar(x,u);
1806 if (TF1::RejectedPoint()) {cache += fPointSize;
continue;}
1812 for (j=0;j<npar;j++) {
1816 gin[j] += df[n]*fsum;
1822 for (Int_t k=0;k<=j;k++)
1823 zik[l++] += df[j]*df[k];
1827 cache += fPointSize;
1829 f1->SetNumberFitPoints(npfit);
1844 Double_t cu,
eu,fu,fsum;
1849 TH1 *hfit = (TH1*)GetObjectFit();
1850 TF1 *f1 = (TF1*)GetUserFunc();
1851 Int_t nd = hfit->GetDimension();
1855 npar = f1->GetNpar();
1857 if(flag == 9)
return;
1861 Double_t *df=
new Double_t[npar];
1865 Double_t *cache = fCache;
1866 for (Int_t i=0;i<fNpoints;i++) {
1868 TF1::RejectPoint(kFALSE);
1869 f1->SetParameters(u);
1871 fu = f1->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3])/cache[3];
1872 }
else if (nd < 3) {
1873 fu = ((TF2*)f1)->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3],cache[4] - 0.5*cache[5],cache[4] + 0.5*cache[5])/(cache[3]*cache[5]);
1875 fu = ((TF3*)f1)->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3],cache[4] - 0.5*cache[5],cache[4] + 0.5*cache[5],cache[6] - 0.5*cache[7],cache[6] + 0.5*cache[7])/(cache[3]*cache[5]*cache[7]);
1877 if (TF1::RejectedPoint()) {cache += fPointSize;
continue;}
1883 for (j=0;j<npar;j++) {
1887 gin[j] += df[n]*fsum;
1893 for (Int_t k=0;k<=j;k++)
1894 zik[l++] += df[j]*df[k];
1898 cache += fPointSize;
1900 f1->SetNumberFitPoints(npfit);
1919 Foption_t fitOption = GetFitOption();
1920 if (fitOption.Integral) {
1924 Double_t cu,fu,fobs,fsub;
1925 Double_t dersum[100];
1929 TH1 *hfit = (TH1*)GetObjectFit();
1930 TF1 *f1 = (TF1*)GetUserFunc();
1931 Int_t nd = hfit->GetDimension();
1933 Double_t *zik =
GetZ();
1934 Double_t *pl0 =
GetPL0();
1936 npar = f1->GetNpar();
1938 if(flag == 9)
return;
1939 Double_t *df=
new Double_t[npar];
1940 if (flag == 2)
for (j=0;j<npar;j++) dersum[j] = gin[j] = 0;
1945 Double_t *cache = fCache;
1946 for (Int_t i=0;i<fNpoints;i++) {
1947 if (nd > 2) x[2] = cache[4];
1948 if (nd > 1) x[1] = cache[3];
1951 TF1::RejectPoint(kFALSE);
1952 fu = f1->EvalPar(x,u);
1953 if (TF1::RejectedPoint()) {cache += fPointSize;
continue;}
1955 for (j=0;j<npar;j++) {
1960 if (fu < 1.
e-9) fu = 1.e-9;
1969 for (j=0;j<npar;j++) {
1971 df[n] = df[j]*(icu/fu-1);
1980 for (Int_t k=0;k<=j;k++)
1981 zik[l++] += df[j]*df[k];
1985 cache += fPointSize;
1988 f1->SetNumberFitPoints(npfit);
2007 Double_t cu,fu,fobs,fsub;
2008 Double_t dersum[100];
2012 TH1 *hfit = (TH1*)GetObjectFit();
2013 TF1 *f1 = (TF1*)GetUserFunc();
2014 Int_t nd = hfit->GetDimension();
2016 Double_t *zik =
GetZ();
2017 Double_t *pl0 =
GetPL0();
2019 Double_t *df=
new Double_t[npar];
2021 npar = f1->GetNpar();
2023 if(flag == 9) {
delete [] df;
return;}
2024 if (flag == 2)
for (j=0;j<npar;j++) dersum[j] = gin[j] = 0;
2029 Double_t *cache = fCache;
2030 for (Int_t i=0;i<fNpoints;i++) {
2031 if (nd > 2) x[2] = cache[4];
2032 if (nd > 1) x[1] = cache[3];
2035 TF1::RejectPoint(kFALSE);
2037 fu = f1->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3])/cache[3];
2038 }
else if (nd < 3) {
2039 fu = ((TF2*)f1)->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3],cache[4] - 0.5*cache[5],cache[4] + 0.5*cache[5])/(cache[3]*cache[5]);
2041 fu = ((TF3*)f1)->Integral(cache[2] - 0.5*cache[3],cache[2] + 0.5*cache[3],cache[4] - 0.5*cache[5],cache[4] + 0.5*cache[5],cache[6] - 0.5*cache[7],cache[6] + 0.5*cache[7])/(cache[3]*cache[5]*cache[7]);
2043 if (TF1::RejectedPoint()) {cache += fPointSize;
continue;}
2045 for (j=0;j<npar;j++) {
2050 if (fu < 1.
e-9) fu = 1.e-9;
2059 for (j=0;j<npar;j++) {
2061 df[n] = df[j]*(icu/fu-1);
2070 for (Int_t k=0;k<=j;k++)
2071 zik[l++] += df[j]*df[k];
2075 cache += fPointSize;
2078 f1->SetNumberFitPoints(npfit);
2146 Double_t *u, Int_t flag)
2148 Double_t cu,
eu,exl,exh,ey,eux,fu,fsum;
2150 Int_t i, bin, npfits=0;
2153 TGraph *gr = (TGraph*)grFitter->GetObjectFit();
2154 TF1 *f1 = (TF1*)grFitter->GetUserFunc();
2155 Foption_t fitOption = grFitter->GetFitOption();
2157 Int_t n = gr->GetN();
2158 Double_t *gx = gr->GetX();
2159 Double_t *gy = gr->GetY();
2160 npar = f1->GetNpar();
2164 if(flag == 9)
return;
2165 Double_t *zik = grFitter->
GetZ();
2166 Double_t *pl0 = grFitter->
GetPL0();
2167 Double_t *df =
new Double_t[npar];
2172 for (bin=0;bin<n;bin++) {
2174 if (!f1->IsInside(x))
continue;
2176 TF1::RejectPoint(kFALSE);
2177 fu = f1->EvalPar(x,u);
2178 if (TF1::RejectedPoint())
continue;
2184 exh = gr->GetErrorXhigh(bin);
2185 exl = gr->GetErrorXlow(bin);
2186 ey = gr->GetErrorY(bin);
2187 if (exl < 0) exl = 0;
2188 if (exh < 0) exh = 0;
2190 if (exh > 0 && exl > 0) {
2192 eux = 0.5*(exl + exh)*f1->Derivative(x[0], u);
2196 if (eu <= 0) eu = 1;
2201 fsum = (fu-cu)/eusq;
2202 for (i=0;i<npar;i++) {
2206 gin[i] += df[n]*fsum;
2212 for (Int_t j=0;j<=i;j++)
2213 zik[l++] += df[i]*df[j];
2218 f1->SetNumberFitPoints(npfits);
virtual Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const
return global fit parameters amin : chisquare edm : estimated distance to minimum errdef nvpar : numb...
virtual Double_t Chisquare(Int_t npar, Double_t *params) const
return a chisquare equivalent
virtual Double_t * GetCovarianceMatrix() const
return a pointer to the covariance matrix
virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const
return element i,j from the covariance matrix
Int_t Eval(Int_t &npar, Double_t *grad, Double_t &fval, Double_t *par, Int_t flag)
Evaluate the minimisation function Input parameters: npar: number of currently variable parameters pa...
virtual void FixParameter(Int_t ipar)
Fixes parameter number ipar.
virtual Double_t GetParameter(Int_t ipar) const
return current value of parameter ipar
virtual Int_t GetNumberTotalParameters() const
return the total number of parameters (free + fixed)
virtual void PrintResults(Int_t k, Double_t p) const
Prints fit results.
Double_t * GetPL0() const
you should not use this method at all Int_t y
Bool_t fNumericDerivatives
virtual Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
Sets for prameter number ipar initial parameter value, name parname, initial error verr and limits vl...
void InvertZ(Int_t)
Inverts packed diagonal matrix Z by square-root method.
void H1FitChisquareFumili(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Chisquare method.
virtual const char * GetParName(Int_t ipar) const
return name of parameter ipar
void BuildArrays()
Allocates memory for internal arrays.
static const Double_t gMINDOUBLE
virtual Int_t GetErrors(Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const
Return errors after MINOs not implemented.
you should not use this method at all Int_t Int_t Double_t bm
Double_t EvalTFN(Double_t *, Double_t *)
Evaluate theoretical function df: array of partial derivatives X: vector of theoretical function argu...
virtual Double_t GetParError(Int_t ipar) const
return error of parameter ipar
Int_t ExecuteSetCommand(Int_t)
Called from TFumili::ExecuteCommand in case of "SET xxx" and "SHOW xxx".
static const Double_t gMAXDOUBLE
void H1FitLikelihoodFumili(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Likelihood method.
void DeleteArrays()
Deallocates memory.
virtual Bool_t IsFixed(Int_t ipar) const
Return kTRUE if parameter ipar is fixed, kFALSE othersise)
virtual Int_t GetNumberFreeParameters() const
return the number of free parameters
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
Execute MINUIT commands.
virtual void SetFitMethod(const char *name)
ret fit method (chisquare or loglikelihood)
* x
Deprecated and error prone model selection interface.
virtual void FitChisquareI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Chisquare method.
virtual void FitLikelihoodI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Likelihood method.
virtual ~TFumili()
TFumili destructor.
void Derivatives(Double_t *, Double_t *)
Calculates partial derivatives of theoretical function.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void FitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Chisquare method.
virtual void ReleaseParameter(Int_t ipar)
Releases parameter number ipar.
virtual Double_t GetSumLog(Int_t)
return Sum(log(i) i=0,n used by log likelihood fits
void SetData(Double_t *, Int_t, Int_t)
Sets pointer to data array provided by user.
virtual void Clear(Option_t *opt="")
Resets all parameter names, values and errors to zero.
void SetParNumber(Int_t ParNum)
virtual void FitLikelihood(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for H1s using a Likelihood method.
Double_t Sqrt(Double_t x)
void GraphFitChisquareFumili(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
Minimization function for Graphs using a Chisquare method.
Int_t SGZ()
Evaluates objective function ( chi-square ), gradients and Z-matrix using data provided by user via T...